$f \circ g=g\circ f$. Prove that $f(a)=a$. $f, g: [0, 1] \to \mathbb{R}$ are continuous and $(f \circ g)(x) = (g \circ f)(x)$. How do I prove that there exists a number $a \in [0, 1]$ such that $f(a) = a$?
I don't get understand the question. How can $g\circ f$ be defined if $f: [0, 1] \to \mathbb{R}$?
Suppose that $f(0.5)=9$ then $(g \circ f)(0.5)$ isn't defined, right (since $g$ is defined on $[0,1]$ and $g$ is continuous)? 
I think this exercise is wrong; it doesn't make sense to me.
 A: Given that $f\circ g=g\circ f$ we infer that the output of each function is in the domain of the other, hence the image of both function is in $[0,1]$.
Now $f$ has both domain and range $[0,1]$ and it is continuous. Consider $h=x-f(x)$ then $h(0)\le 0$ and $h(1) \ge 0$. $h$ is continuous and hence it has a root $a$, where $h(a)=0$. Then $f(a)=a$.
A: I think you need some additional conditions: let $f(x)=g(x)=x-c; c \neq 0$, or $f(x)=x-2, g(x)=x-3. f\circ g =g \circ f =x-5$.
A: This doesn't seem to be true. 
Let $\mathrm{f}(x) := x+1$ and $\mathrm{g}(x):=x+2$. Clearly, $\mathrm{f}$ and $\mathrm{g}$ are both continuous; they are polynomials. The composite functions are given by
$$\begin{eqnarray*}
(\mathrm{f}\circ\mathrm{g})(x) &=& (x+2)+1 = x+3 \\ \\
 (\mathrm{g}\circ\mathrm{f})(x) &=& (x+1)+2 = x+3
\end{eqnarray*}$$
and so $\mathrm{f}\circ\mathrm{g} \equiv \mathrm{g}\circ\mathrm{f}$. (This holds for all $x \in \mathbb{R}$ and not just $0 \le x \le 1$.)
We claim that there exists $0 \le a \le 1$ for which $\mathrm{f}(a)=a$. This is impossible since
$$\mathrm{f}(a)=a \iff a+1=a \iff 1=0$$
Similarly, if we claim that there exists $0 \le b \le 1$ with $\mathrm{g}(b)=b$ then we get a contradiction.
$$\mathrm{g}(b)=b \iff b+2 = b \iff 2 = 0$$
