# Proving a Composition of Functions is Bijective

If I have $f:\mathbb{R}\rightarrow\mathbb{R}$ such that $f$ is onto and $f\circ f\circ f = f$, how can I prove that $f$ is bijective? I know that I only have to prove that it is 1-to-1 because I'm given the fact that it's onto, but how can I use the fact that $f\circ f\circ f=f$ to prove that it is 1-to-1?

Thanks!

-

We have that $f(f(x))=f(f(y))$ implies $f(f(f(x)))=f(f(f(y)))$ so $f(x)=f(y)$. For any $a,b\in \mathbb R$ we have some $x,y\in \mathbb R$ such that $f(x)=a,f(y)=b$ since $f$ is onto. Thus $$f(a)=f(b)\implies f(f(x))=f(f(y))\implies f(x)=f(y)\implies a=b$$ hence $f$ is 1-to-1.

-
I'm confused. How can we assume that f(f(x))=f(f(y))? And how does that imply f(f(f(x)))=f(f(f(y)))? Isn't it only possible to reach f(x)=f(y) from that if f is 1-to-1? – roboguy12 Mar 21 '12 at 0:06
@roboguy12 That's what the first sentence is for. It says that if $f(f(x))=f(f(y))$ then $f(x)=f(y)$. – Alex Becker Mar 21 '12 at 0:13
What property of functions is that using? I can't think of how to write that without assuming f is already 1-to-1. – roboguy12 Mar 21 '12 at 0:17
Let $u=f(f(x))$ and $v=f(f(y))$. Certainly if $u=v$ then $f(u)=f(v)$ (this is part of the definition of a function). But $f(u)=f(f(f(x)))=f(x)$ and $f(v)=f(f(f(y)))=f(y)$ so $f(x)=f(y)$. – Alex Becker Mar 21 '12 at 0:23
Oh! Ok thank you, that made it much clearer. Thank you very much! – roboguy12 Mar 21 '12 at 0:26

If $f(a)=f(b)$ for $a \ne b$, choose $c$ such that $f(c)=a$ and $d$ such that $f(d)=b$. You can do this because $f$ is onto. Then $f(f(f(c)))=f(f(f(d)))$ but $f(c) \ne f(d)$

-