Solution
= Solution
On the branch through the identity,
$$
f(\theta)=\sqrt2\cos(\theta/2),\qquad
\frac{\sin\theta}{2f(\theta)}
=\frac1{\sqrt2}\sin(\theta/2).
$$
Direct calculation gives $M^\dagger M=I$ and $\det M=1$. Thus these matrices lie in
$$
\boxed{SU(2)\subset U(2),\qquad SU(2)\subset SL(2,\mathbb C)},
$$
providing the three requested matrix groups.