LINEAR ALGEBRA • EIGENVALUES & EIGENVECTORS

Similarity & Change of Basis — Similarity Transformations and Change of Basis

Learn how the same transformation looks different when you switch coordinate systems.

Historical Context & Motivation

Imagine you and a friend are describing the same park, but your friend uses a totally different map. The park hasn't changed—only the way you describe it has. That's the key idea behind similarity transformations and change of basis in linear algebra. These ideas let mathematicians describe the same operation using different coordinate systems. This topic is a central part of college-level Linear Algebra, typically studied after Calculus, and builds on familiarity with matrices, matrix multiplication, and the concept of a determinant.

Throughout history, mathematicians needed ways to simplify complicated matrix equations. They discovered that by switching to a smarter set of axes, a messy matrix could become neat and diagonal. This insight connects directly to eigenvalues and eigenvectors, which we'll explore in this lesson.

1750s
Euler and Coordinate Rotations
Leonhard Euler studied how rotating coordinate axes changes the way equations look, planting early seeds for change of basis.
1826
Cauchy Defines Eigenvalues
Augustin-Louis Cauchy introduced the idea of characteristic values (eigenvalues) for matrices, showing that certain directions stay unchanged under a transformation.
1850s
Cayley Formalizes Matrices
Arthur Cayley created the modern notation for matrices and matrix multiplication, making similarity transformations easy to write down as P⁻¹AP.
1900s–Today
Widespread Applications
Similarity and change of basis became core tools in physics (quantum mechanics), computer graphics (3D rotations), and data science (principal component analysis).

The central question is: if a matrix represents a transformation like stretching or rotating, can we find a different set of coordinates where that transformation looks as simple as possible? The answer is yes—and that's exactly what similarity transformations accomplish.

Core Principles & Definitions

Before we dive into formulas, let's nail down the key vocabulary. A basis is a set of direction arrows (vectors) that act like the axes on a graph. The standard basis in 2D is just the usual x-axis and y-axis. A change of basis means switching to a new set of axes. The transformation itself doesn't change—only the numbers we use to describe it.

Two important background tools used throughout this lesson: the determinant of a square matrix is a single number that measures how much the matrix scales areas (or volumes); for a 2×2 matrix [[a, b], [c, d]] it equals ad − bc. The inverse of a matrix P, written P⁻¹, is the matrix that 'undoes' P: multiplying P by P⁻¹ gives the identity matrix (the matrix equivalent of the number 1). A matrix has an inverse only when its determinant is not zero.

1

Basis

A collection of independent vectors that define a coordinate system. Think of them as your ruler and protractor for measuring positions.
2

Change-of-Basis Matrix (P)

A matrix whose columns are the new basis vectors. It translates coordinates from one system to another, like a language dictionary between two coordinate languages. P must have a nonzero determinant so that its inverse P⁻¹ exists.
3

Similar Matrices

Two matrices A and B are similar if B = P⁻¹AP for some matrix P whose inverse exists. They represent the same transformation but in different coordinate systems.
4

Eigenvalues Stay the Same

Similar matrices always share the same eigenvalues. Changing your viewpoint doesn't change the fundamental stretching or shrinking a transformation performs.
5

Diagonalization

The ultimate goal: find a basis of eigenvectors so that the matrix becomes diagonal. A diagonal matrix—one with zeros everywhere except the main diagonal—is the simplest possible description of the transformation.
KEY TAKEAWAY
Think of a shadow puppet show. The puppet (the transformation) is always the same shape. But depending on the angle of the flashlight (the basis), the shadow on the wall (the matrix) looks different. Similarity transformations just change the flashlight angle—never the puppet itself.

Visual Explanation — Two Bases, One Transformation

The diagram below shows a single linear transformation applied to a vector. On the left, we see the standard basis (the usual x- and y-axes). On the right, we see a new basis made from eigenvectors. Notice how the transformation matrix looks much simpler in the eigenvector basis—it becomes diagonal!

Left: the transformation matrix A in the standard basis has off-diagonal entries. Right: in the eigenvector basis, the same transformation becomes the diagonal matrix D, where the diagonal entries are the eigenvalues 2 and 3.

In the left panel, the matrix A = [[2, 1], [0, 3]] has an off-diagonal entry (the 1 in the top-right). That entry mixes the x- and y-directions together. In the right panel, after we change to the eigenvector basis, the same transformation becomes D = [[2, 0], [0, 3]]—a diagonal matrix. Each axis just gets stretched by its own eigenvalue, with no mixing at all. That's the power of choosing the right basis.

Mathematical Framework

Let's formalize what we saw in the diagram. Suppose A is a matrix describing a linear transformation in the standard basis. If we pick a new basis and organize those new basis vectors as columns of a matrix P, then the matrix describing the same transformation in the new basis is given by a formula called the similarity transformation.

SIMILARITY TRANSFORMATION
B = P⁻¹ A P
A = original matrix (standard basis), P = change-of-basis matrix (columns are new basis vectors, determinant ≠ 0), P⁻¹ = inverse of P (the matrix that 'undoes' P), B = matrix of the same transformation in the new basis.

When the new basis is made of eigenvectors, something beautiful happens. The resulting matrix B becomes diagonal. Its diagonal entries are the eigenvalues.

DIAGONALIZATION
D = P⁻¹ A P, where D = diag(λ₁, λ₂, …, λₙ)
D = diagonal matrix (zeros everywhere except the main diagonal), λ₁, λ₂, …, λₙ = eigenvalues of A, P = matrix whose columns are the corresponding eigenvectors.

A key fact about similar matrices is that they always share the same eigenvalues. Here is a brief sketch of why: the eigenvalues of a matrix M are found by solving det(M − λI) = 0, where det denotes the determinant and I is the identity matrix. For B = P⁻¹AP, one can show (using properties of determinants) that det(B − λI) = det(A − λI). Because the two expressions are equal, they have the same solutions, so A and B have identical eigenvalues.

💡 Why P⁻¹ A P and not just P A?
Multiplying by P on the right converts a vector from the new basis into the standard basis. Then A acts on it in the standard basis. Finally, multiplying by P⁻¹ converts the result back into the new basis. The three steps together—translate in, transform, translate out—are what make the similarity formula work.

Properties Preserved Under Similarity

One of the most important things about similar matrices is that they share many key properties. Changing the basis is like looking at a sculpture from a different angle—the sculpture's weight, height, and material stay the same even though it looks different. The following diagram and table show what is preserved and what can change.

The dashed circle groups all the properties that stay the same when two matrices are similar. Items outside the circle, such as individual matrix entries and specific eigenvectors, can change.
Similarity invariants vs. basis-dependent properties
PropertyPreserved?Why?
Eigenvalues✅ YesSame eigenvalue equation det(M − λI) = 0 for both matrices
Determinant✅ Yesdet(P⁻¹AP) = det(A) because det(P⁻¹)·det(P) = 1
Trace (sum of diagonal)✅ YesTrace equals the sum of eigenvalues
Rank✅ YesMultiplying by a matrix with nonzero determinant doesn't change rank
Individual entries❌ NoEntries depend on the basis chosen
Eigenvectors❌ No (coordinates change)The direction is the same, but its coordinates differ per basis

Worked Example — Diagonalizing a 2×2 Matrix

Let's walk through a complete example. We'll start with a matrix A, find its eigenvalues and eigenvectors, build the change-of-basis matrix P, and verify that P⁻¹AP gives us a diagonal matrix.

Diagonalize A = [[4, 1], [2, 3]]
1
Step 1 — Find the EigenvaluesEigenvalues are special scalars λ such that the matrix (A − λI) has zero determinant (meaning it 'squishes' space and has no inverse). For a 2×2 matrix [[a,b],[c,d]], det = ad − bc. We compute: det([[4−λ, 1], [2, 3−λ]]) = (4−λ)(3−λ) − (1)(2) = λ² − 7λ + 10 = (λ − 5)(λ − 2) = 0.
λ₁ = 5, λ₂ = 2
2
Step 2 — Find the EigenvectorsAn eigenvector for eigenvalue λ is a nonzero vector v such that (A − λI)v = 0 (the zero vector). For λ₁ = 5: (A − 5I)v = 0 gives [[-1, 1], [2, -2]]v = 0. Both rows say −v₁ + v₂ = 0, so v₂ = v₁. Choosing v₁ = 1 gives v₁ = [1, 1]. For λ₂ = 2: (A − 2I)v = 0 gives [[2, 1], [2, 1]]v = 0. Both rows say 2v₁ + v₂ = 0, so v₂ = −2v₁. Choosing v₁ = 1 gives v₂ = [1, −2].
v₁ = [1, 1], v₂ = [1, −2]
3
Step 3 — Build the Change-of-Basis Matrix PPlace the eigenvectors as columns: P = [[1, 1], [1, −2]].
P = [[1, 1], [1, −2]]
4
Step 4 — Compute P⁻¹For a 2×2 matrix [[a,b],[c,d]], the inverse is (1/det) × [[d,−b],[−c,a]], where det = ad − bc. Here det(P) = (1)(−2) − (1)(1) = −3. So P⁻¹ = (1/(−3)) × [[−2, −1], [−1, 1]] = [[2/3, 1/3], [1/3, −1/3]].
P⁻¹ = [[2/3, 1/3], [1/3, −1/3]]
5
Step 5 — Verify D = P⁻¹APMultiply P⁻¹AP. First compute AP = [[4,1],[2,3]] × [[1,1],[1,−2]] = [[5, 2],[5, −4]]. Then compute P⁻¹(AP) = [[2/3,1/3],[1/3,−1/3]] × [[5,2],[5,−4]] = [[5, 0],[0, 2]].
D = [[5, 0], [0, 2]] ✓ — the eigenvalues sit on the diagonal!

Strengths & Limitations of Diagonalization

Diagonalization through similarity transformations is incredibly powerful, but it doesn't work for every matrix. Let's compare the advantages and the situations where it runs into trouble.

Advantages versus limitations of similarity-based diagonalization
StrengthsLimitations
Makes matrix powers easy: Aⁿ = P Dⁿ P⁻¹, and Dⁿ is trivial to compute (just raise each diagonal entry to the nth power).Not all matrices are diagonalizable. Some lack enough independent eigenvectors.
Reveals the eigenvalues directly on the diagonal of D.Repeated eigenvalues can cause problems if the eigenspace is too small.
Simplifies systems of differential equations and recurrence relations.Computing P⁻¹ can be numerically unstable for large matrices.
Provides deep geometric insight about how a transformation stretches space.For non-diagonalizable matrices, a more advanced technique called Jordan Normal Form is needed. This is a college-level topic beyond the scope of this lesson.
KEY TAKEAWAY
Think of diagonalization like tuning a guitar to standard tuning. Most songs (matrices) are easier to play once each string (eigenvector direction) is tuned independently. But some unusual instruments (non-diagonalizable matrices) need special techniques. When diagonalization fails, mathematicians turn to more advanced college-level tools—such as Jordan Normal Form—which still reveal the eigenvalue structure of the matrix even when a fully diagonal form isn't achievable.

Connection to Advanced Topics

Similarity transformations are a gateway to many advanced ideas in mathematics and science studied at the college level and beyond. Once you understand how changing a basis can simplify a matrix, you're ready to explore deeper concepts. The table below compares what we've learned with some topics you might encounter in future courses.

From similarity to more advanced matrix decompositions
This LessonAdvanced Extension
Diagonalization: D = P⁻¹APJordan Normal Form: a college-level technique that handles matrices which can't be fully diagonalized, by allowing small 1s above the diagonal in an otherwise near-diagonal form.
Change of basis with any invertible POrthogonal diagonalization: restricts P to be an orthogonal matrix (one where Pᵀ = P⁻¹), preserving lengths and angles. Used for symmetric matrices in advanced Linear Algebra.
Finding eigenvalues of a single matrixSpectral Theorem: a college-level result that guarantees real eigenvalues and orthogonal eigenvectors for symmetric matrices.
2×2 and 3×3 examplesSingular Value Decomposition (SVD): a college-level generalization that extends diagonalization ideas to any matrix, even non-square ones. It powers modern data science and machine learning.

In physics, quantum mechanics relies heavily on similarity and unitary transformations to switch between different representations of a system. In computer graphics, every time a 3D model is rotated on screen, a change-of-basis matrix is at work behind the scenes. Mastering similarity transformations gives you a powerful toolkit that extends far beyond the classroom.

Practice Problems

PROBLEM 1CONCEPTUAL
If two matrices A and B are similar, explain in your own words why they must have the same eigenvalues.
PROBLEM 2BASIC CALCULATION
Given A = [[3, 0], [0, 7]] and P = [[1, 2], [0, 1]], compute B = P⁻¹AP. Is B diagonal?
PROBLEM 3INTERMEDIATE
Diagonalize the matrix A = [[5, 4], [1, 2]]. Find P, P⁻¹, and verify D = P⁻¹AP.
PROBLEM 4APPLIED
A population model uses the matrix A = [[0.5, 0.3], [0.4, 0.8]]. After diagonalizing A, use D to compute A⁴ (the population after 4 time steps) without multiplying A by itself four times.
PROBLEM 5CRITICAL THINKING
Consider A = [[2, 1], [0, 2]]. Show that A has a repeated eigenvalue λ = 2 and only one independent eigenvector. Explain why A cannot be diagonalized by a similarity transformation and describe what alternative approach exists.

Lesson Summary

A similarity transformation rewrites a matrix A as B = P⁻¹AP, using a change-of-basis matrix P whose determinant is nonzero (so that its inverse P⁻¹ exists). The matrices A and B represent the same linear transformation in different coordinate systems. Because of this, they share every intrinsic property: eigenvalues, determinant, trace, rank, and the eigenvalue equation det(M − λI) = 0.

When the columns of P are eigenvectors of A, the result B becomes a diagonal matrix D whose diagonal entries are the eigenvalues. This process—called diagonalization—makes computations like matrix powers dramatically simpler (Aⁿ = P Dⁿ P⁻¹). Not every matrix can be diagonalized; when there aren't enough independent eigenvectors, college-level techniques such as Jordan Normal Form provide the next-best simplification. This topic is a core part of college-level Linear Algebra and connects to many fields including physics, computer graphics, and data science.

Varsity Tutors • Linear Algebra • Similarity & Change of Basis