What the Similarity Transform Computes
A matrix for a linear operator depends on the coordinates used to describe its inputs and outputs. Changing coordinates changes the matrix, but not the operator itself. The product \(P^{-1}AP\) gives the matrix of the same operator in a basis whose vectors are the columns of \(P\), provided \(A\) is the matrix in the standard basis and \(P\) is invertible.
Throughout, work over \(\mathbb{R}\). Let \(T:\mathbb{R}^n\to\mathbb{R}^n\) be a linear map with standard-basis matrix \(\mathbf{A}\). Let \(\mathcal{B}=(\mathbf{b}_1,\dots,\mathbf{b}_n)\) be an ordered basis and let \(\mathbf{P}=\begin{bmatrix}\mathbf{b}_1&\cdots&\mathbf{b}_n\end{bmatrix}\). A vector \(\mathbf{x}\) of \(\mathcal{B}\)-coordinates describes the standard-coordinate vector \(\mathbf{P}\mathbf{x}\). To apply \(T\), first form \(\mathbf{P}\mathbf{x}\), then apply \(\mathbf{A}\), then convert the result back to \(\mathcal{B}\)-coordinates using \(\mathbf{P}^{-1}\).
The order of multiplication records the coordinate journey. The factor on the right converts \(\mathcal{B}\)-coordinates to standard coordinates; the middle factor applies the operator; the factor on the left converts standard coordinates back to \(\mathcal{B}\)-coordinates. Matrix multiplication acts from right to left, so changing the order changes the calculation.
Why the Formula Gives the New Matrix
Proof. The vector with \(\mathcal{B}\)-coordinates \(\mathbf{x}\) has standard-coordinate vector \(\mathbf{P}\mathbf{x}\), because the columns of \(\mathbf{P}\) are the basis vectors. Applying \(T\) in standard coordinates gives \(\mathbf{A}(\mathbf{P}\mathbf{x})\). For any standard-coordinate vector \(\mathbf{y}\), its \(\mathcal{B}\)-coordinates are \(\mathbf{P}^{-1}\mathbf{y}\), since \(\mathbf{P}\mathbf{z}=\mathbf{y}\) has the unique solution \(\mathbf{z}=\mathbf{P}^{-1}\mathbf{y}\). Therefore the output coordinates are \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\mathbf{x}\), as required. \(\square\)
This also explains how to read the columns of the result: column \(j\) is the \(\mathcal{B}\)-coordinate vector of \(T(\mathbf{b}_j)\). Indeed, the \(j\)th standard coordinate vector \(\mathbf{e}_j\) represents \(\mathbf{b}_j\) in basis \(\mathcal{B}\), and multiplying the new matrix by \(\mathbf{e}_j\) selects its \(j\)th column.
Proof. If two matrices have the same action on every vector, they have the same action on each \(\mathbf{e}_j\). Multiplication by \(\mathbf{e}_j\) selects column \(j\), so their columns agree. Conversely, suppose their columns agree. Every \(\mathbf{x}\in\mathbb{R}^n\) can be written \(\mathbf{x}=\sum_{j=1}^n x_j\mathbf{e}_j\). By linearity, each matrix sends \(\mathbf{x}\) to the sum of its \(j\)th column multiplied by \(x_j\). Since the columns agree, these sums agree for every \(\mathbf{x}\). \(\square\)
A Reliable Hand Calculation
For a small explicit problem, compute the inverse first, then multiply \(\mathbf{A}\mathbf{P}\), and finally multiply on the left by \(\mathbf{P}^{-1}\). If the inverse is not immediately apparent, row-reduce \([\mathbf{P}\mid\mathbf{I}_n]\): each row operation applied to the whole augmented matrix preserves the equations being solved, and a left block reduced to \(\mathbf{I}_n\) leaves \(\mathbf{P}^{-1}\) in the right block. Check an inverse by multiplying it by \(\mathbf{P}\), and check the transformed matrix by applying both descriptions of the operator to the coordinate vectors.
Worked Example: A Two-Dimensional Change of Basis
Let \(\mathbf{A}=\begin{bmatrix}1&2\\0&3\end{bmatrix}\) and let the columns of \(\mathbf{P}=\begin{bmatrix}1&1\\0&1\end{bmatrix}\) define the new basis. Compute \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\).
The candidate inverse is \(\mathbf{P}^{-1}=\begin{bmatrix}1&-1\\0&1\end{bmatrix}\). Check both products:
Now multiply in the specified order. First,
Then,
Check the action on both coordinate vectors. For \(\mathbf{e}_1\), the new-basis route gives \(\mathbf{P}\mathbf{e}_1=(1,0)^{\top}\), then \(\mathbf{A}\mathbf{P}\mathbf{e}_1=(1,0)^{\top}\), then \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\mathbf{e}_1=(1,0)^{\top}\). The computed matrix also gives \(\begin{bmatrix}1&0\\0&3\end{bmatrix}\mathbf{e}_1=(1,0)^{\top}\). For \(\mathbf{e}_2\), the route gives \(\mathbf{P}\mathbf{e}_2=(1,1)^{\top}\), \(\mathbf{A}\mathbf{P}\mathbf{e}_2=(3,3)^{\top}\), and \(\mathbf{P}^{-1}(3,3)^{\top}=(0,3)^{\top}\). The computed matrix gives \(\begin{bmatrix}1&0\\0&3\end{bmatrix}\mathbf{e}_2=(0,3)^{\top}\). Both columns check.
Using Row Reduction and Checking Every Column
Worked Example: A Three-Dimensional Transformation
Take \(\mathbf{A}=\begin{bmatrix}1&0&0\\0&2&0\\0&0&3\end{bmatrix}\) and \(\mathbf{P}=\begin{bmatrix}1&1&0\\0&1&1\\0&0&1\end{bmatrix}\). Find the new matrix, reducing an augmented matrix to obtain the inverse.
Starting with \([\mathbf{P}\mid\mathbf{I}_3]\), apply \(R_1\to R_1-R_2\), then \(R_2\to R_2-R_3\):
Thus \(\mathbf{P}^{-1}=\begin{bmatrix}1&-1&1\\0&1&-1\\0&0&1\end{bmatrix}\). The inverse check in both orders is
Compute the first product in the similarity transform:
Multiplying on the left by the inverse gives
For \(\mathbf{e}_1\), the sequence \(\mathbf{P}\mathbf{e}_1\), \(\mathbf{A}\mathbf{P}\mathbf{e}_1\), \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\mathbf{e}_1\) is \((1,0,0)^{\top}\), \((1,0,0)^{\top}\), \((1,0,0)^{\top}\), matching column 1. For \(\mathbf{e}_2\), it is \((1,1,0)^{\top}\), \((1,2,0)^{\top}\), \((-1,2,0)^{\top}\), matching column 2. For \(\mathbf{e}_3\), it is \((0,1,1)^{\top}\), \((0,2,3)^{\top}\), \((1,-1,3)^{\top}\), matching column 3. Thus each computed column has the required coordinate interpretation.
A Change of Basis Without Triangular Matrices
Worked Example: A Non-Triangular Basis Matrix
Let \(\mathbf{A}=\begin{bmatrix}2&1\\1&2\end{bmatrix}\) and \(\mathbf{P}=\begin{bmatrix}1&2\\1&1\end{bmatrix}\). Compute the similarity transform using row reduction.
Reduce the augmented matrix. First apply \(R_2\to R_2-R_1\), then \(R_2\to -R_2\), then \(R_1\to R_1-2R_2\):
Hence \(\mathbf{P}^{-1}=\begin{bmatrix}-1&2\\1&-1\end{bmatrix}\). Multiplying back verifies this: \(\mathbf{P}\mathbf{P}^{-1}=\begin{bmatrix}1&0\\0&1\end{bmatrix}\) and \(\mathbf{P}^{-1}\mathbf{P}=\begin{bmatrix}1&0\\0&1\end{bmatrix}\). Now calculate
For \(\mathbf{e}_1\), the sequence through standard coordinates is \(\mathbf{P}\mathbf{e}_1=(1,1)^{\top}\), \(\mathbf{A}(1,1)^{\top}=(3,3)^{\top}\), and \(\mathbf{P}^{-1}(3,3)^{\top}=(3,0)^{\top}\). This matches the first column. For \(\mathbf{e}_2\), it is \((2,1)^{\top}\), \((5,4)^{\top}\), and \((3,1)^{\top}\), matching the second column. The two coordinate-vector checks verify the full matrix action by the proposition.
Common Mistakes and a Practical Check
Reversing the order is not a harmless change. In the first example, the correct result is \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}=\begin{bmatrix}1&0\\0&3\end{bmatrix}\). A wrong calculation using \(\mathbf{P}\mathbf{A}\mathbf{P}^{-1}\) gives \(\begin{bmatrix}1&4\\0&3\end{bmatrix}\): indeed, \(\mathbf{P}\mathbf{A}=\begin{bmatrix}1&5\\0&3\end{bmatrix}\), and \(\begin{bmatrix}1&5\\0&3\end{bmatrix}\begin{bmatrix}1&-1\\0&1\end{bmatrix}=\begin{bmatrix}1&4\\0&3\end{bmatrix}\). This is not the matrix for the stated coordinate conversion. Check the sequence: convert new coordinates to standard coordinates on the right, apply \(\mathbf{A}\), then convert back on the left.
Also distinguish the basis vectors from their coordinates: the columns of \(\mathbf{P}\) are vectors in standard coordinates, while an input \(\mathbf{x}\) to \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\) is a coordinate vector relative to those columns. The columns of the transformed matrix describe the images of the basis vectors, expressed in that same basis. Checking \(\mathbf{P}^{-1}\mathbf{P}=\mathbf{I}\) and checking each transformed column against the coordinate-conversion sequence catch many arithmetic and interpretation errors.
Check Your Understanding
For each problem, keep track of which vectors are standard coordinates and which are coordinates in the chosen basis.
- For \(\mathbf{A}=\begin{bmatrix}2&0\\0&1\end{bmatrix}\) and \(\mathbf{P}=\begin{bmatrix}1&1\\0&1\end{bmatrix}\), compute \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\) and check both columns by applying the operator to the corresponding basis vectors.
- For \(\mathbf{P}=\begin{bmatrix}1&2\\1&1\end{bmatrix}\), use an augmented matrix to find \(\mathbf{P}^{-1}\), then verify both inverse products.
- Explain why multiplying a matrix by \(\mathbf{e}_j\) selects its \(j\)th column.
- In the formula \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\), describe the role of each factor in the order it acts on an input coordinate vector.
- Give a concrete reason why \(\mathbf{P}\mathbf{A}\mathbf{P}^{-1}\) is not the coordinate-change formula used here.