Lemma
← All topics
Further mathematics

Matrices

Linear maps, systems of equations and transformations, organised.

Introduction

A matrix is a rectangular array of numbers. More importantly, it is a linear map written in coordinates. Rotations, reflections, enlargements and shears, systems of simultaneous equations, Markov chains and the computations behind computer graphics and machine learning are all expressed with matrices. On this page we develop matrix algebra, the determinant, inverses, the geometry of 2×22\times 2 transformations and a first look at eigenvalues.

Mathematical motivation

The system 2x+y=52x + y = 5, x−3y=−1x - 3y = -1 can be written as one equation, Ax=bA\mathbf{x} = \mathbf{b}:

(211−3)(xy)=(5−1).\begin{pmatrix}2 & 1\\1 & -3\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix} = \begin{pmatrix}5\\-1\end{pmatrix}.

If we could "divide by AA", we would have x=A−1b\mathbf{x} = A^{-1}\mathbf{b}. Making sense of A−1A^{-1}, and knowing when it exists, is the central question of this topic. The answer, det⁡A≠0\det A \neq 0, has a geometric meaning: AA must not flatten the plane.

Intuitive explanation

IntuitionColumns are where the basis vectors go

For a 2×22\times2 matrix AA, the first column is A(10)A\begin{pmatrix}1\\0\end{pmatrix} and the second is A(01)A\begin{pmatrix}0\\1\end{pmatrix}. Since AA is linear, knowing where i\mathbf{i} and j\mathbf{j} go determines everything: the unit square becomes the parallelogram spanned by the two columns.

  • ∣det⁡A∣|\det A| is the area of that parallelogram, i.e. the factor by which every area scales.
  • det⁡A<0\det A < 0 means orientation is reversed (a reflection is involved).
  • det⁡A=0\det A = 0 means the plane is squashed onto a line or a point, so information is lost and AA cannot be inverted.

Explore this live in the linear algebra visualiser.

Formal definitions

DefinitionMatrix product

If AA is m×nm\times n and BB is n×pn\times p, then ABAB is the m×pm\times p matrix with (AB)ij=∑k=1naikbkj(AB)_{ij} = \sum_{k=1}^n a_{ik}b_{kj}. The product is defined only when the inner dimensions agree.

DefinitionIdentity and inverse

InI_n has 11s on the diagonal and 00 elsewhere; AI=IA=AAI = IA = A. A square matrix AA is invertible (non-singular) if there is BB with AB=BA=IAB = BA = I. Then BB is unique and written A−1A^{-1}.

DefinitionDeterminant

det⁡(abcd)=ad−bc\det\begin{pmatrix}a & b\\c & d\end{pmatrix} = ad - bc. For 3×33\times 3, expand along the first row:

det⁡A=a11∣a22a23a32a33∣−a12∣a21a23a31a33∣+a13∣a21a22a31a32∣.\det A = a_{11}\begin{vmatrix}a_{22} & a_{23}\\a_{32} & a_{33}\end{vmatrix} - a_{12}\begin{vmatrix}a_{21} & a_{23}\\a_{31} & a_{33}\end{vmatrix} + a_{13}\begin{vmatrix}a_{21} & a_{22}\\a_{31} & a_{32}\end{vmatrix}.
DefinitionEigenvalues and eigenvectors

A non-zero vector v\mathbf{v} is an eigenvector of AA with eigenvalue λ\lambda if Av=λvA\mathbf{v} = \lambda\mathbf{v}. The eigenvalues are the roots of the characteristic equation det⁡(A−λI)=0\det(A - \lambda I) = 0.

Important notation

  • aija_{ij}: the entry in row ii, column jj. ATA^{T}: the transpose, (AT)ij=aji(A^T)_{ij} = a_{ji}.
  • det⁡A\det A, ∣A∣|A|: determinant. tr⁡A\operatorname{tr}A: trace (sum of diagonal entries).
  • 0\mathbf{0} or OO: the zero matrix. Mn(R)M_{n}(\mathbb{R}): real n×nn\times n matrices.

Important identities

IdentitiesAlgebraic rules
(AB)C=A(BC)A(B+C)=AB+AC(AB)−1=B−1A−1(AB)T=BTATdet⁡(AB)=det⁡Adet⁡Bdet⁡(A−1)=1det⁡Adet⁡(kA)=kndet⁡A (A is n×n)det⁡AT=det⁡A\begin{aligned} (AB)C &= A(BC) &\qquad A(B + C) &= AB + AC\\ (AB)^{-1} &= B^{-1}A^{-1} &\qquad (AB)^T &= B^TA^T\\ \det(AB) &= \det A\det B &\qquad \det(A^{-1}) &= \frac{1}{\det A}\\ \det(kA) &= k^n\det A\ (A \text{ is } n\times n) &\qquad \det A^T &= \det A \end{aligned}

In general AB≠BAAB \neq BA.

IdentitiesInverse of a 2×22\times2 matrix
(abcd)−1=1ad−bc(d−b−ca)(ad−bc≠0).\begin{pmatrix}a & b\\ c & d\end{pmatrix}^{-1} = \frac{1}{ad - bc}\begin{pmatrix}d & -b\\ -c & a\end{pmatrix}\quad (ad - bc \neq 0).
IdentitiesStandard transformations of the plane

Rotation by θ\theta anticlockwise: (cos⁡θ−sin⁡θsin⁡θcos⁡θ)\begin{pmatrix}\cos\theta & -\sin\theta\\ \sin\theta & \cos\theta\end{pmatrix}. Reflection in y=xy = x: (0110)\begin{pmatrix}0 & 1\\ 1 & 0\end{pmatrix}. Enlargement scale kk: kIkI. Shear parallel to the xx-axis: (1k01)\begin{pmatrix}1 & k\\0 & 1\end{pmatrix}.

Theorems and propositions

TheoremInvertibility criterion

A square matrix AA is invertible if and only if det⁡A≠0\det A \neq 0. Equivalently, Ax=0A\mathbf{x} = \mathbf{0} has only the solution x=0\mathbf{x} = \mathbf{0}, and Ax=bA\mathbf{x} = \mathbf{b} has a unique solution for every b\mathbf{b}.

TheoremMultiplicativity of the determinant

For square matrices of the same size, det⁡(AB)=det⁡A det⁡B\det(AB) = \det A\,\det B.

TheoremCayley–Hamilton (2×22\times 2)

Every 2×22\times2 matrix satisfies its characteristic equation: A2−(tr⁡A)A+(det⁡A)I=OA^2 - (\operatorname{tr}A)A + (\det A)I = O.

TheoremDiagonalisation

If an n×nn\times n matrix AA has nn linearly independent eigenvectors forming the columns of PP, with eigenvalues on the diagonal of DD, then A=PDP−1A = PDP^{-1}, and Ak=PDkP−1A^k = PD^kP^{-1}.

Proofs of important results

Proof(AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}

(AB)(B−1A−1)=A(BB−1)A−1=AIA−1=AA−1=I(AB)(B^{-1}A^{-1}) = A(BB^{-1})A^{-1} = AIA^{-1} = AA^{-1} = I, and similarly (B−1A−1)(AB)=I(B^{-1}A^{-1})(AB) = I. Since inverses are unique, the result follows.

∎
ProofThe 2×22\times 2 inverse formula

Directly, (abcd)(d−b−ca)=(ad−bc00ad−bc)=(ad−bc)I\begin{pmatrix}a & b\\c & d\end{pmatrix}\begin{pmatrix}d & -b\\-c & a\end{pmatrix} = \begin{pmatrix}ad - bc & 0\\0 & ad - bc\end{pmatrix} = (ad - bc)I. Dividing by ad−bc≠0ad - bc \neq 0 gives the inverse. If ad−bc=0ad - bc = 0 there is no inverse, since otherwise 1=det⁡I=det⁡Adet⁡A−1=01 = \det I = \det A\det A^{-1} = 0.

∎
ProofCayley–Hamilton for 2×22\times 2

With A=(abcd)A = \begin{pmatrix}a & b\\c & d\end{pmatrix}, A2=(a2+bcb(a+d)c(a+d)d2+bc)A^2 = \begin{pmatrix}a^2 + bc & b(a+d)\\ c(a + d) & d^2 + bc\end{pmatrix} and (a+d)A=(a2+adb(a+d)c(a+d)ad+d2)(a + d)A = \begin{pmatrix}a^2 + ad & b(a + d)\\ c(a + d) & ad + d^2\end{pmatrix}. Subtracting gives (bc−ad00bc−ad)=−(det⁡A)I\begin{pmatrix}bc - ad & 0\\0 & bc - ad\end{pmatrix} = -(\det A)I.

∎
ProofA one-sided inverse is automatically two-sided

Suppose AA and BB are 2×22\times2 with BA=IBA = I. Then det⁡Bdet⁡A=det⁡I=1\det B\det A = \det I = 1, so det⁡A≠0\det A \ne 0 and A−1A^{-1} exists by the formula. Now B=B(AA−1)=(BA)A−1=A−1B = B(AA^{-1}) = (BA)A^{-1} = A^{-1}, so AB=IAB = I as well. The same argument works for n×nn\times n matrices once you know det⁡(BA)=det⁡Bdet⁡A\det(BA) = \det B\det A in general (proved in the first university section below). It fails in infinite dimensions: on infinite sequences, "shift left" undoes "shift right" but not the other way round.

∎
ProofEigenvectors for distinct eigenvalues are independent

Let Au=λuA\mathbf u = \lambda\mathbf u and Aw=μwA\mathbf w = \mu\mathbf w with λ≠μ\lambda \ne \mu and u,w≠0\mathbf u, \mathbf w \ne \mathbf 0. Suppose αu+βw=0\alpha\mathbf u + \beta\mathbf w = \mathbf 0. Applying AA gives αλu+βμw=0\alpha\lambda\mathbf u + \beta\mu\mathbf w = \mathbf 0; subtracting λ\lambda times the first equation leaves β(μ−λ)w=0\beta(\mu - \lambda)\mathbf w = \mathbf 0, so β=0\beta = 0, and then α=0\alpha = 0. So u\mathbf u and w\mathbf w are independent, the matrix P=(u w)P = (\mathbf u\ \mathbf w) is invertible, and A=PDP−1A = PDP^{-1}. A 2×22\times2 matrix with distinct eigenvalues is always diagonalisable (Q41, Q44, Q49, Q54). With a repeated eigenvalue it may not be: the shear in Q26 has only one eigenvector direction.

∎
ProofInvariant lines that miss the origin

A line r=a+td\mathbf r = \mathbf a + t\mathbf d is invariant under AA when its image Aa+tAdA\mathbf a + tA\mathbf d is the same line. That needs AdA\mathbf d parallel to d\mathbf d, so the direction is still an eigenvector, say Ad=λdA\mathbf d = \lambda\mathbf d, and it needs Aa−aA\mathbf a - \mathbf a to be parallel to d\mathbf d. Suppose AA has a second eigenvector e\mathbf e with eigenvalue μ\mu, and write a=αd+βe\mathbf a = \alpha\mathbf d + \beta\mathbf e. Then (A−I)a=α(λ−1)d+β(μ−1)e(A - I)\mathbf a = \alpha(\lambda - 1)\mathbf d + \beta(\mu - 1)\mathbf e, which is parallel to d\mathbf d iff β(μ−1)=0\beta(\mu - 1) = 0.

  • If μ≠1\mu \ne 1, then β=0\beta = 0: the only invariant line in direction d\mathbf d is the one through OO.
  • If μ=1\mu = 1, every line in direction d\mathbf d is invariant. For example (2001)\begin{pmatrix}2 & 0\\0 & 1\end{pmatrix} (a stretch parallel to the xx-axis) maps every line y=cy = c to itself.

A shear (1k01)\begin{pmatrix}1 & k\\0 & 1\end{pmatrix} has only one eigenvector direction, d=i\mathbf d = \mathbf i, but (A−I)a=(ka2,0)(A - I)\mathbf a = (ka_2, 0) is always parallel to i\mathbf i, so again every line y=cy = c is invariant.

∎

Step-by-step derivations

Finding eigenvalues and eigenvectors

For A=(4123)A = \begin{pmatrix}4 & 1\\ 2 & 3\end{pmatrix}:

det⁡(A−λI)=(4−λ)(3−λ)−2=λ2−7λ+10=(λ−2)(λ−5).\det(A - \lambda I) = (4 - \lambda)(3 - \lambda) - 2 = \lambda^2 - 7\lambda + 10 = (\lambda - 2)(\lambda - 5).

For λ=5\lambda = 5: (A−5I)v=0(A - 5I)\mathbf v = \mathbf 0 gives −x+y=0-x + y = 0, so v=(11)\mathbf v = \begin{pmatrix}1\\1\end{pmatrix}. For λ=2\lambda = 2: 2x+y=02x + y = 0, so v=(1−2)\mathbf v = \begin{pmatrix}1\\-2\end{pmatrix}.

Check: trace =7=2+5= 7 = 2 + 5 and determinant =10=2×5= 10 = 2\times5. These two quick checks catch most arithmetic slips.

Invariant lines

A line through the origin is mapped to itself exactly when its direction is an eigenvector (with a nonzero eigenvalue). For the matrix above, y=xy = x and y=−2xy = -2x are invariant lines.

Worked examples

ExampleComposition order

"Rotate by 90°90° then reflect in the xx-axis" is RQRQ where QQ is the rotation, because the transformation applied first sits on the right:

(100−1)(0−110)=(0−1−10),\begin{pmatrix}1 & 0\\0 & -1\end{pmatrix}\begin{pmatrix}0 & -1\\1 & 0\end{pmatrix} = \begin{pmatrix}0 & -1\\-1 & 0\end{pmatrix},

which is reflection in y=−xy = -x.

ExampleSolving a system with the inverse

For (211−3)x=(5−1)\begin{pmatrix}2 & 1\\1 & -3\end{pmatrix}\mathbf x = \begin{pmatrix}5\\-1\end{pmatrix}: det⁡=−7\det = -7, so x=−17(−3−1−12)(5−1)=−17(−14−7)=(21)\mathbf x = -\frac17\begin{pmatrix}-3 & -1\\-1 & 2\end{pmatrix}\begin{pmatrix}5\\-1\end{pmatrix} = -\frac17\begin{pmatrix}-14\\-7\end{pmatrix} = \begin{pmatrix}2\\1\end{pmatrix}.

Common mistakes

Common mistakeAssuming AB=BAAB = BA

Matrix multiplication is not commutative. Expanding (A+B)2=A2+AB+BA+B2(A + B)^2 = A^2 + AB + BA + B^2, not A2+2AB+B2A^2 + 2AB + B^2.

Common mistakeReversing the order of an inverse

(AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}. To undo "put on socks, then shoes", you take off the shoes first.

Common mistakeDividing by a matrix

AB=ACAB = AC does not imply B=CB = C unless AA is invertible. For example, with A=(1000)A = \begin{pmatrix}1&0\\0&0\end{pmatrix}, any B,CB, C that differ only in their second row give AB=ACAB = AC.

Common mistakedet⁡(A+B)=det⁡A+det⁡B\det(A + B) = \det A + \det B

This is false in general: det⁡(I+I)=4≠2\det(I + I) = 4 \neq 2.

Applications

  • Computer graphics: every rotation, scaling and projection is a matrix (with 4×44\times4 homogeneous coordinates for 3D).
  • Systems of equations: in engineering, economics and circuits.
  • Markov chains: transition matrices; long-run behaviour comes from the eigenvalue 11.
  • Population models (Leslie matrices) and coupled ODEs x˙=Ax\dot{\mathbf x} = A\mathbf x, solved via eigenvalues.
  • Data science: principal component analysis and least squares are matrix decompositions.

Connections to other topics

Summary

  • Multiply rows by columns; the inner dimensions must match; AB≠BAAB \neq BA in general.
  • det⁡A\det A is the signed area or volume scale factor; A−1A^{-1} exists iff det⁡A≠0\det A \neq 0.
  • 2×22\times2 inverse: swap aa and dd, negate bb and cc, divide by det⁡\det.
  • The columns of AA are the images of the basis vectors; transformations compose right to left.
  • Eigenvectors give the invariant directions; det⁡(A−λI)=0\det(A - \lambda I) = 0 gives the eigenvalues.
Beyond the specification

University-level ideas and the deeper mathematics behind this topic. Not needed for exams, but this is where the subject really opens up.

What the determinant really is (university)

The formula ad−bcad - bc and the cofactor expansion look arbitrary. They are not: the determinant is the only function with three natural properties.

TheoremCharacterisation of the determinant

There is exactly one function DD from n×nn\times n matrices to numbers that is

  1. linear in each column separately (with the other columns fixed),
  2. alternating: D(A)=0D(A) = 0 whenever two columns are equal, and
  3. normalised: D(I)=1D(I) = 1.

It is the determinant, and it is given by the Leibniz formula

det⁡A=∑σ∈Snsgn⁡(σ) aσ(1)1aσ(2)2⋯aσ(n)n,\det A = \sum_{\sigma \in S_n}\operatorname{sgn}(\sigma)\,a_{\sigma(1)1}a_{\sigma(2)2}\cdots a_{\sigma(n)n},

where SnS_n is the set of all n!n! permutations of {1,…,n}\{1, \dots, n\} and sgn⁡(σ)=±1\operatorname{sgn}(\sigma) = \pm1 according to whether σ\sigma is an even or odd number of swaps.

Geometrically, properties 1–3 say: the signed volume of the parallelepiped spanned by the columns scales when one edge is scaled, adds when one edge is split into two, vanishes when the box is flat, and is 11 for the unit cube.

ProofSketch

Alternating implies swapping two columns changes the sign: by linearity, 0=D(…,u+v,…,u+v,… )=D(…,u,…,v,… )+D(…,v,…,u,… )0 = D(\dots, \mathbf u + \mathbf v, \dots, \mathbf u + \mathbf v, \dots) = D(\dots, \mathbf u, \dots, \mathbf v, \dots) + D(\dots, \mathbf v, \dots, \mathbf u, \dots), the two other terms vanishing. Now write each column as ∑iaijei\sum_i a_{ij}\mathbf e_i and expand by linearity into nnn^n terms ai11⋯ainnD(ei1,…,ein)a_{i_11}\cdots a_{i_nn}D(\mathbf e_{i_1}, \dots, \mathbf e_{i_n}). Terms with a repeated index vanish; the rest have (i1,…,in)(i_1, \dots, i_n) a permutation σ\sigma, and sorting the columns back into order takes as many swaps as σ\sigma has, giving sgn⁡(σ)D(I)\operatorname{sgn}(\sigma)D(I). So DD is forced to be the Leibniz formula. Conversely one checks that the formula has properties 1–3.

∎

For n=2n = 2 the two permutations give a11a22−a21a12=ad−bca_{11}a_{22} - a_{21}a_{12} = ad - bc. For n=3n = 3 the six permutations give the six terms of the cofactor expansion.

Theoremdet⁡(AB)=det⁡A det⁡B\det(AB) = \det A\,\det B for all nn

Fix AA with det⁡A≠0\det A \ne 0 and define D(B)=det⁡(AB)/det⁡AD(B) = \det(AB)/\det A. The columns of ABAB are AA times the columns of BB, so DD is linear in each column of BB, alternating, and D(I)=1D(I) = 1. By uniqueness, D(B)=det⁡BD(B) = \det B. (If det⁡A=0\det A = 0, then ABAB also squashes space, and both sides are 00.)

This is the proof of Q42 that works in every dimension, with no algebra at all. The same uniqueness argument shows det⁡AT=det⁡A\det A^T = \det A, which is why everything said about columns holds for rows too.

Computing in practice. The Leibniz formula has n!n! terms, which is hopeless for n=20n = 20 (2.4×10182.4 \times 10^{18} terms). Row reduction is far faster: adding a multiple of one row to another does not change the determinant (property 1 plus property 2), so reduce to triangular form and multiply the diagonal entries. That takes about 13n3\frac13n^3 operations, the method used in Q57's check.

Rank, kernel and the shape of solution sets (university)

When det⁡A=0\det A = 0, the system Ax=bA\mathbf x = \mathbf b has either no solutions or infinitely many (Q33, Q48). Rank and kernel make this precise.

DefinitionImage, kernel and rank

For an m×nm\times n matrix AA, the image (column space) im⁡A={Ax}\operatorname{im}A = \{A\mathbf x\} is the span of the columns, and the kernel (null space) ker⁡A={x:Ax=0}\ker A = \{\mathbf x : A\mathbf x = \mathbf 0\}. The rank is dim⁡im⁡A\dim\operatorname{im}A, the number of independent columns; the nullity is dim⁡ker⁡A\dim\ker A.

TheoremRank–nullity
rank⁡A+dim⁡ker⁡A=n.\operatorname{rank}A + \dim\ker A = n.
Proof

Choose a basis k1,…,kr\mathbf k_1, \dots, \mathbf k_r of ker⁡A\ker A and extend it to a basis k1,…,kr,v1,…,vs\mathbf k_1, \dots, \mathbf k_r, \mathbf v_1, \dots, \mathbf v_s of Rn\mathbb R^n, so r+s=nr + s = n. Every AxA\mathbf x is a combination of Av1,…,AvsA\mathbf v_1, \dots, A\mathbf v_s (the AkiA\mathbf k_i are zero). These are independent: if ∑cjAvj=0\sum c_jA\mathbf v_j = \mathbf 0 then ∑cjvj∈ker⁡A\sum c_j\mathbf v_j \in \ker A, so it is a combination of the ki\mathbf k_i, and independence of the whole basis forces every cj=0c_j = 0. So rank⁡A=s=n−r\operatorname{rank}A = s = n - r. ■\blacksquare

∎

The dimensions lost in the kernel are exactly the dimensions missing from the image: "information destroyed" equals "room lost".

TheoremStructure of the solution set

Ax=bA\mathbf x = \mathbf b is solvable iff b∈im⁡A\mathbf b \in \operatorname{im}A, i.e. iff rank⁡(A∣b)=rank⁡A\operatorname{rank}(A \mid \mathbf b) = \operatorname{rank}A. If x0\mathbf x_0 is one solution, the full solution set is

x0+ker⁡A={x0+k:Ak=0},\mathbf x_0 + \ker A = \{\mathbf x_0 + \mathbf k : A\mathbf k = \mathbf 0\},

a point, line or plane parallel to the kernel.

For three equations in three unknowns, this classifies the configurations of three planes:

rank⁡A\operatorname{rank}Arank⁡(A∣b)\operatorname{rank}(A \mid \mathbf b)SolutionsPicture
3333one pointplanes meet at a point
2222a linesheaf (three planes through a common line)
2233nonetriangular prism, or two parallel planes cut by a third
1111a planeall three planes coincide
1122noneparallel planes, at least two distinct

In Q48 with k=3k = 3, rank⁡A=2\operatorname{rank}A = 2; the value m=5m = 5 makes the augmented rank 22 as well (a sheaf), and any other mm makes it 33 (a prism).

Linear algebra in one sentence: for a square matrix the following are equivalent: det⁡A≠0\det A \ne 0; AA is invertible; ker⁡A={0}\ker A = \{\mathbf 0\}; rank⁡A=n\operatorname{rank}A = n; the columns are a basis; 00 is not an eigenvalue; Ax=bA\mathbf x = \mathbf b has exactly one solution for every b\mathbf b.

Symmetric matrices and the spectral theorem (university)

The matrices in Q41, Q47 and Q54 were symmetric (AT=AA^T = A), and in each case the eigenvalues were real and the eigenvectors perpendicular. That is not a coincidence.

TheoremThe spectral theorem

If AA is a real symmetric n×nn\times n matrix, then all its eigenvalues are real, and there is an orthonormal basis of eigenvectors. Equivalently, A=QDQTA = QDQ^T with QQ orthogonal (QTQ=IQ^TQ = I) and DD diagonal.

ProofThe two key facts

Real eigenvalues. Let Av=λvA\mathbf v = \lambda\mathbf v with v∈Cn\mathbf v \in \mathbb C^n nonzero, and write vˉ\bar{\mathbf v} for the complex conjugate. Then vˉTAv=λ vˉTv=λ∑∣vi∣2\bar{\mathbf v}^TA\mathbf v = \lambda\,\bar{\mathbf v}^T\mathbf v = \lambda\sum|v_i|^2. Taking the conjugate transpose of this number, and using Aˉ=A=AT\bar A = A = A^T, gives the same number with λˉ\bar\lambda in place of λ\lambda. Since ∑∣vi∣2>0\sum|v_i|^2 > 0, λ=λˉ\lambda = \bar\lambda.

Perpendicular eigenvectors. If Au=λuA\mathbf u = \lambda\mathbf u and Aw=μwA\mathbf w = \mu\mathbf w with λ≠μ\lambda \ne \mu, then

λ u⋅w=(Au)⋅w=uTATw=uTAw=μ u⋅w,\lambda\,\mathbf u\cdot\mathbf w = (A\mathbf u)\cdot\mathbf w = \mathbf u^TA^T\mathbf w = \mathbf u^TA\mathbf w = \mu\,\mathbf u\cdot\mathbf w,

so (λ−μ) u⋅w=0(\lambda - \mu)\,\mathbf u\cdot\mathbf w = 0 and u⋅w=0\mathbf u\cdot\mathbf w = 0.

The full theorem (including repeated eigenvalues) follows by induction on nn: take one unit eigenvector q\mathbf q; symmetry means AA maps the plane (or hyperplane) perpendicular to q\mathbf q into itself, and AA restricted to it is again symmetric. ■\blacksquare

∎

Geometric meaning. Every symmetric matrix is a stretch along perpendicular axes: rotate to the eigenvector axes (QTQ^T), stretch by the eigenvalues (DD), rotate back (QQ). For M=(5445)M = \begin{pmatrix}5 & 4\\4 & 5\end{pmatrix} the axes are y=±xy = \pm x and the stretches are 99 and 11; the positive square root in Q54 just uses stretches of 33 and 11 along the same axes.

Quadratic forms. The curve 5x2+8xy+5y2=95x^2 + 8xy + 5y^2 = 9 is xTMx=9\mathbf x^TM\mathbf x = 9. In coordinates (X,Y)(X, Y) along the eigenvectors it becomes 9X2+Y2=99X^2 + Y^2 = 9: an ellipse with semi-axes 11 and 33, tilted at 45°45°. This "principal axes" method classifies every conic and quadric surface, finds the principal axes of inertia of a rigid body, and (as principal component analysis) finds the directions of greatest variation in a data set from its symmetric covariance matrix.

Beyond symmetry. For an arbitrary matrix, two generalisations survive. The singular value decomposition A=UΣVTA = U\Sigma V^T (with UU, VV orthogonal and Σ\Sigma diagonal with entries ≥0\ge 0) exists for every real matrix, even rectangular ones: every linear map is a rotation, a stretch along perpendicular axes, and another rotation. The Jordan normal form shows that every complex square matrix is similar to one that is diagonal except for some 11s just above the diagonal. The simplest non-diagonalisable example is the shear (1101)\begin{pmatrix}1 & 1\\0 & 1\end{pmatrix}, whose powers (Q56, Q59) grow like nn instead of geometrically.

Why does this work?

Why does this work?Why is the determinant the area scale factor?

The columns of a 2×22 \times 2 matrix are the images of (10)\binom10 and (01)\binom01, so the unit square maps to the parallelogram they span. Its area is ∣ad−bc∣|ad - bc| (base times height, or the cross product). Since linear maps scale every small square by the same factor, every area is scaled by ∣det⁡∣|\det|. The sign records whether orientation is reversed.

Beyond the syllabus

Beyond the syllabusGroups and representations

Rotation matrices Rθ=(cos⁡θ−sin⁡θsin⁡θcos⁡θ)R_\theta = \begin{pmatrix}\cos\theta & -\sin\theta\\\sin\theta&\cos\theta\end{pmatrix} satisfy RαRβ=Rα+βR_\alpha R_\beta = R_{\alpha + \beta}: the matrices form a group, SO(2)SO(2), behaving exactly like the unit complex numbers eiθe^{i\theta}. A representation of a group is a way of realising its elements as matrices so that composition becomes matrix multiplication. Representation theory classifies symmetries in chemistry (molecular vibrations), physics (particle families) and number theory.

Beyond the syllabusDiagonalisation and powers

If MM has nn independent eigenvectors, put them as the columns of PP; then M=PDP−1M = PDP^{-1} with DD diagonal (the eigenvalues), and Mn=PDnP−1M^n = PD^nP^{-1}. For example the Fibonacci matrix (1110)\begin{pmatrix}1&1\\1&0\end{pmatrix} has eigenvalues φ\varphi and ψ\psi, which gives Binet's formula for FnF_n.

Beyond the syllabusGoogle's PageRank

Rank web pages by the eigenvector of a huge matrix describing links: a page is important if important pages link to it. The ranking is the eigenvector with eigenvalue 11 of a stochastic matrix, found by repeatedly multiplying a vector by the matrix (power iteration).

Mathematical curiosities

Mathematical curiosityThe Cayley–Hamilton theorem

Every square matrix satisfies its own characteristic equation. For 2×22 \times 2: M2−(tr⁡M)M+(det⁡M)I=0M^2 - (\operatorname{tr}M)M + (\det M)I = 0. So M−1=(tr⁡M)I−Mdet⁡MM^{-1} = \frac{(\operatorname{tr}M)I - M}{\det M}.

Further exploration

Further explorationInvestigations
  • Find all 2×22 \times 2 real matrices with M2=IM^2 = I. Interpret them geometrically.
  • Show that the matrices (a−bba)\begin{pmatrix}a & -b\\ b & a\end{pmatrix} add and multiply exactly like a+bia + bi.

Reading pathway: Linear Algebra Done Right (Axler); Visual Group Theory (Carter).

Now practise60 questions from Very easy to Extreme →