Solution (source code)

= Solution

The image is in the <unitary group>, since $(zU)^\dagger(zU)=\bar z z\,U^\dagger U=I$ for $z\in U(1)$ and $U\in SU(n)$. The <direct product of groups> has multiplication $(z,U)(w,V)=(zw,UV)$. Scalar <matrices> commute with every <matrix>, so
$$
\boxed{f\bigl((z,U)(w,V)\bigr)=zwUV=(zU)(wV)=f(z,U)f(w,V).}
$$
Thus $f$ is a <group homomorphism>; in particular $f(1,I)=I$.