Change a basis, and the same linear operator gets a different matrix. Linear Algebra I proved exactly how the two matrices relate: B = P^{-1}AP, where P's columns are the new basis vectors written in the old coordinates. Two matrices related this way are called similar, and similarity is the precise sense in which "the same operator, different coordinates" gets made rigorous. This one formula is about to earn its keep for the rest of the course — every canonical form in chapter 07 is the search for the single best basis a similarity transformation can put a given operator into.
Changing a basis is switching which camera angle films the same scene. Nothing on set actually moves. Only the footage looks different. Similar matrices are the same movie, filmed from different camera angles. The footage looks completely different frame by frame: different numbers, different-looking action. But anything true about the plot is unaffected by which angle the camera happened to use, whether a shape flipped, whether motion sped up, how far something traveled. Trace and determinant are plot facts. Individual matrix entries are camera-angle facts. Switching camera angles always has to be undoable. Given one angle's footage, there has to be a way back to any other angle's footage of the identical scene. That's exactly why the change-of-basis matrix P always has an inverse.
A change of basis replaces the coordinate list a vector or operator is written in with a different one, without moving the underlying object at all — only the numbers describing it change. Similarity is an equivalence relation, not a computation performed once and forgotten — it partitions every n\times n matrix into families that all represent the same underlying operator, just viewed through different bases. Everything invariant under a change of basis (trace, determinant, eigenvalues, rank) is therefore a genuine property of the operator itself, not an artifact of whichever matrix happened to represent it; everything that changes (the individual entries) was never a property of the operator to begin with, only of the coordinate system used to write it down. The change-of-basis matrix P that connects two representations is always invertible, since a basis change has to be reversible: whatever coordinates P produces, P^{-1} has to be able to undo.
Theorem
The Change-of-Basis Formula
Recalled from Linear Algebra — Vectors, Matrices, and the Geometry of Data · Changing basis in Rn — first taught there.
Let \mathcal{B} = \{\mathbf{b}_1, \dots, \mathbf{b}_n\} and \mathcal{C} = \{\mathbf{c}_1, \dots, \mathbf{c}_n\} be two bases of the same vector space V, and let P_{\mathcal C \leftarrow \mathcal B} = \begin{bmatrix} [\mathbf{b}_1]_{\mathcal C} & [\mathbf{b}_2]_{\mathcal C} & \cdots & [\mathbf{b}_n]_{\mathcal C} \end{bmatrix} be the matrix whose columns are the \mathcal{C}-coordinate vectors of the \mathcal{B}-basis vectors. Then for every \mathbf{x} \in V, [\mathbf{x}]_{\mathcal C} = P_{\mathcal C \leftarrow \mathcal B}\,[\mathbf{x}]_{\mathcal B}.
Moreover P_{\mathcal C \leftarrow \mathcal B} is invertible, with \left(P_{\mathcal C \leftarrow \mathcal B}\right)^{-1} = P_{\mathcal B \leftarrow \mathcal C}.
Every \mathbf{x} \in V has a unique expansion in the \mathcal{B}-basis, \mathbf{x} = x_1\mathbf{b}_1 + x_2\mathbf{b}_2 + \cdots + x_n\mathbf{b}_n, where the scalars x_1, \dots, x_n are exactly the entries of [\mathbf{x}]_{\mathcal B}. Take \mathcal{C}-coordinates of both sides. Coordinate-taking relative to a fixed basis is linear — the coordinate map sends sums to sums and scalar multiples to scalar multiples, since it just reads off the unique coefficients in a linear combination — so [\mathbf{x}]_{\mathcal C} = [x_1\mathbf{b}_1 + \cdots + x_n\mathbf{b}_n]_{\mathcal C} = x_1[\mathbf{b}_1]_{\mathcal C} + x_2[\mathbf{b}_2]_{\mathcal C} + \cdots + x_n[\mathbf{b}_n]_{\mathcal C}. The right side is precisely a linear combination of the columns of P_{\mathcal C \leftarrow \mathcal B} with weights x_1, \dots, x_n, which is the definition of the matrix-vector product: x_1[\mathbf{b}_1]_{\mathcal C} + \cdots + x_n[\mathbf{b}_n]_{\mathcal C} = \begin{bmatrix} [\mathbf{b}_1]_{\mathcal C} & \cdots & [\mathbf{b}_n]_{\mathcal C} \end{bmatrix}\begin{bmatrix} x_1 \\ \vdots \\ x_n \end{bmatrix} = P_{\mathcal C \leftarrow \mathcal B}\,[\mathbf{x}]_{\mathcal B}. Combining the two displays gives [\mathbf{x}]_{\mathcal C} = P_{\mathcal C \leftarrow \mathcal B}\,[\mathbf{x}]_{\mathcal B}, as claimed.
For invertibility, run the same argument with the roles of \mathcal{B} and \mathcal{C} swapped: the matrix P_{\mathcal B \leftarrow \mathcal C} built from the \mathcal{B}-coordinates of the \mathcal{C}-basis vectors satisfies [\mathbf{x}]_{\mathcal B} = P_{\mathcal B \leftarrow \mathcal C}\,[\mathbf{x}]_{\mathcal C} for every \mathbf{x} \in V. Substituting the first formula into the second (and vice versa) gives [\mathbf{x}]_{\mathcal B} = P_{\mathcal B \leftarrow \mathcal C}P_{\mathcal C \leftarrow \mathcal B}\,[\mathbf{x}]_{\mathcal B}, \qquad [\mathbf{x}]_{\mathcal C} = P_{\mathcal C \leftarrow \mathcal B}P_{\mathcal B \leftarrow \mathcal C}\,[\mathbf{x}]_{\mathcal C} for every \mathbf{x} \in V. A matrix that fixes every coordinate vector in \mathbb{R}^n must be the identity matrix I_n (test it against the standard basis vectors, whose coordinate images run over all of \mathbb{R}^n), so both products equal I_n. Hence P_{\mathcal C \leftarrow \mathcal B} and P_{\mathcal B \leftarrow \mathcal C} are inverse to one another.
Theorem
Similarity Invariants
Recalled from Linear Algebra — Vectors, Matrices, and the Geometry of Data · Similarity, diagonalizability, and defective matrices — first taught there.
If A and B are similar — that is, B = P^{-1}AP for some invertible matrix P — then A and B have the same characteristic polynomial, the same eigenvalues (with the same multiplicities), the same determinant, the same trace, and the same rank.
Characteristic polynomial (and hence eigenvalues). Write the characteristic polynomial of B using B = P^{-1}AP: \det(B - \lambda I) = \det\!\left(P^{-1}AP - \lambda I\right) = \det\!\left(P^{-1}AP - \lambda P^{-1}P\right) = \det\!\left(P^{-1}(A - \lambda I)P\right). The determinant is multiplicative, so this splits into three factors: \det(B - \lambda I) = \det(P^{-1})\,\det(A - \lambda I)\,\det(P) = \det(A - \lambda I), since \det(P^{-1}) = 1/\det(P) cancels against \det(P). So A and B share the same characteristic polynomial \det(A - \lambda I), and therefore the same roots — the same eigenvalues, each with the same algebraic multiplicity, since multiplicity is read off the same polynomial.
Determinant. Setting \lambda = 0 in the identity just proved gives \det(B) = \det(A) directly. (Equivalently, \det(B) = \det(P^{-1})\det(A)\det(P) = \det(A) by the same multiplicative argument.)
Trace. The characteristic polynomial of an n \times n matrix M has the form \det(M - \lambda I) = (-\lambda)^n + \operatorname{tr}(M)(-\lambda)^{n-1} + \cdots + \det(M), so \operatorname{tr}(M) is exactly the coefficient of (-\lambda)^{n-1}. Since A and B share the same characteristic polynomial, they share that coefficient, so \operatorname{tr}(A) = \operatorname{tr}(B).
Rank. Left-multiplication by the invertible matrix P^{-1} and right-multiplication by the invertible matrix P each preserve rank — multiplying by an invertible matrix on either side sends a basis of the column space to another basis of a column space of the same dimension, and never collapses two independent columns together, since invertible maps are one-to-one. So \operatorname{rank}(B) = \operatorname{rank}(P^{-1}AP) = \operatorname{rank}(AP) = \operatorname{rank}(A).
Why this matters. These quantities are exactly the ones that don't depend on which basis is used to write a linear transformation as a matrix — changing basis replaces A by P^{-1}AP for the change-of-basis matrix P, so \det, \operatorname{tr}, \operatorname{rank}, and the eigenvalues are properties of the underlying transformation itself, not artifacts of coordinates. The converse is false: matrices can share all of these invariants without being similar (a diagonalizable matrix is never similar to a non-diagonalizable one with the same eigenvalues), so this theorem gives necessary conditions for similarity, not sufficient ones.
The same vector, decomposed in a moving basis
Drag either basis vector — v never moves, but its decomposition into that basis's own coordinates redraws live, and collapses when the basis goes degenerate.
Loading interactive…
Similar matrices, same long-run direction
Increase n with the slider — Aⁿv snaps onto the same dominant direction no matter which basis A happened to be written in.
Loading interactive…
Worked example
Trace and determinant survive a change of basis, entries don't
-
1compute the invariants for A first, so the comparison is immediate once B is found
Let A = \begin{pmatrix}2&1\\0&3\end{pmatrix} and P = \begin{pmatrix}1&1\\1&-1\end{pmatrix}. Compute B = P^{-1}AP and compare \operatorname{tr} and \det before and after. \operatorname{tr}(A) = 2+3 = 5, \qquad \det(A) = (2)(3)-(1)(0) = 6
compute the invariants for A first, so the comparison is immediate once B is found
-
2
P^{-1} = \tfrac{1}{-2}\begin{pmatrix}-1&-1\\-1&1\end{pmatrix} = \begin{pmatrix}1/2&1/2\\1/2&-1/2\end{pmatrix}, so B = P^{-1}AP = \begin{pmatrix}7/2 & -1/2 \\ 3/2 & 3/2\end{pmatrix}
-
3\boxed{\operatorname{tr}(B) = 7/2+3/2 = 5 = \operatorname{tr}(A), \quad \det(B) = (7/2)(3/2)-(-1/2)(3/2) = 6 = \det(A)}
Every entry changed; both invariants didn't move at all.
Loading interactive…
Where this shows up: canonical forms are a search over similarity classes
Chapter 07 asks a question this section only sets up: given an operator, which similar matrix in its whole family is the simplest one to work with? Diagonal is the ideal answer, achievable exactly when a basis of eigenvectors exists; the Jordan form is the honest answer for every matrix, diagonalizable or not.
Where this goes next
Numerical stability
A poorly chosen basis can make a perfectly well-behaved operator look numerically treacherous — large, nearly-cancelling entries that amplify rounding error. Chapter 09's QR and Schur decompositions are, underneath the factorization language, a search for a basis (specifically an orthonormal one) in which similarity transformations stay numerically well-behaved, which is exactly why "orthogonal" keeps reappearing as the preferred kind of change-of-basis matrix throughout this course.
Quick review
Practice from earlier coursework, pulled in for this topic.
From Linear Algebra — Vectors, Matrices, and the Geometry of Data
Basis \mathcal B = \{(1,1), (0,1)\}. Given [\mathbf{x}]_{\mathcal B} = (5, -2), find the SECOND standard coordinate of \mathbf x.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
P = [[1,0],[1,1]]. x = P(5,-2) = (1(5)+0(-2), 1(5)+1(-2)) = (5, 3). The second coordinate is 3.
Correct answer
Also accepted:
Why
Build P from the basis vectors as columns, then multiply P by the given \mathcal B-coordinate vector.
From Linear Algebra — Vectors, Matrices, and the Geometry of Data
Basis \mathcal B = \{(2,0), (1,1)\}. Given \mathbf x = (4, 6) in standard coordinates, find the FIRST entry of [\mathbf{x}]_{\mathcal B}.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
P = [[2,1],[0,1]], det P = 2, so P^{-1} = [[0.5,-0.5],[0,1]]. [x]_B = P^{-1}(4,6) = (0.5(4)-0.5(6), 0(4)+1(6)) = (-1, 6). The first entry is -1.
Correct answer
Also accepted:
Why
Build P from the basis vectors, then find P^{-1} before multiplying it by \mathbf x.
Quick review
Practice from earlier coursework, pulled in for this topic.
From Linear Algebra — Vectors, Matrices, and the Geometry of Data
A is similar to B, and B is similar to C. Must A be similar to C?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Writing out the substitution shows it does chain: if B = P^{-1}AP and C = Q^{-1}BQ, then C = (PQ)^{-1}A(PQ) — one combined change-of-basis matrix links A directly to C.
A and C don't need to be equal for this to hold — transitivity produces a genuine similarity between two possibly very different-looking matrices.
No special condition on B is required — the algebra C = Q^{-1}(P^{-1}AP)Q = (PQ)^{-1}A(PQ) works for any invertible P and Q.
Why
Substituting B's definition into C's definition gives C = (PQ)^{-1}A(PQ), an explicit similarity between A and C.
Substitute B's definition in terms of A into the equation for C, then simplify.
From Linear Algebra — Vectors, Matrices, and the Geometry of Data
Let A = \begin{pmatrix} 2 & 0 \\ 0 & 5 \end{pmatrix} and P = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}. Compute B = P^{-1}AP and give the entry in row 1, column 2.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
P^{-1} = [[1,-1],[0,1]]. AP = [[2,2],[0,5]]. P^{-1}(AP) = [[2,-3],[0,5]], so the (1,2) entry is -3.
Correct answer
Also accepted:
Why
Find P^{-1} first, then compute AP before multiplying by P^{-1}.