Tutorials › Linear Algebra › The Inverse of a Change-of-Basis Matrix

Coordinates and Change of Basis · Tutorial 381 of 1000

The Inverse of a Change-of-Basis Matrix

Learn why reversing a change of basis gives the inverse matrix, and how to compute and verify both conversion directions.

Intermediate 10 min read

What You'll Learn

  • Define the direction indicated by \(P_{\mathcal{C}\leftarrow\mathcal{B}}\).
  • Prove that conversion matrices for two bases are inverses.
  • Compute both conversion matrices from basis-vector coordinates.
  • Verify both matrix products against the identity matrix.
  • Check a conversion by reconstructing the original vector.
  • Identify why transposing a conversion matrix is generally incorrect.

Why Reversing a Basis Change Gives an Inverse

A change-of-basis matrix changes the coordinates used to describe a vector; it does not change the vector itself. If one matrix takes coordinates in a basis \(\mathcal{B}\) and returns coordinates in a basis \(\mathcal{C}\), then reversing the direction must recover the original coordinates. The precise statement is that the two conversion matrices are inverses. The direction of each matrix matters: its input coordinates are named on the right of the arrow, and its output coordinates on the left.

Let \(V\) be a finite-dimensional vector space over a field \(\mathbb{F}\), and let \(\mathcal{B}=(\mathbf{b}_1,\dots,\mathbf{b}_n)\) and \(\mathcal{C}=(\mathbf{c}_1,\dots,\mathbf{c}_n)\) be ordered bases of \(V\). A basis is an ordered list such that every vector in \(V\) has a unique expression as a linear combination of its listed vectors. The coordinate vector \([\mathbf{v}]_{\mathcal{B}}\) is the column of coefficients in the expression of \(\mathbf{v}\) using \(\mathcal{B}\). The same definition applies to \([\mathbf{v}]_{\mathcal{C}}\).

Definition: The change-of-basis matrix \(P_{\mathcal{C}\leftarrow\mathcal{B}}\) converts \(\mathcal{B}\)-coordinates into \(\mathcal{C}\)-coordinates: for every \(\mathbf{v}\in V\), \([\mathbf{v}]_{\mathcal{C}}=P_{\mathcal{C}\leftarrow\mathcal{B}}[\mathbf{v}]_{\mathcal{B}}\). Its \(j\)th column is \([\mathbf{b}_j]_{\mathcal{C}}\), because the \(j\)th standard coordinate vector represents \(\mathbf{b}_j\) in the basis \(\mathcal{B}\).

In particular, \(P_{\mathcal{B}\leftarrow\mathcal{C}}\) has the opposite direction: it takes \(\mathcal{C}\)-coordinates as input and returns \(\mathcal{B}\)-coordinates. Both matrices are \(n\times n\), since both bases have \(n\) vectors. The arrow notation records which coordinate system is the input and which is the output; it is useful to read it aloud before multiplying a matrix by a coordinate vector.

The Inverse Theorem

Theorem: If \(\mathcal{B}\) and \(\mathcal{C}\) are ordered bases of the same finite-dimensional vector space \(V\) over \(\mathbb{F}\), then \(P_{\mathcal{B}\leftarrow\mathcal{C}}=(P_{\mathcal{C}\leftarrow\mathcal{B}})^{-1}\). Equivalently, \(P_{\mathcal{B}\leftarrow\mathcal{C}}P_{\mathcal{C}\leftarrow\mathcal{B}}=I_n\) and \(P_{\mathcal{C}\leftarrow\mathcal{B}}P_{\mathcal{B}\leftarrow\mathcal{C}}=I_n\).

Proof. Write \(P=P_{\mathcal{C}\leftarrow\mathcal{B}}\) and \(Q=P_{\mathcal{B}\leftarrow\mathcal{C}}\). Take any column \(\mathbf{x}\in\mathbb{F}^n\). Since \(\mathcal{B}\) is a basis, there is a vector \(\mathbf{v}\in V\) with \([\mathbf{v}]_{\mathcal{B}}=\mathbf{x}\): explicitly, \(\mathbf{v}=x_1\mathbf{b}_1+\cdots+x_n\mathbf{b}_n\). By the definition of \(P\), \(P\mathbf{x}=[\mathbf{v}]_{\mathcal{C}}\). Applying the reverse conversion then gives \(QP\mathbf{x}=Q[\mathbf{v}]_{\mathcal{C}}=[\mathbf{v}]_{\mathcal{B}}=\mathbf{x}\). This holds for every \(\mathbf{x}\), so \(QP=I_n\): the two matrices agree on each standard coordinate vector, and these are the columns of the identity matrix.

For the other product, take any \(\mathbf{y}\in\mathbb{F}^n\). Because \(\mathcal{C}\) is a basis, it is the coordinate vector \([\mathbf{w}]_{\mathcal{C}}\) of \(\mathbf{w}=y_1\mathbf{c}_1+\cdots+y_n\mathbf{c}_n\). The reverse conversion gives \(Q\mathbf{y}=[\mathbf{w}]_{\mathcal{B}}\), and converting back gives \(PQ\mathbf{y}=P[\mathbf{w}]_{\mathcal{B}}=[\mathbf{w}]_{\mathcal{C}}=\mathbf{y}\). Thus \(PQ=I_n\) as well. These two identities show that each conversion undoes the other, so \(Q=P^{-1}\). \(\square\)

The two products are both worth checking: the first tests whether a \(\mathcal{B}\)-coordinate column returns to itself after conversion to \(\mathcal{C}\) and back, while the second tests the reverse starting point. The proof uses only the definition of the coordinate conversions and the fact that coordinates in a basis are unique.

Corollary: For these bases, there is only one matrix that converts \(\mathcal{C}\)-coordinates into \(\mathcal{B}\)-coordinates.

Proof. Suppose \(Q_1\) and \(Q_2\) both perform this conversion. For any \(\mathbf{y}\in\mathbb{F}^n\), choose \(\mathbf{v}\in V\) with \([\mathbf{v}]_{\mathcal{C}}=\mathbf{y}\), which is possible because \(\mathcal{C}\) is a basis. Both matrices must return \([\mathbf{v}]_{\mathcal{B}}\), so \(Q_1\mathbf{y}=Q_2\mathbf{y}\). This holds for every \(\mathbf{y}\), and therefore the matrices have the same columns and are equal. \(\square\)

Computing Both Directions

Worked Example: Two Bases of \(\mathbb{R}^2\)

Let \(\mathcal{B}=((1,1)^{\top},(1,-1)^{\top})\) and \(\mathcal{C}=((1,0)^{\top},(1,1)^{\top})\). Find both conversion matrices by expressing each basis vector in the other basis, then check that the matrices are inverses.

To find \([\mathbf{b}_1]_{\mathcal{C}}\), solve \(a(1,0)^{\top}+b(1,1)^{\top}=(1,1)^{\top}\). Comparing coordinates gives \(a+b=1\) and \(b=1\), so \(a=0\). Thus \([\mathbf{b}_1]_{\mathcal{C}}=(0,1)^{\top}\). For \(\mathbf{b}_2=(1,-1)^{\top}\), the equations are \(a+b=1\) and \(b=-1\), so \(a=2\). Therefore \([\mathbf{b}_2]_{\mathcal{C}}=(2,-1)^{\top}\). These coordinate vectors form the columns of the forward matrix:

$$ P_{\mathcal{C}\leftarrow\mathcal{B}} = \begin{bmatrix}0&2\\1&-1\end{bmatrix}. $$

For the reverse matrix, express each \(\mathcal{C}\)-basis vector in \(\mathcal{B}\). The equations \(r+s=1\), \(r-s=0\) give \((1,0)^{\top}=\tfrac12\mathbf{b}_1+\tfrac12\mathbf{b}_2\). The equations \(r+s=1\), \(r-s=1\) give \((1,1)^{\top}=1\mathbf{b}_1+0\mathbf{b}_2\). Hence

$$ P_{\mathcal{B}\leftarrow\mathcal{C}} = \begin{bmatrix}\tfrac12&1\\\tfrac12&0\end{bmatrix}. $$

Check the product in the order that starts with \(\mathcal{B}\)-coordinates, converts to \(\mathcal{C}\), and returns:

$$ \begin{bmatrix}\tfrac12&1\\\tfrac12&0\end{bmatrix} \begin{bmatrix}0&2\\1&-1\end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix}. $$

In the other order, the product is also the identity:

$$ \begin{bmatrix}0&2\\1&-1\end{bmatrix} \begin{bmatrix}\tfrac12&1\\\tfrac12&0\end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix}. $$

For example, the first product has entries \(1\cdot 1\) in its upper-left position, \(\tfrac12\cdot2+1\cdot(-1)=0\) in its upper-right position, and \(0\) and \(1\) in its lower row. The second product gives upper row \((1,0)\) and lower row \((0,1)\). Both calculations agree with the theorem.

Checking a Conversion on a Vector

Worked Example: Convert and Reconstruct a Vector

Use the bases in the previous example to convert \(\mathbf{v}=(4,2)^{\top}\) in both directions and verify the result by reconstruction.

First find its \(\mathcal{B}\)-coordinates. The equations \(x+y=4\) and \(x-y=2\) give \(2x=6\), hence \(x=3\), and then \(y=1\). Thus \([\mathbf{v}]_{\mathcal{B}}=(3,1)^{\top}\), and the forward conversion gives

$$ P_{\mathcal{C}\leftarrow\mathcal{B}} [\mathbf{v}]_{\mathcal{B}} = \begin{bmatrix}0&2\\1&-1\end{bmatrix} \begin{bmatrix}3\\1\end{bmatrix} = \begin{bmatrix}2\\2\end{bmatrix}. $$

Reconstructing from these \(\mathcal{C}\)-coordinates gives \(2(1,0)^{\top}+2(1,1)^{\top}=(4,2)^{\top}\), the original vector. Now apply the reverse matrix to the \(\mathcal{C}\)-coordinate column:

$$ P_{\mathcal{B}\leftarrow\mathcal{C}} \begin{bmatrix}2\\2\end{bmatrix} = \begin{bmatrix}\tfrac12&1\\\tfrac12&0\end{bmatrix} \begin{bmatrix}2\\2\end{bmatrix} = \begin{bmatrix}3\\1\end{bmatrix}. $$

Finally, \(3(1,1)^{\top}+1(1,-1)^{\top}=(4,2)^{\top}\), which again reconstructs \(\mathbf{v}\). The coordinate vector changes from \((3,1)^{\top}\) to \((2,2)^{\top}\) and back, while the vector it represents stays fixed.

A Second Pair of Bases

Worked Example: Verify a Different Pair of Conversion Matrices

Take \(\mathcal{B}=((1,0)^{\top},(1,1)^{\top})\) and \(\mathcal{C}=((1,1)^{\top},(0,1)^{\top})\). Compute both matrices and check them on \(\mathbf{v}=(3,2)^{\top}\).

A vector with \(\mathcal{B}\)-coordinates \((r,s)^{\top}\) is \((r+s,s)^{\top}\). To express \(\mathbf{b}_1=(1,0)^{\top}\) in \(\mathcal{C}\), solve \((a,a+b)=(1,0)\), giving \((a,b)=(1,-1)\). For \(\mathbf{b}_2=(1,1)^{\top}\), the equations give \((a,b)=(1,0)\). Hence

$$ P_{\mathcal{C}\leftarrow\mathcal{B}} = \begin{bmatrix}1&1\\-1&0\end{bmatrix}. $$

Conversely, \((1,1)^{\top}=\mathbf{b}_2\), so its \(\mathcal{B}\)-coordinates are \((0,1)^{\top}\). Also \((0,1)^{\top}=-\mathbf{b}_1+\mathbf{b}_2\), so its \(\mathcal{B}\)-coordinates are \((-1,1)^{\top}\). Therefore

$$ P_{\mathcal{B}\leftarrow\mathcal{C}} = \begin{bmatrix}0&-1\\1&1\end{bmatrix}. $$

Multiplying in both orders verifies the inverse relationship:

$$ \begin{bmatrix}1&1\\-1&0\end{bmatrix} \begin{bmatrix}0&-1\\1&1\end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix}, \qquad \begin{bmatrix}0&-1\\1&1\end{bmatrix} \begin{bmatrix}1&1\\-1&0\end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix}. $$

For \(\mathbf{v}=(3,2)^{\top}\), writing \(\mathbf{v}=r\mathbf{b}_1+s\mathbf{b}_2=(r+s,s)^{\top}\) gives \(s=2\) and \(r=1\), so \([\mathbf{v}]_{\mathcal{B}}=(1,2)^{\top}\). Conversion gives \(P_{\mathcal{C}\leftarrow\mathcal{B}}(1,2)^{\top}=(3,-1)^{\top}\). Indeed, \(3(1,1)^{\top}-(0,1)^{\top}=(3,2)^{\top}\). Converting back gives \(P_{\mathcal{B}\leftarrow\mathcal{C}}(3,-1)^{\top}=(1,2)^{\top}\), and \(1(1,0)^{\top}+2(1,1)^{\top}=(3,2)^{\top}\). Both the matrix multiplication and reconstruction check the conversion.

Common Pitfall: Transpose Is Not the Reverse Conversion

A common error is to assume that reversing a basis change means transposing its matrix. In the first example, transposing the forward matrix gives the incorrect candidate \(\begin{bmatrix}0&1\\2&-1\end{bmatrix}\), whereas the actual reverse matrix is \(\begin{bmatrix}\tfrac12&1\\\tfrac12&0\end{bmatrix}\). The inverse theorem requires the reverse conversion to multiply the forward conversion to give the identity; taking a transpose does not guarantee that property.

Test the incorrect candidate using the correct input direction. The vector \((4,2)^{\top}\) has \(\mathcal{C}\)-coordinates \((2,2)^{\top}\), so those—not its \(\mathcal{B}\)-coordinates—must be supplied to a proposed reverse matrix. The mistaken matrix produces

$$ \begin{bmatrix}0&1\\2&-1\end{bmatrix} \begin{bmatrix}2\\2\end{bmatrix} = \begin{bmatrix}2\\2\end{bmatrix}, $$

but the correct \(\mathcal{B}\)-coordinates are \((3,1)^{\top}\). Reconstructing the mistaken output in \(\mathcal{B}\) gives \(2(1,1)^{\top}+2(1,-1)^{\top}=(4,0)^{\top}\), not \((4,2)^{\top}\). This check exposes both the incorrect matrix and the importance of using the coordinate system named by the input side of the arrow.

For any pair of bases, a reliable procedure is to find each column by expressing the input basis vector in the output basis, then check both matrix products and, when converting a particular vector, reconstruct it from the output coordinates. The matrix inverse is not a change in the vector: it is the operation that reverses the coordinate description.

Check Your Understanding

For each problem, keep track of which coordinate system is the input and verify numerical conversions by reconstruction.

  1. If \(P_{\mathcal{C}\leftarrow\mathcal{B}}\) takes \(\mathcal{B}\)-coordinates to \(\mathcal{C}\)-coordinates, what are the input and output of \(P_{\mathcal{B}\leftarrow\mathcal{C}}\)?
  2. In the first worked example, use \(P_{\mathcal{B}\leftarrow\mathcal{C}}P_{\mathcal{C}\leftarrow\mathcal{B}}=I_2\) to check the reverse-then-forward cancellation.
  3. For the second pair of bases, convert \((2,1)^{\top}\) from \(\mathcal{B}\)-coordinates to \(\mathcal{C}\)-coordinates and reconstruct the vector.
  4. State the hypotheses of the inverse theorem and explain why both ordered bases must belong to the same space.
  5. Why is applying a proposed reverse matrix to \(\mathcal{B}\)-coordinates not a valid test of its claimed direction?

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon