If a continuous function f equals its inverse then there is x such that f(x)=x How do I prove that if $f$ is a continuous function on $\mathbb{R}$ and $f=f^{-1}$, then there is at least one $x$ such that $f(x)=x$? I understand that if $(a,f(a))$ is a point of the graph of $f$ then $(f(a),a)$ is a point of the graph too, and because $f$ is continuous the graph crosses the main diagonal. But what do I use to prove this?
 A: Suppose for some $c$ that $f(c) \ne c$. Without loss of generality suppose $f(c) > c$. Then $f(f(c)) = c < f(c)$. Now you can use the intermediate value theorem on the function $f(x) - x$ on the interval $[c, f(c)]$.
A: We can construct a compact interval that $f$ maps to itself and then apply Brouwer's fixed point theorem. 
For that end consider an interval $[a,b]$. Then if $f(a)=x$ and $f(b)=y$ you also have (by $f=f^{-1}$) that $x=f(a)$ and $b=f(y)$. Now let $$m=\min\{a,b,x,y\}\qquad \text{ and } \qquad M=\max\{a,b,x,y\}$$ and observe that 


*

*$f$ is continuous, 

*$[m, M]$ is compact and convex,

*$f$ maps $[m,M]$ to $[m,M]$.


Thus you can apply Brouwer's fixed point theorem and conclude that $f$ has a fixed point $x_0$ in $[m, M]$.
A: Another solution. Let $U = \{x | f(x) > x\}$, $V = \{x | f(x) < x\}$. Because $f$ is continuous, $U$ and $V$ are open. Furthermore, if for some $c$, $f(c) \ne c$, then $c$ belongs either to $U$ or $V$ and $f(c)$ belongs to the other set. Therefore $U$ and $V$ are disjoint, nonempty, and open. But $\mathbb{R}$ is connected so it isn't possible for $\mathbb{R} = U \cup V$. Therefore there must be some $x$ in $\mathbb{R} \setminus (U \cup V)$ and for this $x$, $f(x) = x$.
