Solution (source code)

= Solution
{c}

By the <spectral theorem for real symmetric matrices>, there is an <orthogonal matrix> $Q$ such that
$$
Q^TAQ=\operatorname{diag}(\lambda_1,\ldots,\lambda_n).
$$
For clarity, the diagonalization can also be justified recursively. The <characteristic polynomial> has a complex <root of a polynomial> by the <fundamental theorem of algebra>. By <4/b/ii> its <eigenvalue> is real; taking a nonzero real or imaginary part of an associated <eigenvector> in $\mathbb C^n$ gives a real <eigenvector>, which can be normalized. Its <orthogonal complement> is invariant, because $\langle Ax,z\rangle=\langle x,Az\rangle=\lambda\langle x,z\rangle=0$. Restriction to this <linear subspace> is again symmetric, and induction on <dimension> gives an <orthonormal basis> of <eigenvectors>.

All $\lambda_i\geq0$ by <4/b/ii>. The permitted invariance of <determinant> and <matrix trace> under <change of basis>, applied to the <diagonal matrix>, yields
$$
\boxed{\det A=\prod_{i=1}^n\lambda_i,\qquad
\operatorname{tr}A=\sum_{i=1}^n\lambda_i,\qquad\lambda_i\geq0.}
$$