Question Statement:
Let $f:[0,1]\rightarrow [0,1]$ be continious such that $f(0)=0$ and $f(1)=1$ and $f(f(x))=x, \forall x\in [0,1]$. Prove that $f(x)=x, \forall x\in [0,1]$.
My attempt:
Consider $f(f(x))=x$. Since the RHS is injective then $f(f(x))$ must be injective. Hence $f(x)$ must be injective. Since $f(x)$ is continuous and injective, then by the Continious Inverse theorem, $f^{-1}$ is well defined as well as continuous and surjective. Since $f^{-1}$ is defined, this implies that $f$ is unique. And since $f(x)=x$ satisfies the conditions, it must be the unique solution, hence $f(x)=x$.
However, I am not sure of the bold part. I am not really sure how I would prove that.