---
title: "Symmetric Matrices and the Spectral Theorem"
description: "A real symmetric matrix has real eigenvalues and an orthonormal eigenbasis. That single fact is behind quadratic forms, covariance matrices and principal axes."
canonical: https://lightmysky.com/learn/mathematics/symmetric-matrices-and-the-spectral-theorem-mt_sdQv4m7Nbk
source: https://lightmysky.com/learn/mathematics/symmetric-matrices-and-the-spectral-theorem-mt_sdQv4m7Nbk.md
retrieved: 2026-11-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Symmetric Matrices and the Spectral Theorem

A real symmetric matrix has real eigenvalues and an orthonormal eigenbasis. That single fact is behind quadratic forms, covariance matrices and principal axes.

Subject: Mathematics · Area: Linear Algebra · Ages 20 to 21
Page: https://lightmysky.com/learn/mathematics/symmetric-matrices-and-the-spectral-theorem-mt_sdQv4m7Nbk

## Ready when they can

- Diagonalise a symmetric matrix with an orthogonal matrix
- Classify a quadratic form from the signs of its eigenvalues
- Explain why symmetry forces eigenvectors for distinct eigenvalues to be orthogonal

## Lesson: Symmetric matrices and their perpendicular axes

A real square matrix is symmetric if A^T = A; T means transpose. The spectral theorem gives real eigenvalues and a complete orthonormal eigenbasis. For n-by-n A, put n unit eigenvectors in square Q and matching eigenvalues in diagonal D. Check Q^T Q = I and AQ = QD using column lengths, pairwise dot products and Av. These checks give Q^T A Q = D and A = Q D Q^T. Here I is the identity, and Av = lambda v defines a nonzero eigenvector.

**Example.** For A = [[4, 1], [1, 4]], solve det(A - lambda I) = 0. In two dimensions the polynomial is lambda^2 - trace(A) lambda + det(A). Here it is lambda^2 - 8lambda + 15 = (lambda - 5)(lambda - 3). For 5, solve -x + y = 0; for 3, solve x + y = 0. Choose (1, 1) and (1, -1). Both have length sqrt(2). Divide each by sqrt(2) to form Q, and set D = diag(5, 3).

*(drawing: Q's columns have length one and dot product zero. Their matching eigenvalues form D.)*

Suppose Au = lambda u and Av = mu v. Symmetry gives (Au) dot v = u dot (Av), so lambda(u dot v) = mu(u dot v). Distinct eigenvalues therefore force u dot v = 0. Equal eigenvalues do not force this: for 3I, (1, 0) and (1, 1) are independent eigenvectors with dot product 1. Use Gram-Schmidt within each repeated eigenspace to choose an orthonormal basis.

For symmetric A = [[a, b], [b, c]], f(x, y) = [x, y]A[x, y]^T = ax^2 + 2bxy + cy^2. With x = Qz, a quadratic form becomes sum(lambda_i z_i^2). All positive eigenvalues mean positive definite; all negative mean negative definite. Both signs mean indefinite, a saddle in two variables. Nonnegative eigenvalues including zero give positive semidefinite with a flat direction. Reverse the signs for negative semidefinite.

*(drawing: Each eigenvalue multiplies a squared coordinate. Its sign determines that direction's contribution.)*

An orthogonal Q needs perpendicular columns of length one. A vector's length is sqrt(v1^2 + v2^2 + ...); divide by that length to normalise it. Perpendicular columns of lengths 3 and 4 give Q^T Q = diag(9, 16), not I. Rescaling an eigenvector leaves its eigenvalue unchanged. If you reorder Q's columns, reorder D's diagonal in the same way.

A real covariance matrix C is symmetric: swapping the variables leaves the centered products unchanged, so C_ij = C_ji. Its principal axes are lines spanned by eigenvectors. To test a pair of axes, check that their spanning vectors are perpendicular and each Cv is a scalar multiple of v. Normalising these vectors gives Q; put their eigenvalues in matching order in D. Repeated eigenvalues allow different orthonormal axes within that eigenspace.

Without symmetry, a real matrix need not have an eigenbasis. For B = [[1, 1], [0, 1]], the only eigenvalue is 1. Solving (B - I)v = 0 gives y = 0, so every eigenvector lies on the x-axis. A basis of the plane needs two independent vectors. This matrix has no eigenbasis and refutes the claim that every real square matrix has an orthonormal eigenbasis.

**Recap.** A real symmetric matrix has an orthonormal eigenbasis. Match Q's columns with D's eigenvalues; their signs classify the quadratic form.

*The lesson, practice questions and flashcards were written for this dataset.*

## Practice

14 questions on this page, each with its working shown.

## Needs first

- [The Gram-Schmidt Process](https://lightmysky.com/learn/mathematics/the-gram-schmidt-process-mt_nkp231EA_E)

## Optional connections

- [Eigenvalues and Eigenvectors](https://lightmysky.com/learn/mathematics/eigenvalues-and-eigenvectors-mt_TVqqaw11qa)

## Opens up

- [States as Vectors: Dirac Notation and the State Space](https://lightmysky.com/learn/science/states-as-vectors-dirac-notation-and-the-state-space-mt_9g0aNMxQ8M)
- [Hartree-Fock and What a Basis Set Decides](https://lightmysky.com/learn/science/hartree-fock-and-what-a-basis-set-decides-mt_EYSTCPuRNx)
- [Iterative Methods for Large Linear Systems](https://lightmysky.com/learn/mathematics/iterative-methods-for-large-linear-systems-mt_FKkxKYVGYJ)
- [Classifying Second-Order PDEs and What the Type Decides](https://lightmysky.com/learn/mathematics/classifying-second-order-pdes-and-what-the-type-decides-mt_hlQWbd1kzR)
- [Principal Components and Dimensionality Reduction](https://lightmysky.com/learn/computing/principal-components-and-dimensionality-reduction-mt_l-9XHg_ChZ)
- [Compact Self-Adjoint Operators and the Spectral Theorem](https://lightmysky.com/learn/mathematics/compact-self-adjoint-operators-and-the-spectral-theorem-mt_P_Jr9LWFQj)
- [Observables as Hermitian Operators and Their Spectra](https://lightmysky.com/learn/science/observables-as-hermitian-operators-and-their-spectra-mt_TXCN8uiWqs)
- [Degenerate Perturbation Theory and the Variational Method](https://lightmysky.com/learn/science/degenerate-perturbation-theory-and-the-variational-method-mt_uov0PZ8vqy)
- [First-Order Perturbation Theory](https://lightmysky.com/learn/science/first-order-perturbation-theory-mt_UsbiiQFOAt)
- [The Singular Value Decomposition](https://lightmysky.com/learn/mathematics/the-singular-value-decomposition-mt_UsUZbM9VRK)
