2.2 - Diagonalising a matrix

2.2 - Diagonalising a matrix

A matrix becomes especially simple when vectors are described using its eigendirections. You will build matched eigenvector and eigenvalue matrices, justify the factorisation A=QDQ−1\mathbf A=\mathbf Q\mathbf D\mathbf Q^{-1}, and use it to calculate powers and polynomial expressions efficiently.

Building Q and D

How could you calculate a high power without multiplying the original matrix over and over? For B=(3113)\mathbf B=\begin{pmatrix}3&1\\1&3\end{pmatrix}, the directions (1,1)T(1,1)^{\mathsf T} and (1,−1)T(1,-1)^{\mathsf T} are multiplied by 44 and 22. Repeating the transformation just repeats these two scalar multiplications.

Eigenvector matrix and diagonal matrix

Place independent eigenvectors in the columns of Q\mathbf Q. Put their corresponding eigenvalues, in the same order, down the diagonal of D\mathbf D. All other entries of D\mathbf D are zero.

For real distinct eigenvalues, the eigenvectors are independent, so Q−1\mathbf Q^{-1} exists. The columns form a basis: each vector has a unique expression as a linear combination of them.

For two dimensions, independence means the direction vectors are not parallel. In three dimensions, none can be expressed as a combination of the other two. A nonzero determinant of Q\mathbf Q checks independence directly.

Worked example 1: matching two columns

Question. Build Q\mathbf Q and D\mathbf D for B=(3113)\mathbf B=\begin{pmatrix}3&1\\1&3\end{pmatrix}, using eigenpairs 4,(1,1)T4,(1,1)^{\mathsf T} and 2,(1,−1)T2,(1,-1)^{\mathsf T}.

Plan. Place vectors in columns and their multipliers in the matching diagonal positions.

Q=(111−1),D=(4002).\mathbf Q=\begin{pmatrix}1&1\\1&-1\end{pmatrix},\qquad \mathbf D=\begin{pmatrix}4&0\\0&2\end{pmatrix}.

Since det⁡Q=−2≠0\det\mathbf Q=-2\ne0, the columns are independent.

Answer. The displayed Q,D\mathbf Q,\mathbf D form a matched pair, with
Q−1=12(111−1)\mathbf Q^{-1}=\tfrac12\begin{pmatrix}1&1\\1&-1\end{pmatrix}.

Check. Multiplication gives BQ=(424−2)=QD\mathbf B\mathbf Q=\begin{pmatrix}4&2\\4&-2\end{pmatrix}=\mathbf Q\mathbf D. Each column has received its own eigenvalue.

Now increase the dimension. The same column-matching rule works; a third eigenvector simply adds a third coordinate direction.

Worked example 2: matching three columns

Question. For A=(310130105)\mathbf A=\begin{pmatrix}3&1&0\\1&3&0\\1&0&5\end{pmatrix}, use the eigenpairs 2,(3,−3,−1)T2,(3,-3,-1)^{\mathsf T}, 4,(1,1,−1)T4,(1,1,-1)^{\mathsf T}, 5,(0,0,1)T5,(0,0,1)^{\mathsf T} to build Q\mathbf Q and D\mathbf D.

Plan. Use the stated order for both the columns and the diagonal.

Q=(310−310−1−11),D=(200040005).\mathbf Q=\begin{pmatrix}3&1&0\\-3&1&0\\-1&-1&1\end{pmatrix},\qquad \mathbf D=\begin{pmatrix}2&0&0\\0&4&0\\0&0&5\end{pmatrix}.

Expansion down the last column gives det⁡Q=3(1)−1(−3)=6≠0\det\mathbf Q=3(1)-1(-3)=6\ne0.

Answer. The displayed matrices are a matched pair and Q\mathbf Q is invertible.

Check. Direct multiplication gives

AQ=(640−640−2−45)=QD.\mathbf A\mathbf Q=\begin{pmatrix}6&4&0\\-6&4&0\\-2&-4&5\end{pmatrix} =\mathbf Q\mathbf D.

This verifies every pairing against the original matrix.

You may reorder the eigenvectors, but then reorder the diagonal in exactly the same way. You may also rescale each column by a nonzero constant; its eigenvalue stays the same.

Watch out

Eigenvectors go in columns, not rows. An all-zero column is never an eigenvector and would make Q\mathbf Q singular.

Match a deliberately reversed order.

The form Q D inverse Q

The column equations Aei=λiei\mathbf A\mathbf e_i=\lambda_i\mathbf e_i combine into AQ=QD\mathbf A\mathbf Q=\mathbf Q\mathbf D. Multiply on the right by Q−1\mathbf Q^{-1} to isolate A\mathbf A.

Diagonalisation

With eigenvectors in the columns of an invertible Q\mathbf Q, and corresponding eigenvalues in D\mathbf D,

AQ=QD,A=QDQ−1,Q−1AQ=D.\mathbf A\mathbf Q=\mathbf Q\mathbf D, \qquad \mathbf A=\mathbf Q\mathbf D\mathbf Q^{-1}, \qquad \mathbf Q^{-1}\mathbf A\mathbf Q=\mathbf D.

This is a diagonalisation of A\mathbf A. Not in the formula booklet: learn it.

Read the product from right to left when it acts on a vector. The inverse Q−1\mathbf Q^{-1} finds its coordinates along the eigenvector basis, D\mathbf D scales those coordinates separately, and Q\mathbf Q combines the resulting eigenvector contributions in ordinary coordinates.

Worked example 3: verifying the factorisation

Question. Verify B=QDQ−1\mathbf B=\mathbf Q\mathbf D\mathbf Q^{-1} for

B=(3113),Q=(111−1),D=(4002).\mathbf B=\begin{pmatrix}3&1\\1&3\end{pmatrix},\quad \mathbf Q=\begin{pmatrix}1&1\\1&-1\end{pmatrix},\quad \mathbf D=\begin{pmatrix}4&0\\0&2\end{pmatrix}.

Plan. Use the two-by-two inverse, then perform the products in their stated order.

QDQ−1=12(424−2)(111−1)=12(6226)=(3113).\begin{aligned} \mathbf Q\mathbf D\mathbf Q^{-1} &=\frac12\begin{pmatrix}4&2\\4&-2\end{pmatrix} \begin{pmatrix}1&1\\1&-1\end{pmatrix}\\ &=\frac12\begin{pmatrix}6&2\\2&6\end{pmatrix} =\begin{pmatrix}3&1\\1&3\end{pmatrix}. \end{aligned}

Answer. The product equals B\mathbf B, as required.

Check. For an arbitrary (x,y)T(x,y)^{\mathsf T}, Q−1\mathbf Q^{-1} gives ((x+y)/2,(x−y)/2)T((x+y)/2,(x-y)/2)^{\mathsf T}. Scaling by 4,24,2 and recombining gives (3x+y,x+3y)T(3x+y,x+3y)^{\mathsf T}, the original matrix's action on every vector.

For three dimensions the reason is unchanged. You can prove the factorisation from the column equations and use the inverse as a separate arithmetic check.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account