Similar Matrices and Change of Basis

Part 1, Chapter 1: Linear Algebra Toolkit

Learning objectives

  • Define matrix similarity B=P1APB = P^{-1} A P as the same linear map in a new basis
  • Identify similarity invariants: determinant, trace, rank, eigenvalues, characteristic polynomial
  • Recognise when two matrices CANNOT be similar by comparing invariants
  • Connect similarity to diagonalisation A=PDP1A = P D P^{-1} as the simplest similarity class

Two matrices are similar exactly when they describe the same linear transformation in different coordinate systems. This is the right notion of equivalence for square matrices: the matrix changes when you change the basis, but the underlying transformation does not. Whatever the linear map "really does" geometrically, how much it rotates, stretches, projects, survives the change of basis. The numerical features that survive are the similarity invariants, and they are exactly the features worth computing.

The definition

Two ntimesnn \times n matrices AA and BB are similar if there exists an invertible matrix PP with B=P1APB = P^{-1} A P. The matrix PP is the change-of-basis matrix: its columns are the new basis vectors expressed in the old coordinates. If you apply AA to a vector and then re-express the result in a new basis, you get the same answer as if you had first re-expressed the input in the new basis, applied BB, and stayed there.

Similarity invariants

The following quantities are preserved by similarity:

  • Determinant: det(B)=det(P1AP)=det(P)1det(A)det(P)=det(A)\det(B) = \det(P^{-1} A P) = \det(P)^{-1} \det(A) \det(P) = \det(A).
  • Trace: operatornametr(B)=operatornametr(A)\operatorname{tr}(B) = \operatorname{tr}(A), using the cyclic property of trace.
  • Rank: operatornamerank(B)=operatornamerank(A)\operatorname{rank}(B) = \operatorname{rank}(A), because multiplication by invertibles preserves rank.
  • Eigenvalues and characteristic polynomial: det(BlambdaI)=det(AlambdaI)\det(B - \lambda I) = \det(A - \lambda I).
  • Minimal polynomial and Jordan form (covered in advanced courses).

Diagonalisation

A matrix AA is diagonalisable if it is similar to a diagonal matrix, that is, A=PDP1A = P D P^{-1} for some diagonal DD and invertible PP. In this case the columns of PP are eigenvectors of AA and the diagonal entries of DD are the corresponding eigenvalues. Diagonalisation is the cleanest similarity class: it makes powers easy (Ak=PDkP1A^k = P D^k P^{-1}) and reveals the geometry of the transformation directly. Not every matrix is diagonalisable; the failure cases are captured by Jordan Normal Form.

The matrix widget above can illustrate similarity: set up a matrix AA with non-trivial geometry, then apply a coordinate change. The new matrix B=P1APB = P^{-1} A P has different entries but performs the same overall transformation, you can verify by checking that the determinant and trace remain unchanged.

Where this shows up
  • Markov chain stationary distributions: A transition matrix PP is often diagonalised to compute PnP^n for large nn, revealing the long-run stationary distribution as the eigenvector with eigenvalue 1. Without diagonalisation, computing P1000P^{1000} by hand is hopeless.
  • Differential equations: The system dotmathbfx=Amathbfx\dot{\mathbf{x}} = A \mathbf{x} has solution mathbfx(t)=eAtmathbfx_0\mathbf{x}(t) = e^{A t} \mathbf{x}_0. If A=PDP1A = P D P^{-1}, then eAt=PeDtP1e^{A t} = P e^{D t} P^{-1} and eDte^{D t} is just exponentials on the diagonal, a closed-form solution.
  • Quantum mechanics: Diagonalising the Hamiltonian operator in the energy basis reduces time evolution to multiplication by phase factors eiEkt/hbare^{-i E_k t / \hbar}kt/hbar. Every physics undergraduate course relies on this similarity trick.

    Pause and think: Suppose AA and BB are 2times22 \times 2 matrices with operatornametr(A)=operatornametr(B)\operatorname{tr}(A) = \operatorname{tr}(B) and det(A)=det(B)\det(A) = \det(B). Must they be similar? (Hint: they have the same characteristic polynomial. Does that suffice? Consider \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} vs \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}.)

    Try it

    • Predict whether A = \begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix} and B = \begin{pmatrix} 3 & 0 \\ 0 & 2 \end{pmatrix} are similar. Justify by comparing eigenvalues, trace, and determinant. Then construct the explicit PP.
    • If operatornametr(A)=7\operatorname{tr}(A) = 7 and B=P1APB = P^{-1} A P, predict operatornametr(B)\operatorname{tr}(B). Justify with one line.
    • Predict whether A = \begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix} is diagonalisable. (Hint: count the independent eigenvectors for the repeated eigenvalue.)
    • If AA is diagonalisable with eigenvalues 2,2,52, 2, 5, predict the diagonal form DD and compute A3A^3 if A=PDP1A = P D P^{-1}.
    • Predict whether A = \begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix} and C = \begin{pmatrix} 1 & 0 \\ 0 & 3 \end{pmatrix} can be similar. (Compare eigenvalues.)

    A trap to watch for

    Sharing all of trace, determinant, and characteristic polynomial does not guarantee that two matrices are similar. The matrices I_2 = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} and J = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} both have trace 22, determinant 11, and characteristic polynomial (lambda1)2(\lambda - 1)^2. Yet they are NOT similar: I_2I_2 is diagonal, while JJ is a Jordan block (not diagonalisable). The full classification of similarity classes requires Jordan Normal Form, the eigenvalues alone are not enough when multiplicities are involved. Always check eigenspace dimensions before declaring similarity.

    What you now know

    You can recognise when two matrices are similar (or definitively not similar), compute the invariants, and use diagonalisation to make hard matrix operations tractable. The next section (§1.8) goes deeper: how to actually find eigenvalues and eigenvectors, the building blocks of every diagonalisation.

    Mark section complete →

    References

    • Garrity, T. (2002). All the Mathematics You Missed. Cambridge University Press, ch. 1, §1.7.
    • Axler, S. (2015). Linear Algebra Done Right (3rd ed.). Springer, ch. 5 (eigenvalues and similarity).
    • Hoffman, K., Kunze, R. (1971). Linear Algebra (2nd ed.). Prentice-Hall, ch. 6 (similarity).
    • Horn, R. A., Johnson, C. R. (2012). Matrix Analysis (2nd ed.). Cambridge University Press, ch. 1.
    • Strang, G. (2016). Introduction to Linear Algebra (5th ed.). Wellesley-Cambridge, ch. 6 (eigenvalues, diagonalisation).

    This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.