# Linear Algebra/Changing Map Representations/Solutions
## Solutions

    This exercise is recommended for all readers.

### Problem 1

Decide if these matrices are matrix equivalent.
* ${\begin{pmatrix}1&3&0\\2&3&0\end{pmatrix}}$, ${\begin{pmatrix}2&2&1\\0&5&-1\end{pmatrix}}$
* ${\begin{pmatrix}0&3\\1&1\end{pmatrix}}$, ${\begin{pmatrix}4&0\\0&5\end{pmatrix}}$
* ${\begin{pmatrix}1&3\\2&6\end{pmatrix}}$, ${\begin{pmatrix}1&3\\2&-6\end{pmatrix}}$

### Answer

* Yes, each has rank two.
* Yes, they have the same rank.
* No, they have different ranks.
    This exercise is recommended for all readers.

### Problem 2

Find the canonical representative of the matrix-equivalence class of each matrix.
* ${\begin{pmatrix}2&1&0\\4&2&0\end{pmatrix}}$
* ${\begin{pmatrix}0&1&0&2\\1&1&0&4\\3&3&3&-1\end{pmatrix}}$

### Answer

We need only decide what the rank of each is.
* ${\begin{pmatrix}1&0&0\\0&0&0\end{pmatrix}}$
* ${\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&1&0\end{pmatrix}}$

### Problem 3

Suppose that, with respect to
    $B={\mathcal {E}}_{2}\qquad D=\langle {\begin{pmatrix}1\\1\end{pmatrix}},{\begin{pmatrix}1\\-1\end{pmatrix}}\rangle$
the transformation $t:\mathbb {R} ^{2}\to \mathbb {R} ^{2}$ is represented by this matrix.
    ${\begin{pmatrix}1&2\\3&4\end{pmatrix}}$
Use change of basis matrices to represent $t$ with respect to each pair.
* ${\hat {B}}=\langle {\begin{pmatrix}0\\1\end{pmatrix}},{\begin{pmatrix}1\\1\end{pmatrix}}\rangle$, ${\hat {D}}=\langle {\begin{pmatrix}-1\\0\end{pmatrix}},{\begin{pmatrix}2\\1\end{pmatrix}}\rangle$
* ${\hat {B}}=\langle {\begin{pmatrix}1\\2\end{pmatrix}},{\begin{pmatrix}1\\0\end{pmatrix}}\rangle$, ${\hat {D}}=\langle {\begin{pmatrix}1\\2\end{pmatrix}},{\begin{pmatrix}2\\1\end{pmatrix}}\rangle$

### Answer

Recall the diagram and the formula.
* ${\hat {T}}={\rm {Rep}}_{D,{\hat {D}}}({\mbox{id}})\cdot T\cdot {\rm {Rep}}_{{\hat {B}},B}({\mbox{id}})$
* These two show that and similarly these two give the other nonsingular matrix. Then the answer is this. Although not strictly necessary, a check is reassuring. Arbitrarily fixing we have that and so $t({\vec {v}})$ is this. Doing the calculation with respect to ${\hat {B}},{\hat {D}}$ starts with and then checks that this is the same result.
    ${\begin{pmatrix}1\\1\end{pmatrix}}=1\cdot {\begin{pmatrix}-1\\0\end{pmatrix}}+1\cdot {\begin{pmatrix}2\\1\end{pmatrix}}\qquad {\begin{pmatrix}1\\-1\end{pmatrix}}=(-3)\cdot {\begin{pmatrix}-1\\0\end{pmatrix}}+(-1)\cdot {\begin{pmatrix}2\\1\end{pmatrix}}$
    ${\rm {Rep}}_{D,{\hat {D}}}({\mbox{id}})={\begin{pmatrix}1&-3\\1&-1\end{pmatrix}}$
    ${\begin{pmatrix}0\\1\end{pmatrix}}=0\cdot {\begin{pmatrix}1\\0\end{pmatrix}}+1\cdot {\begin{pmatrix}0\\1\end{pmatrix}}\qquad {\begin{pmatrix}1\\1\end{pmatrix}}=1\cdot {\begin{pmatrix}1\\0\end{pmatrix}}+1\cdot {\begin{pmatrix}0\\1\end{pmatrix}}$
    ${\rm {Rep}}_{{\hat {B}},B}({\mbox{id}})={\begin{pmatrix}0&1\\1&1\end{pmatrix}}$
    ${\hat {T}}={\begin{pmatrix}1&-3\\1&-1\end{pmatrix}}{\begin{pmatrix}1&2\\3&4\end{pmatrix}}{\begin{pmatrix}0&1\\1&1\end{pmatrix}}={\begin{pmatrix}-10&-18\\-2&-4\end{pmatrix}}$
    ${\vec {v}}={\begin{pmatrix}3\\2\end{pmatrix}}$
    ${\rm {Rep}}_{B}({\vec {v}})={\begin{pmatrix}3\\2\end{pmatrix}}_{B}\qquad {\begin{pmatrix}1&2\\3&4\end{pmatrix}}_{B,D}{\begin{pmatrix}3\\2\end{pmatrix}}_{B}={\begin{pmatrix}7\\17\end{pmatrix}}_{D}$
    $7\cdot {\begin{pmatrix}1\\1\end{pmatrix}}+17\cdot {\begin{pmatrix}1\\-1\end{pmatrix}}={\begin{pmatrix}24\\-10\end{pmatrix}}$
    ${\rm {Rep}}_{\hat {B}}({\vec {v}})={\begin{pmatrix}-1\\3\end{pmatrix}}_{\hat {B}}\qquad {\begin{pmatrix}-10&-18\\-2&-4\end{pmatrix}}_{{\hat {B}},{\hat {D}}}{\begin{pmatrix}-1\\3\end{pmatrix}}_{\hat {B}}={\begin{pmatrix}-44\\-10\end{pmatrix}}_{\hat {D}}$
    $-44\cdot {\begin{pmatrix}-1\\0\end{pmatrix}}-10\cdot {\begin{pmatrix}2\\1\end{pmatrix}}={\begin{pmatrix}24\\-10\end{pmatrix}}$
* These two show that and these two show this. With those, the conversion goes in this way. As in the prior item, a check provides some confidence that this calculation was performed without mistakes. We can for instance, fix the vector (this is selected for no reason, out of thin air). Now we have and so $t({\vec {v}})$ is this vector. With respect to ${\hat {B}},{\hat {D}}$ we first calculate and, sure enough, that is the same result for $t({\vec {v}})$.
    ${\begin{pmatrix}1\\1\end{pmatrix}}={\frac {1}{3}}\cdot {\begin{pmatrix}1\\2\end{pmatrix}}+{\frac {1}{3}}\cdot {\begin{pmatrix}2\\1\end{pmatrix}}\qquad {\begin{pmatrix}1\\-1\end{pmatrix}}=-1\cdot {\begin{pmatrix}1\\2\end{pmatrix}}+1\cdot {\begin{pmatrix}2\\1\end{pmatrix}}$
    ${\rm {Rep}}_{D,{\hat {D}}}({\mbox{id}})={\begin{pmatrix}1/3&-1\\1/3&1\end{pmatrix}}$
    ${\begin{pmatrix}1\\2\end{pmatrix}}=1\cdot {\begin{pmatrix}1\\0\end{pmatrix}}+2\cdot {\begin{pmatrix}0\\1\end{pmatrix}}\qquad {\begin{pmatrix}1\\0\end{pmatrix}}=-1\cdot {\begin{pmatrix}1\\0\end{pmatrix}}+0\cdot {\begin{pmatrix}0\\1\end{pmatrix}}$
    ${\rm {Rep}}_{{\hat {B}},B}({\mbox{id}})={\begin{pmatrix}1&1\\2&0\end{pmatrix}}$
    ${\hat {T}}={\begin{pmatrix}1/3&-1\\1/3&1\end{pmatrix}}{\begin{pmatrix}1&2\\3&4\end{pmatrix}}{\begin{pmatrix}1&1\\2&0\end{pmatrix}}={\begin{pmatrix}-28/3&-8/3\\38/3&10/3\end{pmatrix}}$
    ${\vec {v}}={\begin{pmatrix}-1\\2\end{pmatrix}}$
    ${\rm {Rep}}_{B}({\vec {v}})={\begin{pmatrix}-1\\2\end{pmatrix}}\qquad {\begin{pmatrix}1&2\\3&4\end{pmatrix}}_{B,D}{\begin{pmatrix}-1\\2\end{pmatrix}}_{B}={\begin{pmatrix}3\\5\end{pmatrix}}_{D}$
    $3\cdot {\begin{pmatrix}1\\1\end{pmatrix}}+5\cdot {\begin{pmatrix}1\\-1\end{pmatrix}}={\begin{pmatrix}8\\-2\end{pmatrix}}$
    ${\rm {Rep}}_{\hat {B}}({\vec {v}})={\begin{pmatrix}1\\-2\end{pmatrix}}\qquad {\begin{pmatrix}-28/3&-8/3\\38/3&10/3\end{pmatrix}}_{{\hat {B}},{\hat {D}}}{\begin{pmatrix}1\\-2\end{pmatrix}}_{\hat {B}}={\begin{pmatrix}-4\\6\end{pmatrix}}_{\hat {D}}$
    $-4\cdot {\begin{pmatrix}1\\2\end{pmatrix}}+6\cdot {\begin{pmatrix}2\\1\end{pmatrix}}={\begin{pmatrix}8\\-2\end{pmatrix}}$
    This exercise is recommended for all readers.

### Problem 4

What sizes are $P$ and $Q$ in the equation ${\hat {H}}=PHQ$?

### Answer

Where $H$ and ${\hat {H}}$ are $m\!\times \!n$, the matrix $P$ is $m\!\times \!m$ while $Q$ is $n\!\times \!n$.
    This exercise is recommended for all readers.

### Problem 5

Use Theorem 2.6 to show that a square matrix is nonsingular if and only if it is equivalent to an identity matrix.

### Answer

Any $n\!\times \!n$ matrix is nonsingular if and only if it has rank $n$, that is, by Theorem 2.6, if and only if it is matrix equivalent to the $n\!\times \!n$ matrix whose diagonal is all ones.
    This exercise is recommended for all readers.

### Problem 6

Show that, where $A$ is a nonsingular square matrix, if $P$ and $Q$ are nonsingular square matrices such that $PAQ=I$ then $QP=A^{-1}$.

### Answer

If $PAQ=I$ then $QPAQ=Q$, so $QPA=I$, and so $QP=A^{-1}$.
    This exercise is recommended for all readers.

### Problem 7

Why does Theorem 2.6 not show that every matrix is diagonalizable (see Example 2.2)?

### Answer

By the definition following Example 2.2, a matrix $M$ is diagonalizable if it represents $M={\rm {Rep}}_{B,D}(t)$ a transformation with the property that there is some basis ${\hat {B}}$ such that ${\rm {Rep}}_{{\hat {B}},{\hat {B}}}(t)$ is a diagonal matrix— the starting and ending bases must be equal. But Theorem 2.6 says only that there are ${\hat {B}}$ and ${\hat {D}}$ such that we can change to a representation ${\rm {Rep}}_{{\hat {B}},{\hat {D}}}(t)$ and get a diagonal matrix. We have no reason to suspect that we could pick the two ${\hat {B}}$ and ${\hat {D}}$ so that they are equal.

### Problem 8

Must matrix equivalent matrices have matrix equivalent transposes?

### Answer

Yes. Row rank equals column rank, so the rank of the transpose equals the rank of the matrix. Same-sized matrices with equal ranks are matrix equivalent.

### Problem 9

What happens in Theorem 2.6 if $k=0$?

### Answer

Only a zero matrix has rank zero.
    This exercise is recommended for all readers.

### Problem 10

Show that matrix-equivalence is an equivalence relation.

### Answer

For reflexivity, to show that any matrix is matrix equivalent to itself, take $P$ and $Q$ to be identity matrices. For symmetry, if $H_{1}=PH_{2}Q$ then $H_{2}=P^{-1}H_{1}Q^{-1}$ (inverses exist because $P$ and $Q$ are nonsingular). Finally, for transitivity, assume that $H_{1}=P_{2}H_{2}Q_{2}$ and that $H_{2}=P_{3}H_{3}Q_{3}$. Then substitution gives $H_{1}=P_{2}(P_{3}H_{3}Q_{3})Q_{2}=(P_{2}P_{3})H_{3}(Q_{3}Q_{2})$. A product of nonsingular matrices is nonsingular (we've shown that the product of invertible matrices is invertible; in fact, we've shown how to calculate the inverse) and so $H_{1}$ is therefore matrix equivalent to $H_{3}$.
    This exercise is recommended for all readers.

### Problem 11

Show that a zero matrix is alone in its matrix equivalence class. Are there other matrices like that?

### Answer

By Theorem 2.6, a zero matrix is alone in its class because it is the only $m\!\times \!n$ of rank zero. No other matrix is alone in its class; any nonzero scalar product of a matrix has the same rank as that matrix.

### Problem 12

What are the matrix equivalence classes of matrices of transformations on $\mathbb {R} ^{1}$? $\mathbb {R} ^{3}$?

### Answer

There are two matrix-equivalence classes of $1\!\times \!1$ matrices— those of rank zero and those of rank one. The $3\!\times \!3$ matrices fall into four matrix equivalence classes.

### Problem 13

How many matrix equivalence classes are there?

### Answer

For $m\!\times \!n$ matrices there are classes for each possible rank: where $k$ is the minimum of $m$ and $n$ there are classes for the matrices of rank $0$, $1$, ..., $k$. That's $k+1$ classes. (Of course, totaling over all sizes of matrices we get infinitely many classes.)

### Problem 14

Are matrix equivalence classes closed under scalar multiplication? Addition?

### Answer

They are closed under nonzero scalar multiplication, since a nonzero scalar multiple of a matrix has the same rank as does the matrix. They are not closed under addition, for instance, $H+(-H)$ has rank zero.

### Problem 15

Let $t:\mathbb {R} ^{n}\to \mathbb {R} ^{n}$ represented by $T$ with respect to ${\mathcal {E}}_{n},{\mathcal {E}}_{n}$.
* Find ${\rm {Rep}}_{B,B}(t)$ in this specific case.
    $T={\begin{pmatrix}1&1\\3&-1\end{pmatrix}}\qquad B=\langle {\begin{pmatrix}1\\2\end{pmatrix}},{\begin{pmatrix}-1\\-1\end{pmatrix}}\rangle$
* Describe ${\rm {Rep}}_{B,B}(t)$ in the general case where $B=\langle {\vec {\beta }}_{1},\ldots ,{\vec {\beta }}_{n}\rangle$.

### Answer

* We have and thus the answer is this. As a quick check, we can take a vector at random giving while the calculation with respect to $B,B$ yields the same result.
    ${\rm {Rep}}_{B,{\mathcal {E}}_{2}}({\mbox{id}})={\begin{pmatrix}1&-1\\2&-1\end{pmatrix}}\qquad {\rm {Rep}}_{{\mathcal {E}}_{2},B}({\mbox{id}})={\rm {Rep}}_{B,{\mathcal {E}}_{2}}({\mbox{id}})^{-1}={\begin{pmatrix}1&-1\\2&-1\end{pmatrix}}^{-1}={\begin{pmatrix}-1&1\\-2&1\end{pmatrix}}$
    ${\rm {Rep}}_{B,B}(t)={\begin{pmatrix}1&-1\\2&-1\end{pmatrix}}{\begin{pmatrix}1&1\\3&-1\end{pmatrix}}{\begin{pmatrix}-1&1\\-2&1\end{pmatrix}}={\begin{pmatrix}-2&0\\-5&2\end{pmatrix}}$
    ${\vec {v}}={\begin{pmatrix}4\\5\end{pmatrix}}$
    ${\rm {Rep}}_{{\mathcal {E}}_{2}}({\vec {v}})={\begin{pmatrix}4\\5\end{pmatrix}}\qquad {\begin{pmatrix}1&1\\3&-1\end{pmatrix}}{\begin{pmatrix}4\\5\end{pmatrix}}={\begin{pmatrix}9\\7\end{pmatrix}}=t({\vec {v}})$
    ${\rm {Rep}}_{B}({\vec {v}})={\begin{pmatrix}1\\-3\end{pmatrix}}\qquad {\begin{pmatrix}-2&0\\-5&2\end{pmatrix}}_{B,B}{\begin{pmatrix}1\\-3\end{pmatrix}}_{B}={\begin{pmatrix}-2\\-11\end{pmatrix}}_{B}$
    $-2\cdot {\begin{pmatrix}1\\2\end{pmatrix}}-11\cdot {\begin{pmatrix}-1\\-1\end{pmatrix}}={\begin{pmatrix}9\\7\end{pmatrix}}$
* We have ${\rm {Rep}}_{B,B}(t)={\rm {Rep}}_{{\mathcal {E}}_{2},B}({\mbox{id}})\cdot T\cdot {\rm {Rep}}_{B,{\mathcal {E}}_{2}}({\mbox{id}})$ and, as in the first item of this question so, writing $Q$ for the matrix whose columns are the basis vectors, we have that ${\rm {Rep}}_{B,B}(t)=Q^{-1}TQ$.
    ${\rm {Rep}}_{B,{\mathcal {E}}_{2}}({\mbox{id}})=\left({\begin{array}{c|c|c}{\vec {\beta }}_{1}&\;\cdots \;&{\vec {\beta }}_{n}\end{array}}\right)\qquad {\rm {Rep}}_{{\mathcal {E}}_{2},B}({\mbox{id}})={\rm {Rep}}_{B,{\mathcal {E}}_{2}}({\mbox{id}})^{-1}$

### Problem 16

* Let $V$ have bases $B_{1}$ and $B_{2}$ and suppose that $W$ has the basis $D$. Where $h:V\to W$, find the formula that computes ${\rm {Rep}}_{B_{2},D}(h)$ from ${\rm {Rep}}_{B_{1},D}(h)$.
* Repeat the prior question with one basis for $V$ and two bases for $W$.

### Answer

* The adapted form of the arrow diagram is this. Since there is no need to change bases in $W$ (or we can say that the change of basis matrix $P$ is the identity), we have ${\rm {Rep}}_{B_{2},D}(h)={\rm {Rep}}_{B_{1},D}(h)\cdot Q$ where $Q={\rm {Rep}}_{B_{2},B_{1}}({\mbox{id}})$.
* Here, this is the arrow diagram. We have that ${\rm {Rep}}_{B,D_{2}}(h)=P\cdot {\rm {Rep}}_{B,D_{1}}(h)$ where $P={\rm {Rep}}_{D_{1},D_{2}}({\mbox{id}})$.

### Problem 17

* If two matrices are matrix-equivalent and invertible, must their inverses be matrix-equivalent?
* If two matrices have matrix-equivalent inverses, must the two be matrix-equivalent?
* If two matrices are square and matrix-equivalent, must their squares be matrix-equivalent?
* If two matrices are square and have matrix-equivalent squares, must they be matrix-equivalent?

### Answer

* Here is the arrow diagram, and a version of that diagram for inverse functions. Yes, the inverses of the matrices represent the inverses of the maps. That is, we can move from the lower right to the lower left by moving up, then left, then down. In other words, where ${\hat {H}}=PHQ$ (and $P,Q$ invertible) and $H,{\hat {H}}$ are invertible then ${\hat {H}}^{-1}=Q^{-1}H^{-1}P^{-1}$.
* Yes; this is the prior part repeated in different terms.
* No, we need another assumption: if $H$ represents $h$ with respect to the same starting as ending bases $B,B$, for some $B$ then $H^{2}$ represents $h\circ h$. As a specific example, these two matrices are both rank one and so they are matrix equivalent but the squares are not matrix equivalent— the square of the first has rank one while the square of the second has rank zero.
    ${\begin{pmatrix}1&0\\0&0\end{pmatrix}}\qquad {\begin{pmatrix}0&0\\1&0\end{pmatrix}}$
* No. These two are not matrix equivalent but have matrix equivalent squares.
    ${\begin{pmatrix}0&0\\0&0\end{pmatrix}}\qquad {\begin{pmatrix}0&0\\1&0\end{pmatrix}}$
    This exercise is recommended for all readers.

### Problem 18

Square matrices are similar if they represent the same transformation, but each with respect to the same ending as starting basis. That is, ${\rm {Rep}}_{B_{1},B_{1}}(t)$ is similar to ${\rm {Rep}}_{B_{2},B_{2}}(t)$.
* Give a definition of matrix similarity like that of Definition 2.3.
* Prove that similar matrices are matrix equivalent.
* Show that similarity is an equivalence relation.
* Show that if $T$ is similar to ${\hat {T}}$ then $T^{2}$ is similar to ${\hat {T}}^{2}$, the cubes are similar, etc. Contrast with the prior exercise.
* Prove that there are matrix equivalent matrices that are not similar.

### Answer

* The definition is suggested by the appropriate arrow diagram. Call matrices $T,{\hat {T}}$ similar if there is a nonsingular matrix $P$ such that ${\hat {T}}=P^{-1}TP$.
* Take $P^{-1}$ to be $P$ and take $P$ to be $Q$.
* This is as in Problem 10. Reflexivity is obvious: $T=I^{-1}TI$. Symmetry is also easy: ${\hat {T}}=P^{-1}TP$ implies that $T=P{\hat {T}}P^{-1}$ (multiply the first equation from the right by $P^{-1}$ and from the left by $P$). For transitivity, assume that $T_{1}={P_{2}}^{-1}T_{2}P_{2}$ and that $T_{2}={P_{3}}^{-1}T_{3}P_{3}$. Then $T_{1}={P_{2}}^{-1}({P_{3}}^{-1}T_{3}P_{3})P_{2}=({P_{2}}^{-1}{P_{3}}^{-1})T_{3}(P_{3}P_{2})$ and we are finished on noting that $P_{3}P_{2}$ is an invertible matrix with inverse ${P_{2}}^{-1}{P_{3}}^{-1}$.
* Assume that ${\hat {T}}=P^{-1}TP$. For the squares: ${\hat {T}}^{2}=(P^{-1}TP)(P^{-1}TP)=P^{-1}T(PP^{-1})TP=P^{-1}T^{2}P$. Higher powers follow by induction.
* These two are matrix equivalent but their squares are not matrix equivalent. By the prior item, matrix similarity and matrix equivalence are thus different.
    ${\begin{pmatrix}1&0\\0&0\end{pmatrix}}\qquad {\begin{pmatrix}0&0\\1&0\end{pmatrix}}$