Diagonalisation of symmetric matrices

Diagonalisation of symmetric matrices

Spec 6.8 · Edexcel International A Level Further Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • A matrix is symmetric if AT=A\mathbf{A}^T=\mathbf{A}; its eigenvalues are real.
  • Eigenvectors of a symmetric matrix for different eigenvalues are perpendicular.
  • A matrix P\mathbf{P} is orthogonal if PTP=I\mathbf{P}^T\mathbf{P}=\mathbf{I}, so P−1=PT\mathbf{P}^{-1}=\mathbf{P}^T; its columns are orthonormal.
  • Diagonalise with PTAP=D\mathbf{P}^T\mathbf{A}\mathbf{P}=\mathbf{D}: columns of P\mathbf{P} are unit eigenvectors, D\mathbf{D} holds the eigenvalues in the same order.
  • Check with the trace and determinant: tr⁡A=tr⁡D\operatorname{tr}\mathbf{A}=\operatorname{tr}\mathbf{D} and det⁡A=det⁡D\det\mathbf{A}=\det\mathbf{D}.

Symmetric matrices

They have real eigenvalues, and eigenvectors for different eigenvalues are perpendicular.

A square matrix is symmetric if AT=A\mathbf{A}^T=\mathbf{A}, so the entry in row ii, column jj equals the entry in row jj, column ii.

Symmetric matrices have two properties that make them special:

  • all their eigenvalues are real;
  • eigenvectors corresponding to different eigenvalues are perpendicular, i.e. their scalar product is 00.

Example: S=(3113)\mathbf{S}=\begin{pmatrix} 3 & 1 \\ 1 & 3 \end{pmatrix} has λ=4\lambda=4 with (11)\begin{pmatrix} 1 \\ 1 \end{pmatrix} and λ=2\lambda=2 with (1−1)\begin{pmatrix} 1 \\ -1 \end{pmatrix}, and (1)(1)+(1)(−1)=0(1)(1)+(1)(-1)=0.

λ = 4λ = 2OUV
The eigenvectors (1, 1) and (1, −1) of S meet at a right angle.

A symmetric matrix has eigenvector (2,1)T(2,1)^T for λ=5\lambda=5. Which could be an eigenvector for a different eigenvalue?

Orthogonal matrices

A matrix whose columns are orthonormal, so its inverse is its transpose.

A square matrix P\mathbf{P} is orthogonal if

PTP=I,soP−1=PT.\mathbf{P}^T\mathbf{P}=\mathbf{I},\quad\text{so}\quad\mathbf{P}^{-1}=\mathbf{P}^T.

Equivalently, the columns of P\mathbf{P} are orthonormal: each column has magnitude 11 and every pair of columns has scalar product 00. The same is true of the rows. Then det⁡P=±1\det\mathbf{P}=\pm1.

For example 12(11−11)\frac{1}{\sqrt2}\begin{pmatrix} 1 & 1 \\ -1 & 1 \end{pmatrix} is orthogonal: both columns have magnitude 122=1\frac{1}{\sqrt2}\sqrt2=1 and their scalar product is 12(1−1)=0\frac12(1-1)=0.

column 1, length 1column 2, length 1OAB
The columns of an orthogonal matrix are perpendicular unit vectors: (1/√2)(1, −1) and (1/√2)(1, 1)
  • Orthogonal P\mathbf{P}PTP=I\mathbf{P}^T\mathbf{P}=\mathbf{I}
  • Inverse P−1\mathbf{P}^{-1}PT\mathbf{P}^T

Which of these matrices is orthogonal?

Diagonalising a symmetric matrix

Find the eigenvalues, then the eigenvectors, normalise them, and use them as the columns of P\mathbf{P}.

For a symmetric matrix A\mathbf{A}, follow the four steps below. Then P\mathbf{P} is orthogonal and

PTAP=D.\mathbf{P}^T\mathbf{A}\mathbf{P}=\mathbf{D}.

Equivalently A=PDPT\mathbf{A}=\mathbf{P}\mathbf{D}\mathbf{P}^T, because P−1=PT\mathbf{P}^{-1}=\mathbf{P}^T.

  1. 1

    Eigenvalues

    Solve det⁡(A−λI)=0\det(\mathbf{A}-\lambda\mathbf{I})=0.

  2. 2

    Eigenvectors

    Solve (A−λI)x=0(\mathbf{A}-\lambda\mathbf{I})\mathbf{x}=\mathbf{0} for each λ\lambda.

  3. 3

    Normalise

    Divide each eigenvector by its magnitude.

  4. 4

    Build P and D

    Normalised eigenvectors go in the columns of P; the matching eigenvalues, in the same order, go on the diagonal of D.

The method

A symmetric matrix has eigenvalues 22 and 55. If the first column of P\mathbf{P} is the unit eigenvector for λ=5\lambda=5, what is D\mathbf{D}?

A worked 2×2 example

The eigenvectors are perpendicular, which is a built-in check on your working.

The matrix below is symmetric, so its eigenvectors will be perpendicular, as the two lines above show.

−4−3−2−11234−4−3−2−11234xy(2, 1)(1, −2)λ = 2: direction (2, 1)λ = −3: direction (1, −2)
The eigenvector directions of S = (1 2; 2 −2) are perpendicular: (2, 1) for λ = 2 and (1, −2) for λ = −3

Worked example

Diagonalise S=(122−2)\mathbf{S}=\begin{pmatrix} 1 & 2 \\ 2 & -2 \end{pmatrix}.

Normalise (1−2)\begin{pmatrix} 1 \\ -2 \end{pmatrix}.

A worked 3×3 example and checks

The same method gives three mutually perpendicular eigenvectors, and the trace and determinant give two quick checks.

The same method works for a 3×3 symmetric matrix; there are three mutually perpendicular eigenvectors.

Checks: the three eigenvectors are perpendicular, the trace of A\mathbf{A} equals the sum of the diagonal of D\mathbf{D}, and det⁡A=det⁡D\det\mathbf{A}=\det\mathbf{D} (since det⁡Pdet⁡PT=1\det\mathbf{P}\det\mathbf{P}^T=1).

  1. 1

    Find the eigenvalues

    Solve det(A − λI) = 0; check they sum to the trace.

  2. 2

    Find an eigenvector for each

    For distinct eigenvalues they are already perpendicular.

  3. 3

    Normalise each eigenvector

    Divide by its magnitude.

  4. 4

    Write P and D

    The unit eigenvectors are the columns of P; D has the eigenvalues in the same order.

  5. 5

    Check

    det A = det D, and P is orthogonal.

Orthogonal diagonalisation of a 3×3 symmetric matrix
  • tr⁡A\operatorname{tr}\mathbf{A}sum of the diagonal of D\mathbf{D}
  • det⁡A\det\mathbf{A}det⁡D\det\mathbf{D}

Worked example

Diagonalise A=(20−102−1−1−13)\mathbf{A}=\begin{pmatrix} 2 & 0 & -1 \\ 0 & 2 & -1 \\ -1 & -1 & 3 \end{pmatrix}, given that its eigenvalues are 11, 22 and 44.

A 3×33\times3 symmetric matrix has trace 99 and two eigenvalues 11 and 33. What is the third?

Try an exam question

The matrix S=(2112)\mathbf{S}=\begin{pmatrix}2&1\\1&2\end{pmatrix}. Find an orthogonal matrix P\mathbf{P} and a diagonal matrix D\mathbf{D} such that PTSP=D\mathbf{P}^T\mathbf{S}\mathbf{P}=\mathbf{D}.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

What are the eigenvalues of S\mathbf{S}?

1 mark, marked against the mark scheme

Revision notes