Solution (source code)

= Solution

Let $e_1,\ldots,e_d$ be the given <orthonormal basis>, with $Te_j=\lambda_je_j$. From the defining identity of the <adjoint operator>,
$$
\langle e_i,T^*e_j\rangle
=\langle Te_i,e_j\rangle
=\overline\lambda_i\delta_{ij}.
$$
These coordinates prove $T^*e_j=\overline\lambda_je_j$ without assuming a <matrix> formula. Therefore
$$
T^*Te_j=|\lambda_j|^2e_j=TT^*e_j
$$
for every <basis> vector. Thus $T$ is a <normal operator>, and
$$
\boxed{T^*T=TT^*,\qquad
T^*=T\ \Longleftrightarrow\ \lambda_j\in\mathbb R\text{ for every }j.}
$$
The condition of possessing an <orthonormal basis> of <eigenvectors> is already part of the hypothesis; real <eigenvalues> alone would not imply <self-adjointness> for an arbitrary <linear transformation>.