Let $f:[0,1] \to [0,1]$ be a continuous function such that $f \circ f=f$ on $[0,1]$ , then is it true that the set $\{x \in [0,1] : f(x)=x \}$ is a non-empty interval?
I can show that it is non-empty as for any $x\in [0,1]$,$f(f(x))=f(x)$ so every point of $f([0,1])$ is a fixed point. I think I can show that $\{x\in [0,1]:f(x)=x\}=f([0,1])$. But proving it is an interval is appearing difficult for me.
The set $\{x \in [0, 1]: f(x) = x\}$ is just the image of $f$,which is an interval by the intermediate value theorem.