# Composite function by definition

• April 27th 2010, 10:33 AM
novice
Composite function by definition
I found this expression on Wikipedia:

If $f: X \rightarrow Y$, then $f \circ id_X = id_Y \circ f$,

where $id_X$ and $id_Y$ are identity functions.

I wanted to see whether it's true. So I rewrite the expression using the definition of composite function.

Definition:
$
(g \circ f)(x)=g(f(x))=g(y)=z
$
for $f:X \rightarrow Y$, $g: Y \rightarrow Z$, $x \in X, y \in Y$, and $z \in Z$.

I replaced $f$ with $g$ in $f \circ id_X$ and replaced $id_X$ with $f(x)=x$, where $x \in X$. So I wrote the expression for the LHS

Let $f:X\rightarrow X$ and $g:x\rightarrow Y$, where $x\in X$and $y \in Y$.

$
g\circ id = (g\circ f)(x)=g(f(x))=g(x)=y= g
$
, but now my difficulty being that I don't know how to express the RHS

$
id_Y \circ g =?
$

I can't find any information anywhere on the web proving $f \circ id_X = id_Y \circ f$.

Could someone please show me how to write the expression for the RHS?
• April 27th 2010, 11:03 AM
Plato
Quote:

Originally Posted by novice
If $f: X \rightarrow Y$, then $f \circ id_X = id_Y \circ f$,
where $id_X$ and $id_Y$ are identity functions.

Use $i_X~\&~i_Y$ for the identity functions.
The by definition if $(p,q)\in f\circ i_X$ then $\left( {\exists r} \right)\left[ {(p,r) \in i_X \wedge (r,q) \in f} \right]$
But $(p,r) \in i_X$ implies $p=r$. So $(p,q) \in f$.

If $(p,q)\in i_Y\circ f$ then $\left( {\exists s} \right)\left[ {(p,s) \in f \wedge (s,q) \in i_Y} \right]$.
$(s,q) \in i_Y$ implies that $s=q$, so $(p,q)\in f$.

Does that help?
• April 27th 2010, 11:14 AM
novice
That is so clever.(Clapping)