# Injection function proof

Suppose $f$ is an injection. Show that $f^{-1}\circ f(x)=x$ for all $x\in D(f)$ and $f\circ f^{-1}(y)=y$ for all $y$ in $R(f)$.

In $f^{-1}$ it is defined as "Let $f$ be a one-one function with domain $D(f)$ in $A$ and range $R(f)$ in $B$. If $g=\{(b,a)\in B×A:(a,b)\in f\}$ then $g$ is a one-one function with domain $D(g)=R(f)$ in $B$ and with range $R(g)=D(f)$ in $A$. The function $g$ is called the function inverse to $f$."

I know that for it to be an injection the domain of $f$ maps into distinct elements of $y$, but where I am having trouble understanding and proving this is that, what does this $f^{-1}\circ f(x)=x$ mean? the $=x$ threw me off because what is $x$ in this case, could it have been an $x+3$ or $x^2$ instead of $x$?

Is proving this as easy as just showing that since it is injective then if $f(x_1)=f(x_2)$ $\implies$ $f^{-1}\circ f(x_1)=x_1=f^{-1}\circ f(x_2)=x_2$

-
Are we assuming that $\text{Dom}(f) \subseteq \mathbb{R}$? –  Haskell Curry Feb 7 '13 at 7:23
@HaskellCurry Yes we are –  Q.matin Feb 7 '13 at 7:24
If that is so, then $(f^{-1} \circ f)(x + 3) = x + 3$ is valid, as long as $x + 3 \in \text{Dom}(f)$, or equivalently, $x \in \text{Dom}(f) - 3$. Also, $(f^{-1} \circ f)(x^{2}) = x^{2}$ is valid as long as $x^{2} \in \text{Dom}(f)$. –  Haskell Curry Feb 7 '13 at 7:25
@HaskellCurry Agh, got it. I have edited it you think you can go over it and tell me if I am correct? –  Q.matin Feb 7 '13 at 7:27
@Q.matin You forgot to type \{ when you defined $g$ in the question.You just typed {. –  Git Gud Feb 9 '13 at 1:15
show 10 more comments

By definition $f^{-1}=\{(b,a)\in R(f)\times D(f) : (a,b)\in f\}$.

Now think of $f$ and $f^{-1}$ as binary relations and compute the composition of the relation $f^{-1}$ with the relation $f$. It comes $f^{-1}\circ f=\{(a,a')\in D(f)\times D(f):(\exists b\in R(f))\bigl( (a,b)\in f\wedge (b,a)\in f^{-1}\bigr)\}$.

(Recall that if $g$ is a function, then saying $g(z)=w$ is just shorthand notation for $(z,w)\in g$).

You want to prove that $(\forall x\in D(f))\bigl((f^{-1}\circ f)(x)=x\bigr)$, i.e., $(\forall x\in D(f))\bigl((x,x)\in f^{-1}\circ f\bigr)$.

Let $x\in D(f)$ be taken arbitrarily... (solution below).

Define $y=f(x)$. It follows that $(x,y)\in f$. Furthermore $(y,x)\in f^{-1}$. Since $y\in R(f)$ (by definition of $y$), it comes $(x,x)\in f^{-1}\circ f$, which means $(f^{-1}\circ f)(x)=x$.

The other one is similar.

-
Thank you a lot, Git. This is very helpful! –  Q.matin Feb 10 '13 at 2:31