01 / 21

Similarity &
Change of Basis

Understand how similar matrices represent the same linear transformation in different bases, and master change-of-basis computations using \( P^{-1}AP \).

Linear Algebra

What Is a Basis?

A basis for a vector space \( V \) is a set of vectors \( \{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n \} \) that is both linearly independent and spans \( V \). Every vector in \( V \) can be written as a unique linear combination of the basis vectors.

Linearly Independent
No vector in the set can be written as a combination of the others.
Spanning
Every vector in \( V \) is reachable via combinations of the basis vectors.

Coordinate Vectors

Given a basis \( \mathcal{B} = \{ \mathbf{b}_1, \mathbf{b}_2 \} \), the coordinate vector of \( \mathbf{x} \) relative to \( \mathcal{B} \) is the column \( [\mathbf{x}]_\mathcal{B} \) of scalars such that:

$$ \mathbf{x} = c_1 \mathbf{b}_1 + c_2 \mathbf{b}_2 \;\Longrightarrow\; [\mathbf{x}]_\mathcal{B} = \begin{pmatrix} c_1 \\ c_2 \end{pmatrix} $$
\( \mathbf{e}_1 \) \( \mathbf{e}_2 \) \( \mathbf{b}_1 \) \( \mathbf{b}_2 \) \( \mathbf{x} \)

The Change-of-Basis Matrix

Let \( \mathcal{B} = \{ \mathbf{b}_1, \dots, \mathbf{b}_n \} \) be a basis for \( \mathbb{R}^n \). The change-of-basis matrix from \( \mathcal{B} \) to the standard basis \( \mathcal{E} \) is:

$$ P = \begin{pmatrix} \mathbf{b}_1 & \mathbf{b}_2 & \cdots & \mathbf{b}_n \end{pmatrix} $$

It converts \( \mathcal{B} \)-coordinates to standard coordinates:

$$ \mathbf{x} = P \, [\mathbf{x}]_\mathcal{B} $$

Similar Matrices: Definition

Two \( n \times n \) matrices \( A \) and \( B \) are similar if there exists an invertible matrix \( P \) such that:

$$ B = P^{-1} A P $$

Geometrically, \( A \) and \( B \) represent the same linear transformation \( T \), but expressed in different bases. \( A \) uses the standard basis; \( B \) uses the basis whose columns form \( P \).

\( [\mathbf{x}]_\mathcal{B} \) \( [\mathbf{x}]_\mathcal{E} \) \( [T(\mathbf{x})]_\mathcal{E} \) \( [T(\mathbf{x})]_\mathcal{B} \) \( P \) \( A \) \( P^{-1} \) \( B = P^{-1}AP \)

Properties Preserved by Similarity

Similar matrices share many fundamental properties because they represent the same transformation. If \( B = P^{-1}AP \), then \( A \) and \( B \) have the same:

Eigenvalues
Same characteristic polynomial \( \det(A - \lambda I) = \det(B - \lambda I) \).
Determinant
\( \det(B) = \det(P^{-1})\det(A)\det(P) = \det(A) \).
Trace
\( \operatorname{tr}(B) = \operatorname{tr}(P^{-1}AP) = \operatorname{tr}(A) \).

Similar vs. Other Equivalences

Relation Form Preserves
Similar \( P^{-1}AP \) Eigenvalues, det, trace, rank
Row Equivalent \( EA \) (elem. row ops) Row space, rank (not eigenvalues)
Congruent \( P^{T}AP \) Signature (for symmetric \( A \))
Unitarily Similar \( U^{\ast}AU \), \( U \) unitary All of similarity + singular values

Unpacking \( B = P^{-1}AP \)

Read the formula \( B = P^{-1}AP \) right-to-left as a three-step pipeline:

1
Convert coordinates: Multiply by \( P \) to translate from \( \mathcal{B} \)-coordinates to standard coordinates.
2
Apply the transformation: Multiply by \( A \) in standard coordinates.
3
Convert back: Multiply by \( P^{-1} \) to return the result to \( \mathcal{B} \)-coordinates.

How to Compute a Change of Basis

1
Identify the new basis \( \mathcal{B} \): Write down the basis vectors \( \mathbf{b}_1, \mathbf{b}_2, \dots \)
2
Form \( P \): Place the basis vectors as columns: \( P = [\mathbf{b}_1 \mid \mathbf{b}_2 \mid \cdots] \)
3
Compute \( P^{-1} \): Use row reduction on \( [P \mid I] \) or the formula for \( 2\times 2 \) inverses.
4
Compute \( B = P^{-1}AP \): Multiply in order: first \( AP \), then \( P^{-1}(AP) \).
5
Verify: Check that \( A \) and \( B \) have the same eigenvalues, determinant, and trace.

Example 1: Basic Similarity

Let \( A = \begin{pmatrix} 4 & -2 \\ 1 & 1 \end{pmatrix} \) and \( \mathcal{B} = \left\{ \begin{pmatrix} 1 \\ 1 \end{pmatrix}, \begin{pmatrix} 2 \\ 1 \end{pmatrix} \right\} \). Find \( B = P^{-1}AP \).

Example 2: Verifying Similarity

Are \( A = \begin{pmatrix} 1 & 2 \\ 0 & 3 \end{pmatrix} \) and \( B = \begin{pmatrix} 3 & 0 \\ -2 & 1 \end{pmatrix} \) similar?

1
Check eigenvalues: \( A \) is upper triangular, so \( \lambda_A = 1, 3 \). Similarly, \( B \) is lower triangular, so \( \lambda_B = 3, 1 \). ✓ Same set.
2
Check trace: \( \operatorname{tr}(A) = 1 + 3 = 4 \), \( \operatorname{tr}(B) = 3 + 1 = 4 \). ✓ Match.
3
Check determinant: \( \det(A) = 3 \), \( \det(B) = 3 \). ✓ Match.
4
Conclusion: Necessary conditions are met. Since both are \( 2 \times 2 \) with the same distinct eigenvalues, they are diagonalizable to the same diagonal matrix, hence similar.

Example 3: Finding \( P \)

Find an invertible \( P \) such that \( P^{-1}AP = D \) where \( A = \begin{pmatrix} 5 & 4 \\ 1 & 2 \end{pmatrix} \).

Why Diagonalize?

The most powerful application of similarity is diagonalization. If \( A = PDP^{-1} \) where \( D \) is diagonal, then computing powers becomes trivial:

$$ A^k = P D^k P^{-1} = P \begin{pmatrix} \lambda_1^k & 0 \\ 0 & \lambda_2^k \end{pmatrix} P^{-1} $$
Matrix Powers
\( A^{100} \) reduces to computing \( \lambda_i^{100} \) individually.
Differential Equations
\( e^{At} = P \operatorname{diag}(e^{\lambda_i t}) P^{-1} \) for solving systems.
Recurrences
Fibonacci and similar sequences: closed-form via diagonalization.

Between Two Non-Standard Bases

To convert from basis \( \mathcal{B} \) to basis \( \mathcal{C} \) (neither being the standard basis), compose the change-of-basis matrices:

$$ P_{\mathcal{C} \leftarrow \mathcal{B}} = P_{\mathcal{C}}^{-1} \, P_{\mathcal{B}} $$
\( [\mathbf{x}]_\mathcal{B} \) \( \mathbf{x} \) (standard) \( [\mathbf{x}]_\mathcal{C} \) \( P_\mathcal{B} \) \( P_\mathcal{C}^{-1} \) \( P_\mathcal{C}^{-1} P_\mathcal{B} \)

Common Mistakes

✕ Wrong Order
Writing \( PAP^{-1} \) instead of \( P^{-1}AP \). The inverse goes on the left.
✕ Rows vs. Columns
Placing basis vectors as rows of \( P \). They must be columns.
✕ Same Invariants = Similar
Having the same eigenvalues, trace, and det is necessary but not sufficient in general (e.g., non-diagonalizable matrices).

Summary of Key Ideas

Concept Key Formula Interpretation
Change-of-basis matrix \( P = [\mathbf{b}_1 \mid \cdots \mid \mathbf{b}_n] \) Columns are new basis vectors
Coordinate conversion \( \mathbf{x} = P[\mathbf{x}]_\mathcal{B} \) \( P \) maps \( \mathcal{B} \)-coords to standard
Similarity \( B = P^{-1}AP \) Same transformation, different basis
Diagonalization \( A = PDP^{-1} \) \( P \) = eigenvectors, \( D \) = eigenvalues
Matrix power \( A^k = PD^kP^{-1} \) Raise diagonal entries to power \( k \)

Question 1 of 5

If \( B = P^{-1}AP \), which of the following is always true?

Question 2 of 5

Given \( P = \begin{pmatrix} 1 & 3 \\ 2 & 5 \end{pmatrix} \), what is \( P^{-1} \)?

Question 3 of 5

If \( A \) is diagonalizable with \( A = PDP^{-1} \), what is \( A^3 \)?

Question 4 of 5

Which pair of matrices is not similar?

Question 5 of 5

In the formula \( B = P^{-1}AP \), the columns of \( P \) are: