Change of Basis – Examples with Solutions
A vector in a vector space can be represented by different coordinate vectors, depending on the basis chosen. This page explains how to move between two bases using a change-of-basis matrix, with worked examples and detailed solutions.
Change of Coordinates Matrices
Given two bases \( A = \{ \mathbf{a}_1, \mathbf{a}_2, \dots, \mathbf{a}_n \} \) and \( B = \{ \mathbf{b}_1, \mathbf{b}_2, \dots, \mathbf{b}_n \} \) of a vector space \( V \), the change-of-coordinates matrix from \(B\) to \(A\) is defined as:
\[ P_{A \leftarrow B} = \begin{bmatrix} [\mathbf{b}_1]_A & [\mathbf{b}_2]_A & \dots & [\mathbf{b}_n]_A \end{bmatrix}, \]
where \( [\mathbf{b}_i]_A \) is the coordinate vector of \( \mathbf{b}_i \) in the basis \( A \).
Similarly, the change-of-coordinates matrix from \(A\) to \(B\) is:
\[ P_{B \leftarrow A} = \begin{bmatrix} [\mathbf{a}_1]_B & [\mathbf{a}_2]_B & \dots & [\mathbf{a}_n]_B \end{bmatrix}. \]
The two matrices are inverses of each other:
\[ P_{B \leftarrow A} = (P_{A \leftarrow B})^{-1}. \]
Applications of Change of Coordinates Matrices
If \( A \) and \( B \) are bases for a vector space \( V \) and \( \mathbf{x} \) is any vector in \( V \), we can convert its coordinates between bases using the change-of-basis matrices:
\[ [\mathbf{x}]_A = P_{A \leftarrow B} [\mathbf{x}]_B \quad \text{and} \quad [\mathbf{x}]_B = P_{B \leftarrow A} [\mathbf{x}]_A. \]
Examples with Solutions
Example 1 — Change of Basis in \(\mathbb{R}^2\)
Given the bases \( A \) and \( B \) for a vector space \( V \):
\[ A = \left\{ \begin{bmatrix} 1 \\ 2 \end{bmatrix}, \begin{bmatrix} -2 \\ -3 \end{bmatrix} \right\}, \qquad B = \left\{ \begin{bmatrix} 2 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 \\ 3 \end{bmatrix} \right\}. \]
(a) Find \( P_{A \leftarrow B} \). (b) Find \( P_{B \leftarrow A} \). (c) Show that the two matrices are inverses.
Solution
(a) Find \( P_{A \leftarrow B} \).
By definition, \( P_{A \leftarrow B} = \begin{bmatrix} [\mathbf{b}_1]_A & [\mathbf{b}_2]_A \end{bmatrix} \). Form the augmented matrix \( [A \mid B] \):
\[ \begin{bmatrix} 1 & -2 & | & 2 & 1 \\ 2 & -3 & | & 1 & 3 \end{bmatrix}. \]
Row-reduce to obtain \( [I \mid P_{A \leftarrow B}] \):
\[ \begin{bmatrix} 1 & 0 & | & -4 & 3 \\ 0 & 1 & | & -3 & 1 \end{bmatrix}. \]
Hence
\[ P_{A \leftarrow B} = \begin{bmatrix} -4 & 3 \\ -3 & 1 \end{bmatrix}. \]
(b) Find \( P_{B \leftarrow A} \).
Form the augmented matrix \( [B \mid A] \):
\[ \begin{bmatrix} 2 & 1 & | & 1 & -2 \\ 1 & 3 & | & 2 & -3 \end{bmatrix}. \]
Row-reduce to obtain \( [I \mid P_{B \leftarrow A}] \):
\[ \begin{bmatrix} 1 & 0 & | & \tfrac{1}{5} & -\tfrac{3}{5} \\ 0 & 1 & | & \tfrac{3}{5} & -\tfrac{4}{5} \end{bmatrix}. \]
Hence
\[ P_{B \leftarrow A} = \begin{bmatrix} \tfrac{1}{5} & -\tfrac{3}{5} \\ \tfrac{3}{5} & -\tfrac{4}{5} \end{bmatrix}. \]
(c) Show that the two matrices are inverses.
\[ P_{A \leftarrow B} P_{B \leftarrow A} = \begin{bmatrix} -4 & 3 \\ -3 & 1 \end{bmatrix} \begin{bmatrix} \tfrac{1}{5} & -\tfrac{3}{5} \\ \tfrac{3}{5} & -\tfrac{4}{5} \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}. \]
\[ P_{B \leftarrow A} P_{A \leftarrow B} = \begin{bmatrix} \tfrac{1}{5} & -\tfrac{3}{5} \\ \tfrac{3}{5} & -\tfrac{4}{5} \end{bmatrix} \begin{bmatrix} -4 & 3 \\ -3 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}. \]
Example 2 — Change of Basis in a 3-Dimensional Subspace of \(\mathbb{R}^4\)
Given the bases \( A \) and \( B \) for a subspace \( V \) and a vector \( \mathbf{x} \):
\[ A = \left\{ \begin{bmatrix} 1 \\ 1 \\ 0 \\ 0 \end{bmatrix}, \begin{bmatrix} 1 \\ 0 \\ 2 \\ -1 \end{bmatrix}, \begin{bmatrix} 1 \\ -1 \\ -1 \\ 2 \end{bmatrix} \right\}, \quad B = \left\{ \begin{bmatrix} 2 \\ 0 \\ -1 \\ 2 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \\ 3 \\ -3 \end{bmatrix}, \begin{bmatrix} 3 \\ 1 \\ 4 \\ -2 \end{bmatrix} \right\}, \]
\[ \mathbf{x} = \begin{bmatrix} 5 \\ 2 \\ 6 \\ -3 \end{bmatrix}. \]
(a) Find \( P_{A \leftarrow B} \). (b) Find \( P_{B \leftarrow A} \). (c) Find \( [\mathbf{x}]_A \) and \( [\mathbf{x}]_B \). (d) Verify \( [\mathbf{x}]_A = P_{A \leftarrow B} [\mathbf{x}]_B \) and \( [\mathbf{x}]_B = P_{B \leftarrow A} [\mathbf{x}]_A \).
Solution
(a) Find \( P_{A \leftarrow B} \).
Row-reduce the augmented matrix \( [A \mid B] \):
\[ \begin{bmatrix} 1 & 1 & 1 & | & 2 & 0 & 3 \\ 1 & 0 & -1 & | & 0 & 1 & 1 \\ 0 & 2 & -1 & | & -1 & 3 & 4 \\ 0 & -1 & 2 & | & 2 & -3 & -2 \end{bmatrix} \xrightarrow{\text{RREF}} \begin{bmatrix} 1 & 0 & 0 & | & 1 & 0 & 1 \\ 0 & 1 & 0 & | & 0 & 1 & 2 \\ 0 & 0 & 1 & | & 1 & -1 & 0 \\ 0 & 0 & 0 & | & 0 & 0 & 0 \end{bmatrix}. \]
Hence
\[ P_{A \leftarrow B} = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 2 \\ 1 & -1 & 0 \end{bmatrix}. \]
Note: the last row of zeros is expected — \(A\) and \(B\) span only a 3-dimensional subspace of \( \mathbb{R}^4 \).
(b) Find \( P_{B \leftarrow A} \).
Row-reduce \( [B \mid A] \):
\[ \begin{bmatrix} 2 & 0 & 3 & | & 1 & 1 & 1 \\ 0 & 1 & 1 & | & 1 & 0 & -1 \\ -1 & 3 & 4 & | & 0 & 2 & -1 \\ 2 & -3 & -2 & | & 0 & -1 & 2 \end{bmatrix} \xrightarrow{\text{RREF}} \begin{bmatrix} 1 & 0 & 0 & | & 2 & -1 & -1 \\ 0 & 1 & 0 & | & 2 & -1 & -2 \\ 0 & 0 & 1 & | & -1 & 1 & 1 \\ 0 & 0 & 0 & | & 0 & 0 & 0 \end{bmatrix}. \]
Hence
\[ P_{B \leftarrow A} = \begin{bmatrix} 2 & -1 & -1 \\ 2 & -1 & -2 \\ -1 & 1 & 1 \end{bmatrix}. \]
(c) Find \( [\mathbf{x}]_A \) and \( [\mathbf{x}]_B \).
To find \( [\mathbf{x}]_A \), row-reduce \( [A \mid \mathbf{x}] \):
\[ \begin{bmatrix} 1 & 1 & 1 & | & 5 \\ 1 & 0 & -1 & | & 2 \\ 0 & 2 & -1 & | & 6 \\ 0 & -1 & 2 & | & -3 \end{bmatrix} \xrightarrow{\text{RREF}} \begin{bmatrix} 1 & 0 & 0 & | & 2 \\ 0 & 1 & 0 & | & 3 \\ 0 & 0 & 1 & | & 0 \\ 0 & 0 & 0 & | & 0 \end{bmatrix} \;\Rightarrow\; [\mathbf{x}]_A = \begin{bmatrix} 2 \\ 3 \\ 0 \end{bmatrix}. \]
To find \( [\mathbf{x}]_B \), row-reduce \( [B \mid \mathbf{x}] \):
\[ \begin{bmatrix} 2 & 0 & 3 & | & 5 \\ 0 & 1 & 1 & | & 2 \\ -1 & 3 & 4 & | & 6 \\ 2 & -3 & -2 & | & -3 \end{bmatrix} \xrightarrow{\text{RREF}} \begin{bmatrix} 1 & 0 & 0 & | & 1 \\ 0 & 1 & 0 & | & 1 \\ 0 & 0 & 1 & | & 1 \\ 0 & 0 & 0 & | & 0 \end{bmatrix} \;\Rightarrow\; [\mathbf{x}]_B = \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}. \]
(d) Verify the transformation formulas.
\[ P_{A \leftarrow B} [\mathbf{x}]_B = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 2 \\ 1 & -1 & 0 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 2 \\ 3 \\ 0 \end{bmatrix} = [\mathbf{x}]_A. \quad \checkmark \]
\[ P_{B \leftarrow A} [\mathbf{x}]_A = \begin{bmatrix} 2 & -1 & -1 \\ 2 & -1 & -2 \\ -1 & 1 & 1 \end{bmatrix} \begin{bmatrix} 2 \\ 3 \\ 0 \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} = [\mathbf{x}]_B. \quad \checkmark \]
More References and Links
- Linear Algebra – Questions with Solutions
- Basis, Coordinates, and Dimension of Vector Spaces
- Linear Algebra and its Applications – 5th Edition – David C. Lay, Steven R. Lay, Judi J. McDonald
- Introduction to Linear Algebra – 5th Edition (2016) – Gilbert Strang
- Linear Algebra Done Right – 3rd Edition (2015) – Sheldon Axler
- Linear Algebra with Applications (2012) – Gareth Williams
- Elementary Linear Algebra – 7th Edition – Howard Anton and Chris Rorres