Linear algebra 2: the basis where it only stretches

Change of basis, part 2: A = PDP⁻¹

math
linear-algebra
Published

November 20, 2026

Cover the right-hand column. Answer each question in your head, then look.

Part 1 ended with a matrix that turns most arrows but leaves two directions alone:

\[ A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix} \]

This part uses those two directions as the basis.

Arrows that don’t turn

Drag the tip of v. The orange arrow is Av, where A sends it.

Drag v around. Does Av usually point the same way as v? No. A turns most arrows.
Which arrows does it not turn? Those along (1, 1), and those along (−1, 1).
What does it do to them? Stretches them: by 3 along (1, 1), by 1 along (−1, 1).
What are they called? Eigenvectors. Eigen is German for “own”: each is A’s own arrow, keeping to its own line. Think “own arrow”.
And the 3 and the 1? Eigenvalues: how much each one stretches.

To check your understanding, here is the matrix Lay opens 5.1 with (Example 1):

\[ \begin{pmatrix} 3 & -2 \\ 1 & 0 \end{pmatrix} \]

Where does it send v = (2, 1)? To (4, 2) = 2v. An eigenvector, with eigenvalue 2. Lay’s words: it only “stretches” v.
And u = (−1, 1)? To (−5, −1). Turned: not an eigenvector.

What does A do to x?

Call the two eigenvectors v₁ = (1, 1) and v₂ = (−1, 1), and take one arrow to work with, x = (2, 0): its coordinates in the standard basis.

Where does A send x? We could multiply A by x. Instead we’ll take three easy steps.

Step 1. Translate x into v’s.

What are x’s coordinates in v’s? (1, −1), because 1·v₁ − 1·v₂ = (1, 1) − (−1, 1) = (2, 0).

Step 2. Stretch.

What does A do to v₁? Stretches it by 3.
And to v₂? Leaves it as it is: a stretch by 1.
So what are Ax’s coordinates in v’s? (3·1, 1·(−1)) = (3, −1).

Step 3. Translate back into the usual grid.

What is (3, −1) in v’s, in the usual grid? 3·v₁ − 1·v₂ = (3, 3) − (−1, 1) = (4, 2).
Check the long way: what is A(2, 0)? (2·2 + 1·0, 1·2 + 2·0) = (4, 2). The same.

Naming the steps

We did the three steps with numbers. Each one is also a matrix. Name them, and A fits on one line.

Step 3 translates from v’s into the usual grid. Have we met that? Yes: part 1’s change-of-coordinates matrix, P. Its columns are v₁ and v₂.
Step 1 goes the other way. What is it? P undone. Call it P⁻¹.

\[ P^{-1} = \begin{pmatrix} \tfrac12 & \tfrac12 \\ -\tfrac12 & \tfrac12 \end{pmatrix}\qquad P^{-1}\begin{pmatrix} 2 \\ 0 \end{pmatrix} = \begin{pmatrix} \tfrac12\cdot 2 + \tfrac12\cdot 0 \\ -\tfrac12\cdot 2 + \tfrac12\cdot 0 \end{pmatrix} = \begin{pmatrix} 1 \\ -1 \end{pmatrix} \]

Does it undo P? Yes. P⁻¹ takes (2, 0) to (1, −1), and P takes (1, −1) back to (2, 0).
Why the −1? As 3⁻¹ = ⅓ undoes multiplying by 3. Say “P inverse”.
Step 2 only stretches. What is it? D, a matrix with the eigenvalues on its diagonal and zeros elsewhere: a diagonal matrix.

\[ P = \begin{pmatrix} {\color{#7570B3}1} & {\color{#D95F02}-1} \\ {\color{#7570B3}1} & {\color{#D95F02}1} \end{pmatrix}\qquad D = \begin{pmatrix} 3 & 0 \\ 0 & 1 \end{pmatrix}\qquad A = P\,D\,P^{-1} \]

Why is P⁻¹ on the right, when it’s step 1? A matrix acts on what’s to its right, so P D P⁻¹ x is read right to left: P⁻¹ first, P last.

Writing A = P D P⁻¹ is called diagonalizing A (Lay 5.3).

NoteThe Law of Stretching

Use a matrix’s eigenvectors as the basis, and the matrix only stretches. A = P D P⁻¹: find the coordinates, stretch them, change back.

Why anyone bothers

What is A applied ten times to x? Ten matrix multiplications, if done the long way.
And in v’s? Stretch the coordinates ten times: (3¹⁰·1, 1¹⁰·(−1)) = (59049, −1).
So what is A¹⁰x? 59049·(1, 1) − 1·(−1, 1) = (59050, 59048).
How much work was that? One look-up, one power of each number, one translation back.

Lay’s 5.3, Example 2 does the same with another matrix:

\[ \begin{pmatrix} 7 & 2 \\ -4 & 1 \end{pmatrix} = P\,D\,P^{-1}\qquad P = \begin{pmatrix} 1 & 1 \\ -1 & -2 \end{pmatrix}\qquad D = \begin{pmatrix} 5 & 0 \\ 0 & 3 \end{pmatrix} \]

What is its k-th power? P Dᵏ P⁻¹. Only the 5ᵏ and the 3ᵏ change.

Same map, new matrix

Part 1 changed the basis and kept the arrow. Now we change the basis and keep the map.

In the usual grid, A’s matrix is (2 1; 1 2). In v’s, what is it? D = (3 0; 0 1). In v’s, A only stretches.
Are A and D two different maps? No. One map, written in two bases. Lay calls such matrices similar.
What changed between them? The entries.
What didn’t? What belongs to the map itself: the eigenvalues, 3 and 1, for a start.

One more number belongs to the map: how much it scales area.

What does A do to the unit square? Makes the parallelogram on (2, 1) and (1, 2), of area 2·2 − 1·1 = 3.
And D? Makes a 3 × 1 rectangle: area 3. The same, because it’s the same map.
What is that number called? The determinant. For (a b; c d), det = ad − bc.

To check your understanding: a friend says A’s eigenvalues are its diagonal entries, 2 and 2. Are they right? Decide before you read on.

Is 2 an eigenvalue of A? No. A’s eigenvalues are 3 and 1.
When are the diagonal entries the eigenvalues? When the matrix is diagonal, like D. Entries depend on the basis; eigenvalues don’t.
NoteThe Law of Invariance

A change of basis changes a matrix’s entries, not the map. What belongs to the map survives it: its eigenvalues, and its determinant.

Finding the eigenvalues yourself

So far, 3 and 1 were handed to you. Here is where they come from. I is the identity, (1 0; 0 1), the matrix that changes nothing.

If v is an eigenvector with eigenvalue λ, what does A − λI do to v? Av − λv = λv − λv = 0. It flattens v to 0.
A matrix that flattens an arrow to 0 squashes the square onto a line. What area is left? 0. So det(A − λI) = 0.
For our A, what is A − λI? (2−λ 1; 1 2−λ), so det(A − λI) = (2 − λ)² − 1.
When is (2 − λ)² − 1 = 0? When 2 − λ = 1 or −1: λ = 1 or λ = 3.
Check λ = 3. A − 3I = (−1 1; 1 −1) sends (1, 1) to (0, 0): the eigenvector, flattened.

det(A − λI) = 0 is Lay’s characteristic equation (5.2).

Not every matrix is so kind

\[ S = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} \]

What is S(1, 0)? (1, 0). Not turned.
What is S(0, 1)? (1, 1). Turned.
Which arrows does S not turn? Only those along (1, 0). One line.
How many basis vectors does a flat page need? Two.
So can we write S = P D P⁻¹? No. There aren’t enough eigenvectors.
Look back at A’s v₁ = (1, 1) and v₂ = (−1, 1). Notice anything? They are perpendicular.
Is that luck? No. A is symmetric: it is its own mirror across the diagonal. That is part 3.
And what about S? Use two different bases, one for the arrow going in and one for the arrow coming out. That is SVD, part 4.

In Lay

Section and example numbers from [Lay16].

Here Lay
own arrows eigenvectors (5.1)
how much each stretches eigenvalues (5.1)
A = P D P⁻¹ diagonalization; the Diagonalization Theorem (5.3)
A¹⁰x by stretching powers, Aᵏ = P Dᵏ P⁻¹ (5.3)
P⁻¹ the inverse matrix (2.2)
S has too few eigenvectors S is not diagonalizable (5.3)
A and D: one map, two matrices similar matrices; same eigenvalues, 5.2 Theorem 4
area scale, ad − bc the determinant; area = |det A|, 3.3 Theorem 9
det(A − λI) = 0 the characteristic equation (5.2)