# Linear Algebra/Changing Representations of Vectors

In converting ${\rm {Rep}}_{B}({\vec {v}})$ to ${\rm {Rep}}_{D}({\vec {v}})$ the underlying vector ${\vec {v}}$ doesn't change. Thus,
this translation is accomplished by the identity map on the space, described so that the domain space vectors are represented with respect to $B$ and the codomain space vectors are represented with respect to $D$.
(The diagram is vertical to fit with the ones in the next subsection.)

## Definition 1.1

The change of basis matrixfor bases $B,D\subset V$ is the representation of the identity map ${\mbox{id}}:V\to V$ with respect to those bases.
    ${\rm {Rep}}_{B,D}({\mbox{id}})=\left({\begin{array}{c|c|c}\vdots &&\vdots \\{\rm {Rep}}_{D}({\vec {\beta }}_{1})&\;\cdots \;&{\rm {Rep}}_{D}({\vec {\beta }}_{n})\\\vdots &&\vdots \end{array}}\right)$

## Lemma 1.2

Left-multiplication by the change of basis matrix for $B,D$ converts a representation with respect to $B$ to one with respect to $D$. Conversly, if left-multiplication by a matrix changes bases $M\cdot {\rm {Rep}}_{B}({\vec {v}})={\rm {Rep}}_{D}({\vec {v}})$ then $M$ is a change of basis matrix.

## Proof

For the first sentence, for each ${\vec {v}}$, as matrix-vector multiplication represents a map application, ${\rm {Rep}}_{B,D}({\mbox{id}})\cdot {\rm {Rep}}_{B}({\vec {v}})={\rm {Rep}}_{D}(\,{\mbox{id}}({\vec {v}})\,)={\rm {Rep}}_{D}({\vec {v}})$. For the second sentence, with respect to $B,D$ the matrix $M$ represents some linear map, whose action is ${\vec {v}}\mapsto {\vec {v}}$, and is therefore the identity map.

## Example 1.3

With these bases for $\mathbb {R} ^{2}$,
    $B=\langle {\begin{pmatrix}2\\1\end{pmatrix}},{\begin{pmatrix}1\\0\end{pmatrix}}\rangle \qquad D=\langle {\begin{pmatrix}-1\\1\end{pmatrix}},{\begin{pmatrix}1\\1\end{pmatrix}}\rangle$
because
    ${\rm {Rep}}_{D}(\,{\mbox{id}}({\begin{pmatrix}2\\1\end{pmatrix}}))={\begin{pmatrix}-1/2\\3/2\end{pmatrix}}_{D}\qquad {\rm {Rep}}_{D}(\,{\mbox{id}}({\begin{pmatrix}1\\0\end{pmatrix}}))={\begin{pmatrix}-1/2\\1/2\end{pmatrix}}_{D}$
the change of basis matrix is this.
    ${\rm {Rep}}_{B,D}({\rm {id)={\begin{pmatrix}-1/2&-1/2\\3/2&1/2\end{pmatrix}}}}$
We can see this matrix at work by finding the two representations of ${\vec {e}}_{2}$
    ${\rm {Rep}}_{B}({\begin{pmatrix}0\\1\end{pmatrix}})={\begin{pmatrix}1\\-2\end{pmatrix}}\qquad {\rm {Rep}}_{D}({\begin{pmatrix}0\\1\end{pmatrix}})={\begin{pmatrix}1/2\\1/2\end{pmatrix}}$
and checking that the conversion goes as expected.
    ${\begin{pmatrix}-1/2&-1/2\\3/2&1/2\end{pmatrix}}{\begin{pmatrix}1\\-2\end{pmatrix}}={\begin{pmatrix}1/2\\1/2\end{pmatrix}}$
We finish this subsection by recognizing that the change of basis matrices are familiar.

## Lemma 1.4

A matrix changes bases if and only if it is nonsingular.

## Proof

For one direction, if left-multiplication by a matrix changes bases then the matrix represents an invertible function, simply because the function is inverted by changing the bases back. Such a matrix is itself invertible, and so nonsingular.
To finish, we will show that any nonsingular matrix $M$ performs a change of basis operation from any given starting basis $B$ to some ending basis. Because the matrix is nonsingular, it will Gauss-Jordan reduce to the identity, so there are elementatry reduction matrices such that $R_{r}\cdots R_{1}\cdot M=I$. Elementary matrices are invertible and their inverses are also elementary, so multiplying from the left first by ${R_{r}}^{-1}$, then by ${R_{r-1}}^{-1}$, etc., gives $M$ as a product of elementary matrices $M={R_{1}}^{-1}\cdots {R_{r}}^{-1}$. Thus, we will be done if we show that elementary matrices change a given basis to another basis, for then ${R_{r}}^{-1}$ changes $B$ to some other basis $B_{r}$, and ${R_{r-1}}^{-1}$ changes $B_{r}$ to some $B_{r-1}$, ..., and the net effect is that $M$ changes $B$ to $B_{1}$. We will prove this about elementary matrices by covering the three types as separate cases.
Applying a row-multiplication matrix
    $M_{i}(k){\begin{pmatrix}c_{1}\\\vdots \\c_{i}\\\vdots \\c_{n}\end{pmatrix}}={\begin{pmatrix}c_{1}\\\vdots \\kc_{i}\\\vdots \\c_{n}\end{pmatrix}}$
changes a representation with respect to $\langle {\vec {\beta }}_{1},\dots ,{\vec {\beta }}_{i},\dots ,{\vec {\beta }}_{n}\rangle$ to one with respect to $\langle {\vec {\beta }}_{1},\dots ,(1/k){\vec {\beta }}_{i},\dots ,{\vec {\beta }}_{n}\rangle$ in this way.
    ${\vec {v}}=c_{1}\cdot {\vec {\beta }}_{1}+\dots +c_{i}\cdot {\vec {\beta }}_{i}+\dots +c_{n}\cdot {\vec {\beta }}_{n}$
       $\mapsto \;c_{1}\cdot {\vec {\beta }}_{1}+\dots +kc_{i}\cdot (1/k){\vec {\beta }}_{i}+\dots +c_{n}\cdot {\vec {\beta }}_{n}={\vec {v}}$
Similarly, left-multiplication by a row-swap matrix $P_{i,j}$ changes a representation with respect to the basis $\langle {\vec {\beta }}_{1},\dots ,{\vec {\beta }}_{i},\dots ,{\vec {\beta }}_{j},\dots ,{\vec {\beta }}_{n}\rangle$ into one with respect to the basis $\langle {\vec {\beta }}_{1},\dots ,{\vec {\beta }}_{j},\dots ,{\vec {\beta }}_{i},\dots ,{\vec {\beta }}_{n}\rangle$ in this way.
    ${\vec {v}}=c_{1}\cdot {\vec {\beta }}_{1}+\dots +c_{i}\cdot {\vec {\beta }}_{i}+\dots +c_{j}{\vec {\beta }}_{j}+\dots +c_{n}\cdot {\vec {\beta }}_{n}$
       $\mapsto \;c_{1}\cdot {\vec {\beta }}_{1}+\dots +c_{j}\cdot {\vec {\beta }}_{j}+\dots +c_{i}\cdot {\vec {\beta }}_{i}+\dots +c_{n}\cdot {\vec {\beta }}_{n}={\vec {v}}$
And, a representation with respect to $\langle {\vec {\beta }}_{1},\dots ,{\vec {\beta }}_{i},\dots ,{\vec {\beta }}_{j},\dots ,{\vec {\beta }}_{n}\rangle$ changes via left-multiplication by a row-combination matrix $C_{i,j}(k)$ into a representation with respect to $\langle {\vec {\beta }}_{1},\dots ,{\vec {\beta }}_{i}-k{\vec {\beta }}_{j},\dots ,{\vec {\beta }}_{j},\dots ,{\vec {\beta }}_{n}\rangle$
    ${\vec {v}}=c_{1}\cdot {\vec {\beta }}_{1}+\dots +c_{i}\cdot {\vec {\beta }}_{i}+c_{j}{\vec {\beta }}_{j}+\dots +c_{n}\cdot {\vec {\beta }}_{n}$
       $\mapsto \;c_{1}\cdot {\vec {\beta }}_{1}+\dots +c_{i}\cdot ({\vec {\beta }}_{i}-k{\vec {\beta }}_{j})+\dots +(kc_{i}+c_{j})\cdot {\vec {\beta }}_{j}+\dots +c_{n}\cdot {\vec {\beta }}_{n}={\vec {v}}$
(the definition of reduction matrices specifies that $i\neq k$ and $k\neq 0$ and so this last one is a basis).

## Corollary 1.5

A matrix is nonsingular if and only if it represents the identity map with respect to some pair of bases.
In the next subsection we will see how to translate among representations of maps, that is, how to change ${\rm {Rep}}_{B,D}(h)$ to ${\rm {Rep}}_{{\hat {B}},{\hat {D}}}(h)$. The above corollary is a special case of this, where the domain and range are the same space, and where the map is the identity map.

## Exercises

    This exercise is recommended for all readers.

### Problem 1

In $\mathbb {R} ^{2}$, where
    $D=\langle {\begin{pmatrix}2\\1\end{pmatrix}},{\begin{pmatrix}-2\\4\end{pmatrix}}\rangle$
find the change of basis matrices from $D$ to ${\mathcal {E}}_{2}$ and from ${\mathcal {E}}_{2}$ to $D$. Multiply the two.
    This exercise is recommended for all readers.

### Problem 2

Find the change of basis matrix for $B,D\subseteq \mathbb {R} ^{2}$.
* $B={\mathcal {E}}_{2}$, $D=\langle {\vec {e}}_{2},{\vec {e}}_{1}\rangle$
* $B={\mathcal {E}}_{2}$, $D=\langle {\begin{pmatrix}1\\2\end{pmatrix}},{\begin{pmatrix}1\\4\end{pmatrix}}\rangle$
* $B=\langle {\begin{pmatrix}1\\2\end{pmatrix}},{\begin{pmatrix}1\\4\end{pmatrix}}\rangle$, $D={\mathcal {E}}_{2}$
* $B=\langle {\begin{pmatrix}-1\\1\end{pmatrix}},{\begin{pmatrix}2\\2\end{pmatrix}}\rangle$, $D=\langle {\begin{pmatrix}0\\4\end{pmatrix}},{\begin{pmatrix}1\\3\end{pmatrix}}\rangle$

### Problem 3

For the bases in Problem 2, find the change of basis matrix in the other direction, from $D$ to $B$.
    This exercise is recommended for all readers.

### Problem 4

Find the change of basis matrix for each $B,D\subseteq {\mathcal {P}}_{2}$.
* $B=\langle 1,x,x^{2}\rangle ,D=\langle x^{2},1,x\rangle$
* $B=\langle 1,x,x^{2}\rangle ,D=\langle 1,1+x,1+x+x^{2}\rangle$
* $B=\langle 2,2x,x^{2}\rangle ,D=\langle 1+x^{2},1-x^{2},x+x^{2}\rangle$
    This exercise is recommended for all readers.

### Problem 5

Decide if each changes bases on $\mathbb {R} ^{2}$. To what basis is ${\mathcal {E}}_{2}$ changed?
* ${\begin{pmatrix}5&0\\0&4\end{pmatrix}}$
* ${\begin{pmatrix}2&1\\3&1\end{pmatrix}}$
* ${\begin{pmatrix}-1&4\\2&-8\end{pmatrix}}$
* ${\begin{pmatrix}1&-1\\1&1\end{pmatrix}}$

### Problem 6

Find bases such that this matrix represents the identity map with respect to those bases.
    ${\begin{pmatrix}3&1&4\\2&-1&1\\0&0&4\end{pmatrix}}$

### Problem 7

Conside the vector space of real-valued functions with basis $\langle \sin(x),\cos(x)\rangle$. Show that $\langle 2\sin(x)+\cos(x),3\cos(x)\rangle$ is also a basis for this space. Find the change of basis matrix in each direction.

### Problem 8

Where does this matrix
    ${\begin{pmatrix}\cos(2\theta )&\sin(2\theta )\\\sin(2\theta )&-\cos(2\theta )\end{pmatrix}}$
send the standard basis for $\mathbb {R} ^{2}$? Any other bases? Hint. Consider the inverse.
    This exercise is recommended for all readers.

### Problem 9

What is the change of basis matrix with respect to $B,B$?

### Problem 10

Prove that a matrix changes bases if and only if it is invertible.

### Problem 11

Finish the proof of Lemma 1.4.
    This exercise is recommended for all readers.

### Problem 12

Let $H$ be a $n\!\times \!n$ nonsingular matrix. What basis of $\mathbb {R} ^{n}$ does $H$ change to the standard basis?
    This exercise is recommended for all readers.

### Problem 13

* In ${\mathcal {P}}_{3}$ with basis $B=\langle 1+x,1-x,x^{2}+x^{3},x^{2}-x^{3}\rangle$ we have this represenatation. Find a basis $D$ giving this different representation for the same polynomial.
    ${\rm {Rep}}_{B}(1-x+3x^{2}-x^{3})={\begin{pmatrix}0\\1\\1\\2\end{pmatrix}}_{B}$
    ${\rm {Rep}}_{D}(1-x+3x^{2}-x^{3})={\begin{pmatrix}1\\0\\2\\0\end{pmatrix}}_{D}$
* State and prove that any nonzero vector representation can be changed to any other.
Hint. The proof of Lemma 1.4 is constructive— it not only says the bases change, it shows how they change.

### Problem 14

Let $V,W$ be vector spaces, and let $B,{\hat {B}}$ be bases for $V$ and $D,{\hat {D}}$ be bases for $W$. Where $h:V\to W$ is linear, find a formula relating ${\rm {Rep}}_{B,D}(h)$ to ${\rm {Rep}}_{{\hat {B}},{\hat {D}}}(h)$.
    This exercise is recommended for all readers.

### Problem 15

Show that the columns of an $n\!\times \!n$ change of basis matrix form a basis for $\mathbb {R} ^{n}$. Do all bases appear in that way: can the vectors from any $\mathbb {R} ^{n}$ basis make the columns of a change of basis matrix?
    This exercise is recommended for all readers.

### Problem 16

Find a matrix having this effect.
    ${\begin{pmatrix}1\\3\end{pmatrix}}\;\mapsto \;{\begin{pmatrix}4\\-1\end{pmatrix}}$
That is, find a $M$ that left-multiplies the starting vector to yield the ending vector. Is there a matrix having these two effects?
* ${\begin{pmatrix}1\\3\end{pmatrix}}\mapsto {\begin{pmatrix}1\\1\end{pmatrix}}\quad {\begin{pmatrix}2\\-1\end{pmatrix}}\mapsto {\begin{pmatrix}-1\\-1\end{pmatrix}}$
* ${\begin{pmatrix}1\\3\end{pmatrix}}\mapsto {\begin{pmatrix}1\\1\end{pmatrix}}\quad {\begin{pmatrix}2\\6\end{pmatrix}}\mapsto {\begin{pmatrix}-1\\-1\end{pmatrix}}$
Give a necessary and sufficient condition for there to be a matrix such that ${\vec {v}}_{1}\mapsto {\vec {w}}_{1}$ and ${\vec {v}}_{2}\mapsto {\vec {w}}_{2}$.
Solutions
For more exercises see Abstract Algebra/3x3 real matrices.