Linear Algebra/Representing Linear Maps with Matrices

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



\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 $$\vec{v}$$ to the map, represented with respect to the domain's basis $$B$$ by a column vector with components $$c_1$$ and $$c_2$$. On the right is the value $$h(\vec{v})$$ of the map on that argument, represented with respect to the codomain's basis $$D$$ by a column vector with components $$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, $$0$$ and $$1$$ from the first row, $$-1/2$$ and $$-1$$ from the second row, and $$1$$ and $$0$$ from the third row.

This notation simply breaks the parts from the right, the coefficients and the $$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.

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



{\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 $$n$$ of the matrix is the dimension of the domain of the map, and the number of rows $$m$$ is the dimension of the codomain.

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 $$ h $$, the matrix representing it is $$ H $$, with entries $$ h_{i,j} $$.

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

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.

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.

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.

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



\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.


 * $$\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}$$

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 $$ h(c_1\vec{\beta}_1+\dots+c_n\vec{\beta}_n) $$ as $$ c_1h(\vec{\beta}_1)+\dots+c_nh(\vec{\beta}_n) $$.

We began this section by noting that the equality of these two enables us to compute the action of $$h$$ on any argument knowing only $$h(\vec{\beta}_1)$$, ..., $$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.

Exercises
/Solutions/