Solution (source code)

= Solution

Write $U^*=\overline U^T$ for the <conjugate transpose>. Taking <determinants> in $U^*AU=A$ gives $|\det U|^2\det A=\det A$. Since the <Hermitian matrix> $A$ is invertible, \b[every such $U$ is invertible and $|\det U|=1$.] The identity belongs to $U_A$; if $U,V\in U_A$, then $(UV)^*A(UV)=V^*AV=A$; and multiplying $U^*AU=A$ by $(U^*)^{-1}$ and $U^{-1}$ gives $(U^{-1})^*AU^{-1}=A$. Associativity comes from <matrix multiplication>, so this is a <group>.

The <Hermitian form> $h_A(v,w)=v^*Aw$ obeys $h_A(Uv,Uw)=h_A(v,w)$ precisely when $U\in U_A$. Thus \b[$U_A$ is the group of linear isometries of this nondegenerate <Hermitian form>]; positivity of $A$ is unnecessary.

For $A=I$, $U$ is a <unitary matrix>. Here is a direct <diagonalization of a matrix> proof. Over $\mathbb C$, its <characteristic polynomial> has a root, giving a unit <eigenvector> $v$ with $Uv=\lambda v$. Preservation of the <inner product> gives $|\lambda|=1$. If $w\perp v$, then $\langle Uw,Uv\rangle=\langle w,v\rangle=0$, so $v^\perp$ is invariant. The restriction is again a <unitary matrix>. Induction on the <dimension> supplies an <orthonormal basis> of <eigenvectors>. In that <basis>, \b[$U$ is diagonal, with diagonal entries on the unit <circle>].