Show that $f=$ identity Let $D$ be the closed unit disk in $\mathbb{C}$ and let $f:D\to D$ be a function such that:


*

*$f$ is equal to the identity function $\mathrm{Id}$ specifically on the unit circle ($\partial D$)

*$f$ is continuous on $D$

*$f\circ f=\mathrm{Id}$ on $D$


How do we show that $f=\mathrm{Id}$ on all of $D$?
 A: Anyways, the way I solved it was through some drawings I can't show, but can hopefully explain.
Assume $f$ is not the identity. In that case there has to be at least one pair of points (A, A') being mapped to each other by $f$, reason being that $f$ is its own inverse.
Draw a simple, closed curve s through A and A', touching the edge at exactly two points (B and B'). Now, draw a simple curve t from A, out to the unit circle, ending at a point C on the edge, NOT intersecting s. Apply $f$, and see that the two must now intersect, hence $f$ can't be a bijection, contradicting the third assumption, that f has an inverse.
Now, I do not really like this proof, as I suspect the result applies to at least any finite-dimensional closed ball. Alas, I haven't been able to prove that just yet.
A: Here is a proof using algebraic topology.
Let $f$ be a continuous involution of the closed disc $D$ which acts as the identity on the boundary circle $S$. Suppose $f(x) = y \ne x$ for some $x$ in the interior of $D$. Then, since $f \circ f = \textrm{id}$, $f$ acts on the complement of $\{ x, y \}$. So let $X = D \setminus \{ x, y \}$. It is not hard to show that $X$ is homotopy-equivalent to the wedge union of two circles $S^1 \vee S^1$ by a deformation retract, so we see that the fundamental group of $X$ is the free group on two generators.
Now, consider the homomorphism $f_* : \pi_1(X) \to \pi_1(X)$ induced by $f$. By functoriality, $f_*$ is also an involution. Let $a$ be the homotopy class of a simple closed curve going counterclockwise around $x$, and let $b$ be the homotopy class of a simple closed curve going counterclockwise around $y$. It is clear that $a$ and $b$ generate $\pi_1(X)$, and it can be shown that $f_*(a) = b$ and $f_*(b) = a$. Let $c$ be the homotopy class of the curve $\gamma$ going counterclockwise on the boundary circle $S$. We must have $f_*(c) = c$, since $f \circ \gamma = \gamma$. We may assume without loss of generality that $c = a b$. But $f_*$ is a homomorphism, so this implies $a b = b a$, which contradicts our earlier assertion that $a$ and $b$ generate $\pi_1(X)$ freely. 
We conclude that any continuous involution of $D$ fixing $S$ must in fact be the identity on all of $D$.
