Solution (source code)

= Solution

A matrix is <Hermitian matrix>[Hermitian] when $A^\dagger=A$, and <unitary matrix>[unitary] when $U^\dagger U=UU^\dagger=I$.

If $A\mathbf u=\lambda\mathbf u$ with $\mathbf u\ne0$, then
$$
\lambda\,\mathbf u^\dagger\mathbf u
=\mathbf u^\dagger A\mathbf u
=(\mathbf u^\dagger A\mathbf u)^*
=\lambda^*\mathbf u^\dagger\mathbf u,
$$
so every <eigenvalue> is real. If $A\mathbf u=\lambda\mathbf u$ and $A\mathbf v=\mu\mathbf v$, then
$$
\mu\mathbf u^\dagger\mathbf v
=\mathbf u^\dagger A\mathbf v
=(A\mathbf u)^\dagger\mathbf v
=\lambda\mathbf u^\dagger\mathbf v.
$$
Distinct eigenvalues therefore have <orthogonal vectors>[orthogonal eigenvectors].

The normalized eigenvectors form an <orthonormal basis>, so the matrix $U=(\mathbf u_1\ \cdots\ \mathbf u_n)$ satisfies $U^\dagger U=I$ and is unitary. With
$$
D=\operatorname{diag}(\lambda_1,\ldots,\lambda_n),
$$
the equations $A\mathbf u_j=\lambda_j\mathbf u_j$ say $AU=UD$, hence $A=UDU^\dagger$. This is the finite-dimensional <unitary diagonalization of a normal matrix>.

A unitary conjugate of an arbitrary <diagonal matrix> need not be Hermitian: $U=(1)$ and $D=(i)$ give $UDU^\dagger=(i)$. It is Hermitian exactly when all diagonal entries of $D$ are real.

For the displayed matrix, one valid decomposition is
$$
\boxed{
U=\begin{pmatrix}
 i/\sqrt2&0&-i/\sqrt2\\
 0&1&0\\
 1/\sqrt2&0&1/\sqrt2
\end{pmatrix},
\qquad
D=\operatorname{diag}(5,2,-1)}.
$$
The columns are orthonormal eigenvectors, so direct multiplication gives $UDU^\dagger=A$.