I need to find all Mobius transforms $f(z)=\frac{Az+B}{Cz+D},\text{ } A,B,C,D \in \mathbb{C}$ which map real numbers to real numbers and imaginary numbers to imaginary numbers. That is if $z \in \mathbb{R}$ then $f(z) \in \mathbb{R}$ and if $z \in i\mathbb{R}$ then $f(z) \in i\mathbb{R}$.
So far, I have considered the case where $f(i) = -i$ and $f(1)=-1$. The first of these expressions results in the conditions that $A=-D,B=C$ while the second results in $B=0$, hence $f(z) = -z$ as expected. But I am not sure how to generalize this.
Here is a possible strategy:
So there are exactly two possibilities:
Finally show that $f(z) = Az$ in the first case, and $f(z) = A/z$ in the second case, with $A \ne 0$.
Remark: Here, in the context of Möbius transformations, I have assumed that $f$ preserves the “extended real axis” $\Bbb R \cup \{ \infty \}$ and the “extended imaginary axis.” With the more strict assumption that $f(\Bbb R) \subset \Bbb R$ and $f(i\Bbb R) \subset i\Bbb R$ only the first case is possible, i.e. $f$ is linear.