Change of Basis - Examples with Solutions

Change of Coordinates Matrices

Given two bases \( A = \{\textbf{a}_1 , \textbf{a}_2 , ... , \textbf{a}_n \} \) and \( B = \{\textbf{b}_1 , \textbf{b}_2 , ... , \textbf{b}_n \} \) for a vector space \( V \), the change of coordinates matrix from the basis \( B \) to the basis \( A \) is defined as [1] \[ P_{A \leftarrow B} = \left[ \;\;[ \textbf{b}_1]_A \;\; [\textbf{b}_2]_A ... [\textbf{b}_n]_A \;\; \right] \] where \( [\textbf{b}_1]_A \) , \( [\textbf{b}_1]_A \) ... \( [\textbf{b}_n]_A \) are the column vectors expressing the coordinates of the vectors \( \textbf{b}_1 \) , \( \textbf{b}_2 \) ... \( \textbf{b}_2 \) with respect to the basis \( A \).
In a similar way \( P_{B \leftarrow A} \) is defined by \[ P_{B \leftarrow A} = \left[ \;\;[ \textbf{a}_1]_B \;\; [\textbf{a}_2]_B ... [\textbf{a}_n]_B \;\; \right] \] It can be shown that \[ 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 \( \textbf{x} \) is a vector in \( V \), then [1]
\( [x]_A = P_{A \leftarrow B} [x]_B \) and \( [x]_B = P_{B \leftarrow A} [x]_A \)
where \( P_{A \leftarrow B} \) and \( P_{B \leftarrow A} \) are defined above.



Examples with Solutions

Example 1
Given the bases \( A = \left\{ \begin{bmatrix} 1 \\ 2 \\ \end{bmatrix} , \begin{bmatrix} -2 \\ -3 \\ \end{bmatrix} \right\} \) and \( B = \left\{ \begin{bmatrix} 2 \\ 1 \\ \end{bmatrix} , \begin{bmatrix} 1 \\ 3 \\ \end{bmatrix} \right\} \) for a vector space \( V \),
a) find matrix \( P_{A \leftarrow B} \)
b) find matrix \( P_{B \leftarrow A} \)
c) show that matrices \( P_{A \leftarrow B} \) and \( P_{B \leftarrow A} \) are inverse of each other.

Solution to Example 1
Let \( A = \left\{ \begin{bmatrix} 1 \\ 2 \\ \end{bmatrix} , \begin{bmatrix} -2 \\ -3 \\ \end{bmatrix} \right\} = \{ a_1 , a_2 \} \) and \( B = \left\{ \begin{bmatrix} 2 \\ 1 \\ \end{bmatrix} , \begin{bmatrix} 1 \\ 3 \\ \end{bmatrix} \right\} = \{ b_1 , b_2 \} \)
a)
\( P_{A \leftarrow B} = \left[ \;\;[ \textbf{b}_1]_A \; \; [\textbf{b}_2]_A \; \; \right] \)
Let \( k_1 \), \( k_2 \), \( k'_1 \), \( k'_2 \) be constants such that
\( b_1 = k_1 a_1 + k_2 a_2 \) and \( b_2 = k'_1 a_1 + k'_2 a_2 \)       (I)
Hence
\( [ \textbf{b}_1]_A = \begin{bmatrix} k_1 \\ k_2 \\ \end{bmatrix} \) and \( [ \textbf{b}_2]_A = \begin{bmatrix} k'_1 \\ k'_2 \\ \end{bmatrix} \)
We now need to find \( k_1 \), \( k_2 \), \( k'_1 \), \( k'_2 \) by solving the equations in (I) above which in matrix form written as
\( [ a_1 \quad a_2 ] \begin{bmatrix} k_1 & k'_1\\ k_2 & k_2\\ \end{bmatrix} = [b_1 \quad b_2] \)
The augmented matrix of the above is
\( \begin{bmatrix} 1 & -2 \; | \; 2 & 1\\ 2 & -3 \; | \; 1 & 3\\ \end{bmatrix} \)
Row reduce the above to
\( \begin{bmatrix} 1 & 0 \; | \; -4 & 3\\ 0 & 1 \; | \; -3 & 1\\ \end{bmatrix} \)           (II)
Hence
\( P_{A \leftarrow B} = \begin{bmatrix} k_1 & k'_1\\ k_2 & k_2\\ \end{bmatrix} = \begin{bmatrix} -4 & 3\\ -3 & 1\\ \end{bmatrix} \)
Note that omitting the details above, to find the change of coordinates matrix \( P_{A \leftarrow B} \), row reduce the matrix \( [ A \; | \; B ] \), formed by the columns of basis \( A \) and the columns of basis \( B \), to the form \( [ I \; | \; P_{A \leftarrow B} ] \) where \( I \) is the identity matrix as shown above in (II).

b)
In a similar way as above, but omitting the details, we find the change of coordinates matrix \( P_{B \leftarrow A} \) in two steps:
1)     form the matrix \( [ B \; | \; A ] \) using columns of basis \( B \) and the columns of basis \( A \) as follows
\( \begin{bmatrix} 2 & 1 \; | 1 & -2 \\ 1 & 3 \; | \; 2 & -3 \\ \end{bmatrix} \)
2)     row reduce the above to obtain
\( \begin{bmatrix} 1 & 0 \; | \; \dfrac{1}{5} & -\dfrac{3}{5}\\ 0 & 1 \; | \; \dfrac{3}{5} & -\dfrac{4}{5}\\ \end{bmatrix} \)
Having row reduced matrix \( [ B \; | \; A ] \) to the form \( [ I \; | \; P_{B \leftarrow A} ] \), we can write
\( P_{B \leftarrow A} = \begin{bmatrix} \dfrac{1}{5} & -\dfrac{3}{5}\\ \dfrac{3}{5} & -\dfrac{4}{5}\\ \end{bmatrix} \)

c)
To show that \( P_{A \leftarrow A} \) and \( P_{B \leftarrow B} \) are inverse of each oether, we need to show that their products are equal to the identity matrix.
\( P_{A \leftarrow A} \times P_{B \leftarrow A} = \begin{bmatrix} -4 & 3\\ -3 & 1\\ \end{bmatrix} \times \begin{bmatrix} \dfrac{1}{5} & -\dfrac{3}{5}\\ \dfrac{3}{5} & -\dfrac{4}{5}\\ \end{bmatrix} = \begin{bmatrix} 1 & 0\\ 0 & 1\\ \end{bmatrix} \)
and
\( P_{B \leftarrow A} \times P_{A \leftarrow A} = \begin{bmatrix} \dfrac{1}{5} & -\dfrac{3}{5}\\ \dfrac{3}{5} & -\dfrac{4}{5}\\ \end{bmatrix} \times \begin{bmatrix} -4 & 3\\ -3 & 1\\ \end{bmatrix} = \begin{bmatrix} 1 & 0\\ 0 & 1\\ \end{bmatrix} \)



Example 2
Given the bases \( 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 \} \) and \( 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\} \) for a vector space \( V \) and vector \( x = \begin{bmatrix} 5 \\ 2 \\ 6 \\ -3 \end{bmatrix} \) in \( V \).
a) Find matrix \( P_{A \leftarrow B} \)
b) Find matrix \( P_{B \leftarrow A} \)
c) Show that matrices \( P_{A \leftarrow B} \) and \( P_{B \leftarrow A} \) are inverse of each other.
d) Find \( [x]_A \) and \( [x]_B \) directly using the definition of coordinates.
e) Verify the formulas \( [x]_A = P_{A \leftarrow B} [x]_B \) and \( [x]_B = P_{B \leftarrow A} [x]_A \) given above.

Solution to Example 2
a)
\( P_{A \leftarrow B} \) is found by row reducing the augmented matrix (see example 1 above)
\( \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} \)
Row reduce to
\( \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} \)

b)
\( P_{B \leftarrow A} \) is found by row reducing the augmented matrix (see example 1 above)
\( \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} \)
Row reduce to
\( \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)
It is enough to show that their product of \( P_{A \leftarrow B} \) and \( P_{B \leftarrow A} \) gives the identity matrix.
\( \begin{bmatrix} 1 & 0 & 1\\ 0 & 1 & 2 \\ 1 & -1 & 0\\ \end{bmatrix} \times \begin{bmatrix} 2 & -1 & -1\\ 2 & -1 & -2 \\ -1 & 1 & 1 \end{bmatrix} = \begin{bmatrix} 2 & -1 & -1\\ 2 & -1 & -2 \\ -1 & 1 & 1 \end{bmatrix} \times \begin{bmatrix} 1 & 0 & 1\\ 0 & 1 & 2 \\ 1 & -1 & 0\\ \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 0 \\ 0 & 0 & 1\\ \end{bmatrix} \)

d)
To find the coordinates of \( x \) in base \( A \) written as \( [x]_A \), we need to row reduce
\( \begin{bmatrix} 1 & 1 & 1 &|& 5\\ 1 & 0 & -1 &|& 2 \\ 0 & 2 & -1 &|& 6 \\ 0 & -1 & 2 &|& - 3 \end{bmatrix} \)
Row reduce to solve
\( \begin{bmatrix} 1 & 0 & 0 &|& 2\\ 0 & 1 & 0 &|& 3 \\ 0 & 0 & 1 &|& 0 \\ 0 & 0 & 0 &|& 0 \end{bmatrix} \)
Hence
\( [x]_A = \begin{bmatrix} 2\\ 3 \\ 0 \\ \end{bmatrix} \)

To find the coordinates of \( x \) in base \( B \) written as \( [x]_B \), we need to row reduce
\( \begin{bmatrix} 2 & 0 & 3 &|& 5\\ 0 & 1 & 1 &|& 2 \\ -1 & 3 & 4 &|& 6 \\ 2 & -3 & -2&|& - 3 \end{bmatrix} \)
Row reduce to solve
\( \begin{bmatrix} 1 & 0 & 0 &|& 1\\ 0 & 1 & 0 &|& 1 \\ 0 & 0 & 1 &|& 1 \\ 0 & 0 & 0 &|& 0 \end{bmatrix} \)
Hence
\( [x]_B = \begin{bmatrix} 1\\ 1 \\ 1 \\ \end{bmatrix} \)

e)
We compute the product \( P_{A \leftarrow B} \cdot [x]_B \)
\( \begin{bmatrix} 1 & 0 & 1\\ 0 & 1 & 2 \\ 1 & -1 & 0\\ \end{bmatrix} \cdot \begin{bmatrix} 1\\ 1 \\ 1 \\ \end{bmatrix} = \begin{bmatrix} 2\\ 3 \\ 0 \\ \end{bmatrix} \)
and we can see that \( P_{A \leftarrow B} \cdot [x]_B = [x]_A\)

We compute the product \( P_{B \leftarrow A} \cdot [x]_A \)
\( \begin{bmatrix} 2 & -1 & -1\\ 2 & -1 & -2 \\ -1 & 1 & 1 \end{bmatrix} \cdot \begin{bmatrix} 2\\ 3 \\ 0 \\ \end{bmatrix} = \begin{bmatrix} 1\\ 1 \\ 1\\ \end{bmatrix} \)
and we can see that \( P_{B \leftarrow A} \cdot [x]_A = [x]_B\)


More References and links

  1. Linear Algebra - Questions with Solutions
  2. Linear Algebra and its Applications - 5 th Edition - David C. Lay , Steven R. Lay , Judi J. McDonald
  3. Introduction to Linear Algebra - Fifth Edition (2016) - Gilbert Strang
  4. Linear Algebra Done Right - third edition, 2015 - Sheldon Axler
  5. Linear Algebra with Applications - 2012 - Gareth Williams
  6. Elementary Linear Algebra - 7 th Edition - Howard Anton and Chris Rorres

Search