# Linear Algebra/Representing Linear Maps with Matrices

Linear Algebra
 ← Computing Linear Maps Representing Linear Maps with Matrices Any Matrix Represents a Linear Map →
Example 1.1

Consider a map ${\displaystyle h}$ with domain ${\displaystyle \mathbb {R} ^{2}}$ and codomain ${\displaystyle \mathbb {R} ^{3}}$ (fixing

${\displaystyle B=\langle {\begin{pmatrix}2\\0\end{pmatrix}},{\begin{pmatrix}1\\4\end{pmatrix}}\rangle \quad {\text{and}}\quad D=\langle {\begin{pmatrix}1\\0\\0\end{pmatrix}},{\begin{pmatrix}0\\-2\\0\end{pmatrix}},{\begin{pmatrix}1\\0\\1\end{pmatrix}}\rangle }$

as the bases for these spaces) that is determined by this action on the vectors in the domain's basis.

${\displaystyle {\begin{pmatrix}2\\0\end{pmatrix}}{\stackrel {h}{\longmapsto }}{\begin{pmatrix}1\\1\\1\end{pmatrix}}\qquad {\begin{pmatrix}1\\4\end{pmatrix}}{\stackrel {h}{\longmapsto }}{\begin{pmatrix}1\\2\\0\end{pmatrix}}}$

To compute the action of this map on any vector at all from the domain, we first express ${\displaystyle h({\vec {\beta }}_{1})}$ and ${\displaystyle h({\vec {\beta }}_{2})}$ with respect to the codomain's basis:

${\displaystyle {\begin{pmatrix}1\\1\\1\end{pmatrix}}=0{\begin{pmatrix}1\\0\\0\end{pmatrix}}-{\frac {1}{2}}{\begin{pmatrix}0\\-2\\0\end{pmatrix}}+1{\begin{pmatrix}1\\0\\1\end{pmatrix}}\quad {\text{so}}\quad {\rm {Rep}}_{D}(h({\vec {\beta }}_{1}))={\begin{pmatrix}0\\-1/2\\1\end{pmatrix}}_{D}}$

and

${\displaystyle {\begin{pmatrix}1\\2\\0\end{pmatrix}}=1{\begin{pmatrix}1\\0\\0\end{pmatrix}}-1{\begin{pmatrix}0\\-2\\0\end{pmatrix}}+0{\begin{pmatrix}1\\0\\1\end{pmatrix}}\quad {\text{so}}\quad {\rm {Rep}}_{D}(h({\vec {\beta }}_{2}))={\begin{pmatrix}1\\-1\\0\end{pmatrix}}_{D}}$

(these are easy to check). Then, as described in the preamble, for any member ${\displaystyle {\vec {v}}}$ of the domain, we can express the image ${\displaystyle h({\vec {v}})}$ in terms of the ${\displaystyle h({\vec {\beta }})}$'s.

${\displaystyle {\begin{array}{rl}h({\vec {v}})&=h(c_{1}\cdot {\begin{pmatrix}2\\0\end{pmatrix}}+c_{2}\cdot {\begin{pmatrix}1\\4\end{pmatrix}})\\&=c_{1}\cdot h({\begin{pmatrix}2\\0\end{pmatrix}})+c_{2}\cdot h({\begin{pmatrix}1\\4\end{pmatrix}})\\&=c_{1}\cdot (0{\begin{pmatrix}1\\0\\0\end{pmatrix}}\!-{\frac {1}{2}}{\begin{pmatrix}0\\-2\\0\end{pmatrix}}\!+1{\begin{pmatrix}1\\0\\1\end{pmatrix}}\!)+c_{2}\cdot (1{\begin{pmatrix}1\\0\\0\end{pmatrix}}\!-1{\begin{pmatrix}0\\-2\\0\end{pmatrix}}\!+0{\begin{pmatrix}1\\0\\1\end{pmatrix}}\!)\\&=(0c_{1}+1c_{2})\cdot {\begin{pmatrix}1\\0\\0\end{pmatrix}}+(-{\frac {1}{2}}c_{1}-1c_{2})\cdot {\begin{pmatrix}0\\-2\\0\end{pmatrix}}+(1c_{1}+0c_{2})\cdot {\begin{pmatrix}1\\0\\1\end{pmatrix}}\end{array}}}$

Thus,

with ${\displaystyle {\rm {Rep}}_{B}({\vec {v}})={\begin{pmatrix}c_{1}\\c_{2}\end{pmatrix}}}$ then ${\displaystyle {\rm {Rep}}_{D}(\,h({\vec {v}})\,)={\begin{pmatrix}0c_{1}+1c_{2}\\-(1/2)c_{1}-1c_{2}\\1c_{1}+0c_{2}\end{pmatrix}}}$.

For instance,

with ${\displaystyle {\rm {Rep}}_{B}({\begin{pmatrix}4\\8\end{pmatrix}})={\begin{pmatrix}1\\2\end{pmatrix}}_{B}}$ then ${\displaystyle {\rm {Rep}}_{D}(\,h({\begin{pmatrix}4\\8\end{pmatrix}})\,)={\begin{pmatrix}2\\-5/2\\1\end{pmatrix}}}$.

We will express computations like the one above with a matrix notation.

${\displaystyle {\begin{pmatrix}0&1\\-1/2&-1\\1&0\end{pmatrix}}_{B,D}{\begin{pmatrix}c_{1}\\c_{2}\end{pmatrix}}_{B}={\begin{pmatrix}0c_{1}+1c_{2}\\(-1/2)c_{1}-1c_{2}\\1c_{1}+0c_{2}\end{pmatrix}}_{D}}$

In the middle is the argument ${\displaystyle {\vec {v}}}$ to the map, represented with respect to the domain's basis ${\displaystyle B}$ by a column vector with components ${\displaystyle c_{1}}$ and ${\displaystyle c_{2}}$. On the right is the value ${\displaystyle h({\vec {v}})}$ of the map on that argument, represented with respect to the codomain's basis ${\displaystyle D}$ by a column vector with components ${\displaystyle 0c_{1}+1c_{2}}$, etc. The matrix on the left is the new thing. It consists of the coefficients from the vector on the right, ${\displaystyle 0}$ and ${\displaystyle 1}$ from the first row, ${\displaystyle -1/2}$ and ${\displaystyle -1}$ from the second row, and ${\displaystyle 1}$ and ${\displaystyle 0}$ from the third row.

This notation simply breaks the parts from the right, the coefficients and the ${\displaystyle c}$'s, out separately on the left, into a vector that represents the map's argument and a matrix that we will take to represent the map itself.

Definition 1.2

Suppose that ${\displaystyle V}$ and ${\displaystyle W}$ are vector spaces of dimensions ${\displaystyle n}$ and ${\displaystyle m}$ with bases ${\displaystyle B}$ and ${\displaystyle D}$, and that ${\displaystyle h:V\to W}$ is a linear map. If

${\displaystyle {\rm {Rep}}_{D}(h({\vec {\beta }}_{1}))={\begin{pmatrix}h_{1,1}\\h_{2,1}\\\vdots \\h_{m,1}\end{pmatrix}}_{D}\;\ldots \;{\rm {Rep}}_{D}(h({\vec {\beta }}_{n}))={\begin{pmatrix}h_{1,n}\\h_{2,n}\\\vdots \\h_{m,n}\end{pmatrix}}_{D}}$

then

${\displaystyle {\rm {Rep}}_{B,D}(h)=\left({\begin{array}{cccc}h_{1,1}&h_{1,2}&\ldots &h_{1,n}\\h_{2,1}&h_{2,2}&\ldots &h_{2,n}\\&\vdots \\h_{m,1}&h_{m,2}&\ldots &h_{m,n}\end{array}}\right)_{B,D}}$

is the matrix representation of ${\displaystyle h}$ with respect to ${\displaystyle B,D}$.

Briefly, the vectors representing the ${\displaystyle h({\vec {\beta }})}$'s are adjoined to make the matrix representing the map.

${\displaystyle {\rm {Rep}}_{B,D}(h)=\left({\begin{array}{c|c|c}\vdots &&\vdots \\{\rm {Rep}}_{D}(\,h({\vec {\beta }}_{1})\,)&\cdots &{\rm {Rep}}_{D}(\,h({\vec {\beta }}_{n})\,)\\\vdots &&\vdots \end{array}}\right)}$

Observe that the number of columns ${\displaystyle n}$ of the matrix is the dimension of the domain of the map, and the number of rows ${\displaystyle m}$ is the dimension of the codomain.

Example 1.3

If ${\displaystyle h:\mathbb {R} ^{3}\to {\mathcal {P}}_{1}}$ is given by

${\displaystyle {\begin{pmatrix}a_{1}\\a_{2}\\a_{3}\end{pmatrix}}{\stackrel {h}{\longmapsto }}(2a_{1}+a_{2})+(-a_{3})x}$

then where

${\displaystyle B=\langle {\begin{pmatrix}0\\0\\1\end{pmatrix}},{\begin{pmatrix}0\\2\\0\end{pmatrix}},{\begin{pmatrix}2\\0\\0\end{pmatrix}}\rangle \quad {\text{and}}\quad D=\langle 1+x,-1+x\rangle }$

the action of ${\displaystyle h}$ on ${\displaystyle B}$ is given by

${\displaystyle {\begin{pmatrix}0\\0\\1\end{pmatrix}}{\stackrel {h}{\longmapsto }}-x\qquad {\begin{pmatrix}0\\2\\0\end{pmatrix}}{\stackrel {h}{\longmapsto }}2\qquad {\begin{pmatrix}2\\0\\0\end{pmatrix}}{\stackrel {h}{\longmapsto }}4}$

and a simple calculation gives

${\displaystyle {\rm {Rep}}_{D}(-x)={\begin{pmatrix}-1/2\\-1/2\end{pmatrix}}_{D}\quad {\rm {Rep}}_{D}(2)={\begin{pmatrix}1\\-1\end{pmatrix}}_{D}\quad {\rm {Rep}}_{D}(4)={\begin{pmatrix}2\\-2\end{pmatrix}}_{D}}$

showing that this is the matrix representing ${\displaystyle h}$ with respect to the bases.

${\displaystyle {\rm {Rep}}_{B,D}(h)={\begin{pmatrix}-1/2&1&2\\-1/2&-1&-2\end{pmatrix}}_{B,D}}$

We will use lower case letters for a map, upper case for the matrix, and lower case again for the entries of the matrix. Thus for the map ${\displaystyle h}$, the matrix representing it is ${\displaystyle H}$, with entries ${\displaystyle h_{i,j}}$.

Theorem 1.4

Assume that ${\displaystyle V}$ and ${\displaystyle W}$ are vector spaces of dimensions ${\displaystyle m}$ and ${\displaystyle n}$ with bases ${\displaystyle B}$ and ${\displaystyle D}$, and that ${\displaystyle h:V\to W}$ is a linear map. If ${\displaystyle h}$ is represented by

${\displaystyle {\rm {Rep}}_{B,D}(h)=\left({\begin{array}{cccc}h_{1,1}&h_{1,2}&\ldots &h_{1,n}\\h_{2,1}&h_{2,2}&\ldots &h_{2,n}\\&\vdots \\h_{m,1}&h_{m,2}&\ldots &h_{m,n}\end{array}}\right)_{B,D}}$

and ${\displaystyle {\vec {v}}\in V}$ is represented by

${\displaystyle {\rm {Rep}}_{B}({\vec {v}})={\begin{pmatrix}c_{1}\\c_{2}\\\vdots \\c_{n}\end{pmatrix}}_{B}}$

then the representation of the image of ${\displaystyle {\vec {v}}}$ is this.

${\displaystyle {\rm {Rep}}_{D}(\,h({\vec {v}})\,)={\begin{pmatrix}h_{1,1}c_{1}+h_{1,2}c_{2}+\dots +h_{1,n}c_{n}\\h_{2,1}c_{1}+h_{2,2}c_{2}+\dots +h_{2,n}c_{n}\\\vdots \\h_{m,1}c_{1}+h_{m,2}c_{2}+\dots +h_{m,n}c_{n}\end{pmatrix}}_{D}}$
Proof

We will think of the matrix ${\displaystyle {\rm {Rep}}_{B,D}(h)}$ and the vector ${\displaystyle {\rm {Rep}}_{B}({\vec {v}})}$ as combining to make the vector ${\displaystyle {\rm {Rep}}_{D}(h({\vec {v}}))}$.

Definition 1.5

The matrix-vector product of a ${\displaystyle m\!\times \!n}$ matrix and a ${\displaystyle n\!\times \!1}$ vector is this.

${\displaystyle \left({\begin{array}{cccc}a_{1,1}&a_{1,2}&\ldots &a_{1,n}\\a_{2,1}&a_{2,2}&\ldots &a_{2,n}\\&\vdots \\a_{m,1}&a_{m,2}&\ldots &a_{m,n}\end{array}}\right){\begin{pmatrix}c_{1}\\\vdots \\c_{n}\end{pmatrix}}={\begin{pmatrix}a_{1,1}c_{1}+a_{1,2}c_{2}+\dots +a_{1,n}c_{n}\\a_{2,1}c_{1}+a_{2,2}c_{2}+\dots +a_{2,n}c_{n}\\\vdots \\a_{m,1}c_{1}+a_{m,2}c_{2}+\dots +a_{m,n}c_{n}\end{pmatrix}}}$

The point of Definition 1.2 is to generalize Example 1.1, that is, the point of the definition is Theorem 1.4, that the matrix describes how to get from the representation of a domain vector with respect to the domain's basis to the representation of its image in the codomain with respect to the codomain's basis. With Definition 1.5, we can restate this as: application of a linear map is represented by the matrix-vector product of the map's representative and the vector's representative.

Example 1.6

With the matrix from Example 1.3 we can calculate where that map sends this vector.

${\displaystyle {\vec {v}}={\begin{pmatrix}4\\1\\0\end{pmatrix}}}$

This vector is represented, with respect to the domain basis ${\displaystyle B}$, by

${\displaystyle {\rm {Rep}}_{B}({\vec {v}})={\begin{pmatrix}0\\1/2\\2\end{pmatrix}}_{B}}$

and so this is the representation of the value ${\displaystyle h({\vec {v}})}$ with respect to the codomain basis ${\displaystyle D}$.

${\displaystyle {\begin{array}{rl}{\rm {Rep}}_{D}(h({\vec {v}}))&={\begin{pmatrix}-1/2&1&2\\-1/2&-1&-2\end{pmatrix}}_{B,D}{\begin{pmatrix}0\\1/2\\2\end{pmatrix}}_{B}\\&={\begin{pmatrix}(-1/2)\cdot 0+1\cdot (1/2)+2\cdot 2\\(-1/2)\cdot 0-1\cdot (1/2)-2\cdot 2\end{pmatrix}}_{D}={\begin{pmatrix}9/2\\-9/2\end{pmatrix}}_{D}\end{array}}}$

To find ${\displaystyle h({\vec {v}})}$ itself, not its representation, take ${\displaystyle (9/2)(1+x)-(9/2)(-1+x)=9}$.

Example 1.7

Let ${\displaystyle \pi :\mathbb {R} ^{3}\to \mathbb {R} ^{2}}$ be projection onto the ${\displaystyle xy}$-plane. To give a matrix representing this map, we first fix bases.

${\displaystyle B=\langle {\begin{pmatrix}1\\0\\0\end{pmatrix}},{\begin{pmatrix}1\\1\\0\end{pmatrix}},{\begin{pmatrix}-1\\0\\1\end{pmatrix}}\rangle \qquad D=\langle {\begin{pmatrix}2\\1\end{pmatrix}},{\begin{pmatrix}1\\1\end{pmatrix}}\rangle }$

For each vector in the domain's basis, we find its image under the map.

${\displaystyle {\begin{pmatrix}1\\0\\0\end{pmatrix}}{\stackrel {\pi }{\longmapsto }}{\begin{pmatrix}1\\0\end{pmatrix}}\quad {\begin{pmatrix}1\\1\\0\end{pmatrix}}{\stackrel {\pi }{\longmapsto }}{\begin{pmatrix}1\\1\end{pmatrix}}\quad {\begin{pmatrix}-1\\0\\1\end{pmatrix}}{\stackrel {\pi }{\longmapsto }}{\begin{pmatrix}-1\\0\end{pmatrix}}}$

Then we find the representation of each image with respect to the codomain's basis

${\displaystyle {\rm {Rep}}_{D}({\begin{pmatrix}1\\0\end{pmatrix}})={\begin{pmatrix}1\\-1\end{pmatrix}}\quad {\rm {Rep}}_{D}({\begin{pmatrix}1\\1\end{pmatrix}})={\begin{pmatrix}0\\1\end{pmatrix}}\quad {\rm {Rep}}_{D}({\begin{pmatrix}-1\\0\end{pmatrix}})={\begin{pmatrix}-1\\1\end{pmatrix}}}$

(these are easily checked). Finally, adjoining these representations gives the matrix representing ${\displaystyle \pi }$ with respect to ${\displaystyle B,D}$.

${\displaystyle {\rm {Rep}}_{B,D}(\pi )={\begin{pmatrix}1&0&-1\\-1&1&1\end{pmatrix}}_{B,D}}$

We can illustrate Theorem 1.4 by computing the matrix-vector product representing the following statement about the projection map.

${\displaystyle \pi ({\begin{pmatrix}2\\2\\1\end{pmatrix}})={\begin{pmatrix}2\\2\end{pmatrix}}}$

Representing this vector from the domain with respect to the domain's basis

${\displaystyle {\rm {Rep}}_{B}({\begin{pmatrix}2\\2\\1\end{pmatrix}})={\begin{pmatrix}1\\2\\1\end{pmatrix}}_{B}}$

gives this matrix-vector product.

${\displaystyle {\rm {Rep}}_{D}(\,\pi ({\begin{pmatrix}2\\2\\1\end{pmatrix}})\,)={\begin{pmatrix}1&0&-1\\-1&1&1\end{pmatrix}}_{B,D}{\begin{pmatrix}1\\2\\1\end{pmatrix}}_{B}={\begin{pmatrix}0\\2\end{pmatrix}}_{D}}$

Expanding this representation into a linear combination of vectors from ${\displaystyle D}$

${\displaystyle 0\cdot {\begin{pmatrix}2\\1\end{pmatrix}}+2\cdot {\begin{pmatrix}1\\1\end{pmatrix}}={\begin{pmatrix}2\\2\end{pmatrix}}}$

checks that the map's action is indeed reflected in the operation of the matrix. (We will sometimes compress these three displayed equations into one

${\displaystyle {\begin{pmatrix}2\\2\\1\end{pmatrix}}={\begin{pmatrix}1\\2\\1\end{pmatrix}}_{B}\;{\overset {h}{\underset {H}{\longmapsto }}}\;{\begin{pmatrix}0\\2\end{pmatrix}}_{D}={\begin{pmatrix}2\\2\end{pmatrix}}}$

in the course of a calculation.)

We now have two ways to compute the effect of projection, the straightforward formula that drops each three-tall vector's third component to make a two-tall vector, and the above formula that uses representations and matrix-vector multiplication. Compared to the first way, the second way might seem complicated. However, it has advantages. The next example shows that giving a formula for some maps is simplified by this new scheme.

Example 1.8

To represent a rotation map ${\displaystyle t_{\theta }:\mathbb {R} ^{2}\to \mathbb {R} ^{2}}$ that turns all vectors in the plane counterclockwise through an angle ${\displaystyle \theta }$

we start by fixing bases. Using ${\displaystyle {\mathcal {E}}_{2}}$ both as a domain basis and as a codomain basis is natural, Now, we find the image under the map of each vector in the domain's basis.

${\displaystyle {\begin{pmatrix}1\\0\end{pmatrix}}{\stackrel {t_{\theta }}{\longmapsto }}{\begin{pmatrix}\cos \theta \\\sin \theta \end{pmatrix}}\qquad {\begin{pmatrix}0\\1\end{pmatrix}}{\stackrel {t_{\theta }}{\longmapsto }}{\begin{pmatrix}-\sin \theta \\\cos \theta \end{pmatrix}}}$

Then we represent these images with respect to the codomain's basis. Because this basis is ${\displaystyle {\mathcal {E}}_{2}}$, vectors are represented by themselves. Finally, adjoining the representations gives the matrix representing the map.

${\displaystyle {\rm {Rep}}_{{\mathcal {E}}_{2},{\mathcal {E}}_{2}}(t_{\theta })={\begin{pmatrix}\cos \theta &-\sin \theta \\\sin \theta &\cos \theta \end{pmatrix}}}$

The advantage of this scheme is that just by knowing how to represent the image of the two basis vectors, we get a formula that tells us the image of any vector at all; here a vector rotated by ${\displaystyle \theta =\pi /6}$.

${\displaystyle {\begin{pmatrix}3\\-2\end{pmatrix}}\;{\stackrel {t_{\pi /6}}{\longmapsto }}\;{\begin{pmatrix}{\sqrt {3}}/2&-1/2\\1/2&{\sqrt {3}}/2\end{pmatrix}}{\begin{pmatrix}3\\-2\end{pmatrix}}\approx {\begin{pmatrix}3.598\\-0.232\end{pmatrix}}}$

(Again, we are using the fact that, with respect to ${\displaystyle {\mathcal {E}}_{2}}$, vectors represent themselves.)

We have already seen the addition and scalar multiplication operations of matrices and the dot product operation of vectors. Matrix-vector multiplication is a new operation in the arithmetic of vectors and matrices. Nothing in Definition 1.5 requires us to view it in terms of representations. We can get some insight into this operation by turning away from what is being represented, and instead focusing on how the entries combine.

Example 1.9

In the definition the width of the matrix equals the height of the vector. Hence, the first product below is defined while the second is not.

${\displaystyle {\begin{pmatrix}1&0&0\\4&3&1\end{pmatrix}}{\begin{pmatrix}1\\0\\2\end{pmatrix}}={\begin{pmatrix}1\\6\end{pmatrix}}\qquad {\begin{pmatrix}1&0&0\\4&3&1\end{pmatrix}}{\begin{pmatrix}1\\0\end{pmatrix}}}$

One reason that this product is not defined is purely formal: the definition requires that the sizes match, and these sizes don't match. Behind the formality, though, is a reason why we will leave it undefined— the matrix represents a map with a three-dimensional domain while the vector represents a member of a two-dimensional space.

A good way to view a matrix-vector product is as the dot products of the rows of the matrix with the column vector.

${\displaystyle {\begin{pmatrix}&\vdots \\a_{i,1}&a_{i,2}&\ldots &a_{i,n}\\&\vdots \end{pmatrix}}{\begin{pmatrix}c_{1}\\c_{2}\\\vdots \\c_{n}\end{pmatrix}}={\begin{pmatrix}\vdots \\a_{i,1}c_{1}+a_{i,2}c_{2}+\ldots +a_{i,n}c_{n}\\\vdots \end{pmatrix}}}$

Looked at in this row-by-row way, this new operation generalizes dot product.

Matrix-vector product can also be viewed column-by-column.

${\displaystyle {\begin{array}{rl}\left({\begin{array}{cccc}h_{1,1}&h_{1,2}&\ldots &h_{1,n}\\h_{2,1}&h_{2,2}&\ldots &h_{2,n}\\&\vdots \\h_{m,1}&h_{m,2}&\ldots &h_{m,n}\end{array}}\right){\begin{pmatrix}c_{1}\\c_{2}\\\vdots \\c_{n}\end{pmatrix}}&={\begin{pmatrix}h_{1,1}c_{1}+h_{1,2}c_{2}+\dots +h_{1,n}c_{n}\\h_{2,1}c_{1}+h_{2,2}c_{2}+\dots +h_{2,n}c_{n}\\\vdots \\h_{m,1}c_{1}+h_{m,2}c_{2}+\dots +h_{m,n}c_{n}\end{pmatrix}}\\&=c_{1}{\begin{pmatrix}h_{1,1}\\h_{2,1}\\\vdots \\h_{m,1}\end{pmatrix}}+\dots +c_{n}{\begin{pmatrix}h_{1,n}\\h_{2,n}\\\vdots \\h_{m,n}\end{pmatrix}}\end{array}}}$
Example 1.10
${\displaystyle {\begin{pmatrix}1&0&-1\\2&0&3\end{pmatrix}}{\begin{pmatrix}2\\-1\\1\end{pmatrix}}=2{\begin{pmatrix}1\\2\end{pmatrix}}-1{\begin{pmatrix}0\\0\end{pmatrix}}+1{\begin{pmatrix}-1\\3\end{pmatrix}}={\begin{pmatrix}1\\7\end{pmatrix}}}$

The result has the columns of the matrix weighted by the entries of the vector. This way of looking at it brings us back to the objective stated at the start of this section, to compute ${\displaystyle h(c_{1}{\vec {\beta }}_{1}+\dots +c_{n}{\vec {\beta }}_{n})}$ as ${\displaystyle c_{1}h({\vec {\beta }}_{1})+\dots +c_{n}h({\vec {\beta }}_{n})}$.

We began this section by noting that the equality of these two enables us to compute the action of ${\displaystyle h}$ on any argument knowing only ${\displaystyle h({\vec {\beta }}_{1})}$, ..., ${\displaystyle h({\vec {\beta }}_{n})}$. We have developed this into a scheme to compute the action of the map by taking the matrix-vector product of the matrix representing the map and the vector representing the argument. In this way, any linear map is represented with respect to some bases by a matrix. In the next subsection, we will show the converse, that any matrix represents a linear map.

## ExercisesEdit

This exercise is recommended for all readers.
Problem 1

Multiply the matrix

${\displaystyle {\begin{pmatrix}1&3&1\\0&-1&2\\1&1&0\end{pmatrix}}}$

by each vector (or state "not defined").

1. ${\displaystyle {\begin{pmatrix}2\\1\\0\end{pmatrix}}}$
2. ${\displaystyle {\begin{pmatrix}-2\\-2\end{pmatrix}}}$
3. ${\displaystyle {\begin{pmatrix}0\\0\\0\end{pmatrix}}}$
Problem 2

Perform, if possible, each matrix-vector multiplication.

1. ${\displaystyle {\begin{pmatrix}2&1\\3&-1/2\end{pmatrix}}{\begin{pmatrix}4\\2\end{pmatrix}}}$
2. ${\displaystyle {\begin{pmatrix}1&1&0\\-2&1&0\end{pmatrix}}{\begin{pmatrix}1\\3\\1\end{pmatrix}}}$
3. ${\displaystyle {\begin{pmatrix}1&1\\-2&1\end{pmatrix}}{\begin{pmatrix}1\\3\\1\end{pmatrix}}}$
This exercise is recommended for all readers.
Problem 3

Solve this matrix equation.

${\displaystyle {\begin{pmatrix}2&1&1\\0&1&3\\1&-1&2\end{pmatrix}}{\begin{pmatrix}x\\y\\z\end{pmatrix}}={\begin{pmatrix}8\\4\\4\end{pmatrix}}}$
This exercise is recommended for all readers.
Problem 4

For a homomorphism from ${\displaystyle {\mathcal {P}}_{2}}$ to ${\displaystyle {\mathcal {P}}_{3}}$ that sends

${\displaystyle 1\mapsto 1+x,\quad x\mapsto 1+2x,\quad {\text{and}}\quad x^{2}\mapsto x-x^{3}}$

where does ${\displaystyle 1-3x+2x^{2}}$ go?

This exercise is recommended for all readers.
Problem 5

Assume that ${\displaystyle h:\mathbb {R} ^{2}\to \mathbb {R} ^{3}}$ is determined by this action.

${\displaystyle {\begin{pmatrix}1\\0\end{pmatrix}}\mapsto {\begin{pmatrix}2\\2\\0\end{pmatrix}}\qquad {\begin{pmatrix}0\\1\end{pmatrix}}\mapsto {\begin{pmatrix}0\\1\\-1\end{pmatrix}}}$

Using the standard bases, find

1. the matrix representing this map;
2. a general formula for ${\displaystyle h({\vec {v}})}$.
This exercise is recommended for all readers.
Problem 6

Let ${\displaystyle d/dx:{\mathcal {P}}_{3}\to {\mathcal {P}}_{3}}$ be the derivative transformation.

1. Represent ${\displaystyle d/dx}$ with respect to ${\displaystyle B,B}$ where ${\displaystyle B=\langle 1,x,x^{2},x^{3}\rangle }$.
2. Represent ${\displaystyle d/dx}$ with respect to ${\displaystyle B,D}$ where ${\displaystyle D=\langle 1,2x,3x^{2},4x^{3}\rangle }$.
This exercise is recommended for all readers.
Problem 7

Represent each linear map with respect to each pair of bases.

1. ${\displaystyle d/dx:{\mathcal {P}}_{n}\to {\mathcal {P}}_{n}}$ with respect to ${\displaystyle B,B}$ where ${\displaystyle B=\langle 1,x,\dots ,x^{n}\rangle }$, given by
${\displaystyle a_{0}+a_{1}x+a_{2}x^{2}+\dots +a_{n}x^{n}\mapsto a_{1}+2a_{2}x+\dots +na_{n}x^{n-1}}$
2. ${\displaystyle \int :{\mathcal {P}}_{n}\to {\mathcal {P}}_{n+1}}$ with respect to ${\displaystyle B_{n},B_{n+1}}$ where ${\displaystyle B_{i}=\langle 1,x,\dots ,x^{i}\rangle }$, given by
${\displaystyle a_{0}+a_{1}x+a_{2}x^{2}+\dots +a_{n}x^{n}\mapsto a_{0}x+{\frac {a_{1}}{2}}x^{2}+\dots +{\frac {a_{n}}{n+1}}x^{n+1}}$
3. ${\displaystyle \int _{0}^{1}:{\mathcal {P}}_{n}\to \mathbb {R} }$ with respect to ${\displaystyle B,{\mathcal {E}}_{1}}$ where ${\displaystyle B=\langle 1,x,\dots ,x^{n}\rangle }$ and ${\displaystyle {\mathcal {E}}_{1}=\langle 1\rangle }$, given by
${\displaystyle a_{0}+a_{1}x+a_{2}x^{2}+\dots +a_{n}x^{n}\mapsto a_{0}+{\frac {a_{1}}{2}}+\dots +{\frac {a_{n}}{n+1}}}$
4. ${\displaystyle {\text{eval}}_{3}:{\mathcal {P}}_{n}\to \mathbb {R} }$ with respect to ${\displaystyle B,{\mathcal {E}}_{1}}$ where ${\displaystyle B=\langle 1,x,\dots ,x^{n}\rangle }$ and ${\displaystyle {\mathcal {E}}_{1}=\langle 1\rangle }$, given by
${\displaystyle a_{0}+a_{1}x+a_{2}x^{2}+\dots +a_{n}x^{n}\mapsto a_{0}+a_{1}\cdot 3+a_{2}\cdot 3^{2}+\dots +a_{n}\cdot 3^{n}}$
5. ${\displaystyle {\text{slide}}_{-1}:{\mathcal {P}}_{n}\to {\mathcal {P}}_{n}}$ with respect to ${\displaystyle B,B}$ where ${\displaystyle B=\langle 1,x,\ldots ,x^{n}\rangle }$, given by
${\displaystyle a_{0}+a_{1}x+a_{2}x^{2}+\dots +a_{n}x^{n}\mapsto a_{0}+a_{1}\cdot (x+1)+\dots +a_{n}\cdot (x+1)^{n}}$
Problem 8

Represent the identity map on any nontrivial space with respect to ${\displaystyle B,B}$, where ${\displaystyle B}$ is any basis.

Problem 9

Represent, with respect to the natural basis, the transpose transformation on the space ${\displaystyle {\mathcal {M}}_{2\!\times \!2}}$ of ${\displaystyle 2\!\times \!2}$ matrices.

Problem 10

Assume that ${\displaystyle B=\langle {\vec {\beta }}_{1},{\vec {\beta }}_{2},{\vec {\beta }}_{3},{\vec {\beta }}_{4}\rangle }$ is a basis for a vector space. Represent with respect to ${\displaystyle B,B}$ the transformation that is determined by each.

1. ${\displaystyle {\vec {\beta }}_{1}\mapsto {\vec {\beta }}_{2}}$, ${\displaystyle {\vec {\beta }}_{2}\mapsto {\vec {\beta }}_{3}}$, ${\displaystyle {\vec {\beta }}_{3}\mapsto {\vec {\beta }}_{4}}$, ${\displaystyle {\vec {\beta }}_{4}\mapsto {\vec {0}}}$
2. ${\displaystyle {\vec {\beta }}_{1}\mapsto {\vec {\beta }}_{2}}$, ${\displaystyle {\vec {\beta }}_{2}\mapsto {\vec {0}}}$, ${\displaystyle {\vec {\beta }}_{3}\mapsto {\vec {\beta }}_{4}}$, ${\displaystyle {\vec {\beta }}_{4}\mapsto {\vec {0}}}$
3. ${\displaystyle {\vec {\beta }}_{1}\mapsto {\vec {\beta }}_{2}}$, ${\displaystyle {\vec {\beta }}_{2}\mapsto {\vec {\beta }}_{3}}$, ${\displaystyle {\vec {\beta }}_{3}\mapsto {\vec {0}}}$, ${\displaystyle {\vec {\beta }}_{4}\mapsto {\vec {0}}}$
Problem 11

Example 1.8 shows how to represent the rotation transformation of the plane with respect to the standard basis. Express these other transformations also with respect to the standard basis.

1. the dilation map ${\displaystyle d_{s}}$, which multiplies all vectors by the same scalar ${\displaystyle s}$
2. the reflection map ${\displaystyle f_{\ell }}$, which reflects all all vectors across a line ${\displaystyle \ell }$ through the origin
This exercise is recommended for all readers.
Problem 12

Consider a linear transformation of ${\displaystyle \mathbb {R} ^{2}}$ determined by these two.

${\displaystyle {\begin{pmatrix}1\\1\end{pmatrix}}\mapsto {\begin{pmatrix}2\\0\end{pmatrix}}\qquad {\begin{pmatrix}1\\0\end{pmatrix}}\mapsto {\begin{pmatrix}-1\\0\end{pmatrix}}}$
1. Represent this transformation with respect to the standard bases.
2. Where does the transformation send this vector?
${\displaystyle {\begin{pmatrix}0\\5\end{pmatrix}}}$
3. Represent this transformation with respect to these bases.
${\displaystyle B=\langle {\begin{pmatrix}1\\-1\end{pmatrix}},{\begin{pmatrix}1\\1\end{pmatrix}}\rangle \qquad D=\langle {\begin{pmatrix}2\\2\end{pmatrix}},{\begin{pmatrix}-1\\1\end{pmatrix}}\rangle }$
4. Using ${\displaystyle B}$ from the prior item, represent the transformation with respect to ${\displaystyle B,B}$.
Problem 13

Suppose that ${\displaystyle h:V\to W}$ is nonsingular so that by Theorem II.2.21, for any basis ${\displaystyle B=\langle {\vec {\beta }}_{1},\dots ,{\vec {\beta }}_{n}\rangle \subset V}$ the image ${\displaystyle h(B)=\langle h({\vec {\beta }}_{1}),\dots ,h({\vec {\beta }}_{n})\rangle }$ is a basis for ${\displaystyle W}$.

1. Represent the map ${\displaystyle h}$ with respect to ${\displaystyle B,h(B)}$.
2. For a member ${\displaystyle {\vec {v}}}$ of the domain, where the representation of ${\displaystyle {\vec {v}}}$ has components ${\displaystyle c_{1}}$, ..., ${\displaystyle c_{n}}$, represent the image vector ${\displaystyle h({\vec {v}})}$ with respect to the image basis ${\displaystyle h(B)}$.
Problem 14

Give a formula for the product of a matrix and ${\displaystyle {\vec {e}}_{i}}$, the column vector that is all zeroes except for a single one in the ${\displaystyle i}$-th position.

This exercise is recommended for all readers.
Problem 15

For each vector space of functions of one real variable, represent the derivative transformation with respect to ${\displaystyle B,B}$.

1. ${\displaystyle \{a\cos x+b\sin x\,{\big |}\,a,b\in \mathbb {R} \}}$, ${\displaystyle B=\langle \cos x,\sin x\rangle }$
2. ${\displaystyle \{ae^{x}+be^{2x}\,{\big |}\,a,b\in \mathbb {R} \}}$, ${\displaystyle B=\langle e^{x},e^{2x}\rangle }$
3. ${\displaystyle \{a+bx+ce^{x}+dxe^{x}\,{\big |}\,a,b,c,d\in \mathbb {R} \}}$, ${\displaystyle B=\langle 1,x,e^{x},xe^{x}\rangle }$
Problem 16

Find the range of the linear transformation of ${\displaystyle \mathbb {R} ^{2}}$ represented with respect to the standard bases by each matrix.

1. ${\displaystyle {\begin{pmatrix}1&0\\0&0\end{pmatrix}}}$
2. ${\displaystyle {\begin{pmatrix}0&0\\3&2\end{pmatrix}}}$
3. a matrix of the form ${\displaystyle {\begin{pmatrix}a&b\\2a&2b\end{pmatrix}}}$
This exercise is recommended for all readers.
Problem 17

Can one matrix represent two different linear maps? That is, can ${\displaystyle {\rm {Rep}}_{B,D}(h)={\rm {Rep}}_{{\hat {B}},{\hat {D}}}({\hat {h}})}$?

Problem 18

Prove Theorem 1.4.

This exercise is recommended for all readers.
Problem 19

Example 1.8 shows how to represent rotation of all vectors in the plane through an angle ${\displaystyle \theta }$ about the origin, with respect to the standard bases.

1. Rotation of all vectors in three-space through an angle ${\displaystyle \theta }$ about the ${\displaystyle x}$-axis is a transformation of ${\displaystyle \mathbb {R} ^{3}}$. Represent it with respect to the standard bases. Arrange the rotation so that to someone whose feet are at the origin and whose head is at ${\displaystyle (1,0,0)}$, the movement appears clockwise.
2. Repeat the prior item, only rotate about the ${\displaystyle y}$-axis instead. (Put the person's head at ${\displaystyle {\vec {e}}_{2}}$.)
3. Repeat, about the ${\displaystyle z}$-axis.
4. Extend the prior item to ${\displaystyle \mathbb {R} ^{4}}$. (Hint: "rotate about the ${\displaystyle z}$-axis" can be restated as "rotate parallel to the ${\displaystyle xy}$-plane".)
Problem 20 (Schur's Triangularization Lemma)
1. Let ${\displaystyle U}$ be a subspace of ${\displaystyle V}$ and fix bases ${\displaystyle B_{U}\subseteq B_{V}}$. What is the relationship between the representation of a vector from ${\displaystyle U}$ with respect to ${\displaystyle B_{U}}$ and the representation of that vector (viewed as a member of ${\displaystyle V}$) with respect to ${\displaystyle B_{V}}$?
2. What about maps?
3. Fix a basis ${\displaystyle B=\langle {\vec {\beta }}_{1},\dots ,{\vec {\beta }}_{n}\rangle }$ for ${\displaystyle V}$ and observe that the spans
${\displaystyle [\{{\vec {0}}\}]=\{{\vec {0}}\}\subset [\{{\vec {\beta }}_{1}\}]\subset [\{{\vec {\beta }}_{1},{\vec {\beta }}_{2}\}]\subset \quad \cdots \quad \subset [B]=V}$
form a strictly increasing chain of subspaces. Show that for any linear map ${\displaystyle h:V\to W}$ there is a chain ${\displaystyle W_{0}=\{{\vec {0}}\}\subseteq W_{1}\subseteq \dots \subseteq W_{m}=W}$ of subspaces of ${\displaystyle W}$ such that
${\displaystyle h([\{{\vec {\beta }}_{1},\dots ,{\vec {\beta }}_{i}\}])\subset W_{i}}$
for each ${\displaystyle i}$.
4. Conclude that for every linear map ${\displaystyle h:V\to W}$ there are bases ${\displaystyle B,D}$ so the matrix representing ${\displaystyle h}$ with respect to ${\displaystyle B,D}$ is upper-triangular (that is, each entry ${\displaystyle h_{i,j}}$ with ${\displaystyle i>j}$ is zero).
5. Is an upper-triangular representation unique?

Solutions

Linear Algebra
 ← Computing Linear Maps Representing Linear Maps with Matrices Any Matrix Represents a Linear Map →