# Linear Algebra/Sums and Scalar Products/Solutions
## Solutions

    This exercise is recommended for all readers.

### Problem 1

Perform the indicated operations, if defined.
* ${\begin{pmatrix}5&-1&2\\6&1&1\end{pmatrix}}+{\begin{pmatrix}2&1&4\\3&0&5\end{pmatrix}}$
* $6\cdot {\begin{pmatrix}2&-1&-1\\1&2&3\end{pmatrix}}$
* ${\begin{pmatrix}2&1\\0&3\end{pmatrix}}+{\begin{pmatrix}2&1\\0&3\end{pmatrix}}$
* $4{\begin{pmatrix}1&2\\3&-1\end{pmatrix}}+5{\begin{pmatrix}-1&4\\-2&1\end{pmatrix}}$
* $3{\begin{pmatrix}2&1\\3&0\end{pmatrix}}+2{\begin{pmatrix}1&1&4\\3&0&5\end{pmatrix}}$

### Answer

* ${\begin{pmatrix}7&0&6\\9&1&6\end{pmatrix}}$
* ${\begin{pmatrix}12&-6&-6\\6&12&18\end{pmatrix}}$
* ${\begin{pmatrix}4&2\\0&6\end{pmatrix}}$
* ${\begin{pmatrix}-1&28\\2&1\end{pmatrix}}$
* Not defined.

### Problem 2

Prove Theorem 1.5.
* Prove that matrix addition represents addition of linear maps.
* Prove that matrix scalar multiplication represents scalar multiplication of linear maps.

### Answer

Represent the domain vector ${\vec {v}}\in V$ and the maps $g,h:V\to W$ with respect to bases $B,D$ in the usual way.
* The representation of $(g+h)\,({\vec {v}})=g({\vec {v}})+h({\vec {v}})$ regroups to the entry-by-entry sum of the representation of $g({\vec {v}})$ and the representation of $h({\vec {v}})$.
    ${\bigl(g_{1,1}v_{1}+\dots +g_{1,n}v_{n}){\vec {\delta }}_{1}+\cdots +(g_{m,1}v_{1}+\dots +g_{m,n}v_{n}){\vec {\delta }}_{m}{\bigr )}$
       $+{\bigl(h_{1,1}v_{1}+\cdots +h_{1,n}v_{n}){\vec {\delta }}_{1}+\cdots +(h_{m,1}v_{1}+\dots +h_{m,n}v_{n}){\vec {\delta }}_{m}{\bigr )}$
    $=((g_{1,1}+h_{1,1})v_{1}+\dots +(g_{1,1}+h_{1,n})v_{n})\cdot {\vec {\delta }}_{1}+\cdots +((g_{m,1}+h_{m,1})v_{1}+\dots +(g_{m,n}+h_{m,n})v_{n})\cdot {\vec {\delta }}_{m}$
* The representation of $(r\cdot h)\,({\vec {v}})=r\cdot {\biglh({\vec {v}}){\bigr )}$ is the entry-by-entry multiple of $r$ and the representation of $h$.
    $r\cdot {\bigl(h_{1,1}v_{1}+h_{1,2}v_{2}+\dots +h_{1,n}v_{n}){\vec {\delta }}_{1}+\dots +(h_{m,1}v_{1}+h_{m,2}v_{2}+\dots +h_{m,n}v_{n}){\vec {\delta }}_{m}{\bigr )}$
       $=(rh_{1,1}v_{1}+\dots +rh_{1,n}v_{n})\cdot {\vec {\delta }}_{1}+\dots +(rh_{m,1}v_{1}+\dots +rh_{m,n}v_{n})\cdot {\vec {\delta }}_{m}$
    This exercise is recommended for all readers.

### Problem 3

Prove each, where the operations are defined, where $G$, $H$, and $J$ are matrices, where $Z$ is the zero matrix, and where $r$ and $s$ are scalars.
* Matrix addition is commutative $G+H=H+G$.
* Matrix addition is associative $G+(H+J)=(G+H)+J$.
* The zero matrix is an additive identity $G+Z=G$.
* $0\cdot G=Z$
* $(r+s)G=rG+sG$
* Matrices have an additive inverse $G+(-1)\cdot G=Z$.
* $r(G+H)=rG+rH$
* $(rs)G=r(sG)$

### Answer

First, each of these properties is easy to check in an entry-by-entry way. For example, writing
    $G={\begin{pmatrix}g_{1,1}&\ldots &g_{1,n}\\\vdots &&\vdots \\g_{m,1}&\ldots &g_{m,n}\end{pmatrix}}\qquad H={\begin{pmatrix}h_{1,1}&\ldots &h_{1,n}\\\vdots &&\vdots \\h_{m,1}&\ldots &h_{m,n}\end{pmatrix}}$
then, by definition we have
    $G+H={\begin{pmatrix}g_{1,1}+h_{1,1}&\ldots &g_{1,n}+h_{1,n}\\\vdots &&\vdots \\g_{m,1}+h_{m,1}&\ldots &g_{m,n}+h_{m,n}\end{pmatrix}}\qquad H+G={\begin{pmatrix}h_{1,1}+g_{1,1}&\ldots &h_{1,n}+g_{1,n}\\\vdots &&\vdots \\h_{m,1}+g_{m,1}&\ldots &h_{m,n}+g_{m,n}\end{pmatrix}}$
and the two are equal since their entries are equal $g_{i,j}+h_{i,j}=h_{i,j}+g_{i,j}$. That is, each of these is easy to check by using Definition 1.3 alone.
However, each property is also easy to understand in terms of the represented maps, by applying Theorem 1.5 as well as the definition.
* The two maps $g+h$ and $h+g$ are equal because $g({\vec {v}})+h({\vec {v}})=h({\vec {v}})+g({\vec {v}})$, as addition is commutative in any vector space. Because the maps are the same, they must have the same representative.
* As with the prior answer, except that here we apply that vector space addition is associative.
* As before, except that here we note that $g({\vec {v}})+z({\vec {v}})=g({\vec {v}})+{\vec {0}}=g({\vec {v}})$.
* Apply that $0\cdot g({\vec {v}})={\vec {0}}=z({\vec {v}})$.
* Apply that $(r+s)\cdot g({\vec {v}})=r\cdot g({\vec {v}})+s\cdot g({\vec {v}})$.
* Apply the prior two items with $r=1$ and $s=-1$.
* Apply that $r\cdot (g({\vec {v}})+h({\vec {v}}))=r\cdot g({\vec {v}})+r\cdot h({\vec {v}})$.
* Apply that $(rs)\cdot g({\vec {v}})=r\cdot (s\cdot g({\vec {v}}))$.

### Problem 4

Fix domain and codomain spaces. In general, one matrix can represent many different maps with respect to different bases. However, prove that a zero matrix represents only a zero map. Are there other such matrices?

### Answer

For any $V,W$ with bases $B,D$, the (appropriately-sized) zero matrix represents this map.
    ${\vec {\beta }}_{1}\mapsto 0\cdot {\vec {\delta }}_{1}+\dots +0\cdot {\vec {\delta }}_{m}\quad \cdots \quad {\vec {\beta }}_{n}\mapsto 0\cdot {\vec {\delta }}_{1}+\dots +0\cdot {\vec {\delta }}_{m}$
This is the zero map.
There are no other matrices that represent only one map. For, suppose that $H$ is not the zero matrix. Then it has a nonzero entry; assume that $h_{i,j}\neq 0$. With respect to bases $B,D$, it represents $h_{1}:V\to W$ sending
    ${\vec {\beta }}_{j}\mapsto h_{1,j}{\vec {\delta }}_{1}+\dots +h_{i,j}{\vec {\delta }}_{i}+\dots +h_{m,j}{\vec {\delta }}_{m}$
and with respect to $B,2\cdot D$ it also represents $h_{2}:V\to W$ sending
    ${\vec {\beta }}_{j}\mapsto h_{1,j}\cdot (2{\vec {\delta }}_{1})+\dots +h_{i,j}\cdot (2{\vec {\delta }}_{i})+\dots +h_{m,j}\cdot (2{\vec {\delta }}_{m})$
(the notation $2\cdot D$ means to double all of the members of D). These maps are easily seen to be unequal.
    This exercise is recommended for all readers.

### Problem 5

Let $V$ and $W$ be vector spaces of dimensions $n$ and $m$. Show that the space $\mathop {\mathcal {L}} (V,W)$ of linear maps from $V$ to $W$ is isomorphic to ${\mathcal {M}}_{m\!\times \!n}$.

### Answer

Fix bases $B$ and $D$ for $V$ and $W$, and consider ${\mbox{Rep}}_{B,D}:\mathop {\mathcal {L}} (V,W)\to {\mathcal {M}}_{m\!\times \!n}$ associating each linear map with the matrix representing that map $h\mapsto {\rm {Rep}}_{B,D}(h)$. From the prior section we know that (under fixed bases) the matrices correspond to linear maps, so the representation map is one-to-one and onto. That it preserves linear operations is Theorem 1.5.
    This exercise is recommended for all readers.

### Problem 6

Show that it follows from the prior questions that for any six transformations $t_{1},\dots ,t_{6}:\mathbb {R} ^{2}\to \mathbb {R} ^{2}$ there are scalars $c_{1},\dots ,c_{6}\in \mathbb {R}$ such that $c_{1}t_{1}+\dots +c_{6}t_{6}$ is the zero map. (Hint: this is a bit of a misleading question.)

### Answer

Fix bases and represent the transformations with $2\!\times \!2$ matrices. The space of matrices ${\mathcal {M}}_{2\!\times \!2}$ has dimension four, and hence the above six-element set is linearly dependent. By the prior exercise that extends to a dependence of maps. (The misleading part is only that there are six transformations, not five, so that we have more than we need to give the existence of the dependence.)

### Problem 7

The trace of a square matrix is the sum of the entries on the main diagonal (the $1,1$ entry plus the $2,2$ entry, etc.; we will see the significance of the trace in Chapter Five). Show that ${\mbox{trace}}(H+G)={\mbox{trace}}(H)+{\mbox{trace}}(G)$. Is there a similar result for scalar multiplication?

### Answer

That the trace of a sum is the sum of the traces holds because both ${\text{trace}}(H+G)$ and ${\text{trace}}(H)+{\text{trace}}(G)$ are the sum of $h_{1,1}+g_{1,1}$ with $h_{2,2}+g_{2,2}$, etc. For scalar multiplication we have ${\mbox{trace}}(r\cdot H)=r\cdot {\mbox{trace}}(H)$; the proof is easy. Thus the trace map is a homomorphism from ${\mathcal {M}}_{n\!\times \!n}$ to $\mathbb {R}$.

### Problem 8

Recall that the transpose of a matrix $M$ is another matrix, whose $i,j$ entry is the $j,i$ entry of $M$. Verifiy these identities.
* ${{(G+H)}^{\rm {trans}}}={{G}^{\rm {trans}}}+{{H}^{\rm {trans}}}$
* ${{(r\cdot H)}^{\rm {trans}}}=r\cdot {{H}^{\rm {trans}}}$

### Answer

* The $i,j$ entry of ${{(G+H)}^{\rm {trans}}}$ is $g_{j,i}+h_{j,i}$. That is also the $i,j$ entry of ${{G}^{\rm {trans}}}+{{H}^{\rm {trans}}}$.
* The $i,j$ entry of ${{(r\cdot H)}^{\rm {trans}}}$ is $rh_{j,i}$, which is also the $i,j$ entry of $r\cdot {{H}^{\rm {trans}}}$.
    This exercise is recommended for all readers.

### Problem 9

A square matrix is symmetric if each $i,j$ entry equals the $j,i$ entry, that is, if the matrix equals its transpose.
* Prove that for any $H$, the matrix $H+{{H}^{\rm {trans}}}$ is symmetric. Does every symmetric matrix have this form?
* Prove that the set of $n\!\times \!n$ symmetric matrices is a subspace of ${\mathcal {M}}_{n\!\times \!n}$.

### Answer

* For $H+{{H}^{\rm {trans}}}$, the $i,j$ entry is $h_{i,j}+h_{j,i}$ and the $j,i$ entry of is $h_{j,i}+h_{i,j}$. The two are equal and thus $H+{{H}^{\rm {trans}}}$ is symmetric. Every symmetric matrix does have that form, since it can be written $H=(1/2)\cdot (H+{{H}^{\rm {trans}}})$.
* The set of symmetric matrices is nonempty as it contains the zero matrix. Clearly a scalar multiple of a symmetric matrix is symmetric. A sum $H+G$ of two symmetric matrices is symmetric because $h_{i,j}+g_{i,j}=h_{j,i}+g_{j,i}$ (since $h_{i,j}=h_{j,i}$ and $g_{i,j}=g_{j,i}$). Thus the subset is nonempty and closed under the inherited operations, and so it is a subspace.
    This exercise is recommended for all readers.

### Problem 10

* How does matrix rank interact with scalar multiplication— can a scalar product of a rank $n$ matrix have rank less than $n$? Greater?
* How does matrix rank interact with matrix addition— can a sum of rank $n$ matrices have rank less than $n$? Greater?

### Answer

* Scalar multiplication leaves the rank of a matrix unchanged except that multiplication by zero leaves the matrix with rank zero. (This follows from the first theorem of the book, that multiplying a row by a nonzero scalar doesn't change the solution set of the associated linear system.)
* A sum of rank $n$ matrices can have rank less than $n$. For instance, for any matrix $H$, the sum $H+(-1)\cdot H$ has rank zero. A sum of rank $n$ matrices can have rank greater than $n$. Here are rank one matrices that sum to a rank two matrix.
    ${\begin{pmatrix}1&0\\0&0\end{pmatrix}}+{\begin{pmatrix}0&0\\0&1\end{pmatrix}}={\begin{pmatrix}1&0\\0&1\end{pmatrix}}$