If for $f: \mathbb{R} \rightarrow \mathbb{R}$ $f(f(x))=x \quad \forall x \in \mathbb{R}$, can we say that the function is surjective?
I came across this problem while solving a different problem, and I think the answer should be yes, because all such real $x$ is getting mapped to by the function. So it should be surjective, however I'm not sure as I'm quite new in learning functions, so I want to verify my answer. Thank you.