Question: If $M$ is a $2 \times 2$ complex matrix with $|M|=1$, and $T_M(z)$ maps the upper half plane of $\mathbb{C}$ onto itself; show that $M$ is a real matrix.
My attempt: (Not sure if this is a valid statement) Since the boundary of the upper half plane is the real axis, the real axis would be mapped onto itself. So for all $x \in \mathbb{R}, T_M(x) \in \mathbb{R}$.
I let $M= \begin{bmatrix} a & b \\ c & d \end{bmatrix}$. Then setting $\frac{ax+b}{cx+d} \in \mathbb{R}$ I got $a$ and $b$ are scalar multiples of $c$ and $d$ respectively.
(Again Not sure if this is a valid statement) Similar by looking at the inverse $M= \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}$, $d$ and $b$ are scalar multiples of $c$ and $a$ respectively.
Therefore $a,b,c,d$ are scalar multiples of each other.
Hence $1=ad-bc=k(d^2)$ for some real $k$. So $d^2$ is real $\to$ $d$ is either real or purely imaginary. Same can be said for all $a,b,c$.
This means either $a,b,c,d$ are all purely real, or all purely imaginary.
I'm not sure how to proceed from here, but before that I'm not sure if my previous reasoning is valid in the first place.
Would appreciate any assistance.