37. Adv: normal matrices, spectral theorem in full generality

📖 Reading · 9 min
💡 Every code box below is live — edit it and hit Run.

§21.0 diagonalized symmetric matrices orthogonally. §21.1 extended this to Hermitian and unitary matrices separately. This closing lesson asks the sharper question directly: exactly which matrices admit an orthonormal eigenbasis? The answer is a single, checkable condition — and it turns out to include both symmetric/Hermitian and orthogonal/unitary matrices as special cases of one unified theorem.

Normal matrices

A (complex) matrix A is normal if it commutes with its own conjugate transpose:

AA^*=A^*A

(For real matrices, A^*=A^T, so this reads AA^T=A^TA.)

Every matrix this module has studied is normal:

  • Hermitian (A^*=A): AA^*=AA=A^*A ✓, trivially, since both sides are just A^2.
  • Unitary (A^*=A^{-1}, from A^*A=I): AA^*=AA^{-1}=I=A^{-1}A=A^*A ✓.
  • Skew-Hermitian (A^*=-A, not covered explicitly earlier but worth naming): AA^*=A(-A)=-A^2=(-A)A=A^*A ✓.

Normality is the common thread running through every special matrix this module has introduced — it isn't a fourth new category alongside the others, it's the single property all of them already had.

The general Spectral Theorem

Theorem. A matrix A has an orthonormal eigenbasis (i.e. A=U\Lambda U^* for unitary U and diagonal \Lambda, possibly complex) if and only if A is normal.

This is the sharp version of everything §21.0–21.1 built toward: §21.0's real symmetric case and §21.1's Hermitian/unitary cases are all just instances where the eigenvalues additionally happen to satisfy an extra constraint —

  • Hermitian \Rightarrow eigenvalues real (§21.1) — the strongest constraint among normal matrices.
  • Unitary \Rightarrow eigenvalues on the unit circle, |\lambda|=1 (since unitary matrices preserve length, §21.1, and A\vec v=\lambda\vec v forces \|\vec v\|=\|A\vec v\|=|\lambda|\,\|\vec v\|).
  • Normal (general) — eigenvalues can be any complex numbers, but the eigenbasis is still guaranteed orthonormal regardless.

What fails for non-normal matrices: §19.4's defective matrices (like the Jordan-block example \begin{pmatrix}3&1\\0&3\end{pmatrix}) are never normal — check directly: AA^T\neq A^TA for that matrix, and a defective matrix has no full eigenbasis at all (orthonormal or otherwise), consistent with the theorem's "if and only if."

Why normality is exactly the right condition

(Sketch, one direction only.) If A=U\Lambda U^* with U unitary, then AA^*=U\Lambda U^*U\bar\Lambda U^*=U\Lambda\bar\Lambda U^* (using U^*U=I), and similarly A^*A=U\bar\Lambda\Lambda U^*. Since \Lambda,\bar\Lambda are both diagonal, they commute (\Lambda\bar\Lambda=\bar\Lambda\Lambda, entrywise products don't care about order) — so AA^*=A^*A follows immediately. The converse (normal \Rightarrow orthonormal eigenbasis exists) is the harder direction, not shown here, but it's the genuinely new content the theorem adds.

Doing it in Python

import numpy as np

A_normal = np.array([[2., -3.], [3., 2.]])     # normal but neither symmetric nor orthogonal
A_defective = np.array([[3., 1.], [0., 3.]])    # from Section 19.4 -- not normal

for name, A in [("A_normal", A_normal), ("A_defective", A_defective)]:
    lhs = A @ A.T
    rhs = A.T @ A
    print(f"{name}: AA^T == A^TA: {np.allclose(lhs, rhs)}")
A_normal: AA^T == A^TA: True
A_defective: AA^T == A^TA: False

Confirming A_{\text{normal}} still has an orthonormal eigenbasis (with complex eigenvalues, since it's not symmetric):

import numpy as np

A = np.array([[2., -3.], [3., 2.]])
eigvals, eigvecs = np.linalg.eig(A)

print("eigenvalues:", [complex(round(v.real, 4), round(v.imag, 4)) for v in eigvals])

Q = eigvecs
gram = Q.conj().T @ Q
print("U* U == I:", bool(np.allclose(gram, np.eye(2))))
eigenvalues: [(2+3j), (2-3j)]
U* U == I: True

Worked example

Determine whether A=\begin{pmatrix}1&-1\\1&1\end{pmatrix} (a scaled rotation) is normal, without computing eigenvalues.

A^T=\begin{pmatrix}1&1\\-1&1\end{pmatrix}.

AA^T=\begin{pmatrix}1&-1\\1&1\end{pmatrix}\begin{pmatrix}1&1\\-1&1\end{pmatrix}=\begin{pmatrix}1+1&1-1\\1-1&1+1\end{pmatrix}=\begin{pmatrix}2&0\\0&2\end{pmatrix}

A^TA=\begin{pmatrix}1&1\\-1&1\end{pmatrix}\begin{pmatrix}1&-1\\1&1\end{pmatrix}=\begin{pmatrix}1+1&-1+1\\-1+1&1+1\end{pmatrix}=\begin{pmatrix}2&0\\0&2\end{pmatrix}

\boxed{AA^T=A^TA\ \Longrightarrow\ A\text{ is normal}}

Sanity check. A is \sqrt2 times a 45° rotation matrix (compare §18.2: \frac1{\sqrt2}A=\begin{pmatrix}\cos45°&-\sin45°\\\sin45°&\cos45°\end{pmatrix}) — a scaled rotation is neither symmetric nor orthogonal (its columns have length \sqrt2\neq1), yet it's still normal, confirming the general theorem catches genuinely new cases beyond §21.0–21.1's named categories. Its eigenvalues, by the classification above, should be complex with |\lambda|=\sqrt2 (matching the scale factor, not 1, since A isn't unitary) — consistent with AA^T=2I forcing every singular value (§21.4) to be \sqrt2.

Your turn

1. Is a diagonal matrix (real entries) always normal? Justify in one line.

2. True or false: every normal matrix is either symmetric or orthogonal.

3. A normal matrix has eigenvalue 3+4i. What can you conclude about |3+4i| if the matrix is additionally known to be unitary?

Solutions

1. Yes. Diagonal matrices commute with each other entrywise (products of diagonal matrices just multiply corresponding entries, in either order), and A^T is diagonal too when A is — so AA^T=A^TA automatically, with no further condition needed.

2. False. The worked example is a direct counterexample: a scaled (\sqrt2\times) rotation is normal but neither symmetric (A^T\neq A, visibly) nor orthogonal (A^TA=2I\neq I). Normal is a strictly broader category properly containing both, per this lesson's "common thread" framing — most normal matrices are neither.

3. |3+4i|=5=1 would have to hold, but doesn't — contradiction. If A is unitary, every eigenvalue must satisfy |\lambda|=1 (this lesson's classification). |3+4i|=\sqrt{9+16}=\sqrt{25}=5\neq1. So a unitary matrix cannot have 3+4i as an eigenvalue — this eigenvalue is only consistent with A being normal in general, not additionally unitary.

Check yourself in code

Check whether A=\begin{pmatrix}0&-2\\2&0\end{pmatrix} (a scaled 90° rotation) is normal, and find its eigenvalues.

Print exactly this:

normal: True
eigenvalues: [2j, -2j]
import numpy as np

A = np.array([[0., -2.], [2., 0.]])
print("normal:", bool(np.allclose(A @ A.T, A.T @ A)))
# print the eigenvalues via np.linalg.eigvals, as a plain list
import numpy as np

A = np.array([[0., -2.], [2., 0.]])
print("normal:", bool(np.allclose(A @ A.T, A.T @ A)))

eigvals = np.linalg.eigvals(A)
print("eigenvalues:", [complex(round(v.real, 4), round(v.imag, 4)) for v in eigvals])

A is normal if AA^*=A^*A — the single property Hermitian, unitary, and skew-Hermitian matrices all share, and the fully general Spectral Theorem says normality is exactly the condition for an orthonormal eigenbasis to exist, real symmetric matrices included as one special case among many.

This closes Module 21. Every decomposition here — Spectral, SVD — assumed exact arithmetic. Module 22 turns to the numerical side: how these decompositions get computed in practice, how sensitive they are to rounding error, and the handful of matrix factorizations every serious numerical library builds on.