# Linear Algebra/Laplace's Expansion/Solutions
## Solutions

    This exercise is recommended for all readers.

### Problem 1

Find the cofactor.
    $T={\begin{pmatrix}1&0&2\\-1&1&3\\0&2&-1\end{pmatrix}}$
* $T_{2,3}$
* $T_{3,2}$
* $T_{1,3}$

### Answer

* $(-1)^{2+3}{\begin{vmatrix}1&0\\0&2\end{vmatrix}}=-2$
* $(-1)^{3+2}{\begin{vmatrix}1&2\\-1&3\end{vmatrix}}=-5$
* $(-1)^{4}{\begin{vmatrix}-1&1\\0&2\end{vmatrix}}=-3$
    This exercise is recommended for all readers.

### Problem 2

Find the determinant by expanding
    ${\begin{vmatrix}3&0&1\\1&2&2\\-1&3&0\end{vmatrix}}$
* on the first row
* on the second row
* on the third column.

### Answer

* $3\cdot (+1){\begin{vmatrix}2&2\\3&0\end{vmatrix}}+0\cdot (-1){\begin{vmatrix}1&2\\-1&0\end{vmatrix}}+1\cdot (+1){\begin{vmatrix}1&2\\-1&3\end{vmatrix}}=-13$
* $1\cdot (-1){\begin{vmatrix}0&1\\3&0\end{vmatrix}}+2\cdot (+1){\begin{vmatrix}3&1\\-1&0\end{vmatrix}}+2\cdot (-1){\begin{vmatrix}3&0\\-1&3\end{vmatrix}}=-13$
* $1\cdot (+1){\begin{vmatrix}1&2\\-1&3\end{vmatrix}}+2\cdot (-1){\begin{vmatrix}3&0\\-1&3\end{vmatrix}}+0\cdot (+1){\begin{vmatrix}3&0\\1&2\end{vmatrix}}=-13$

### Problem 3

Find the adjoint of the matrix in Example 1.6.

### Answer

${\text{adj}}\,(T)={\begin{pmatrix}T_{1,1}&T_{2,1}&T_{3,1}\\T_{1,2}&T_{2,2}&T_{3,2}\\T_{1,3}&T_{2,3}&T_{3,3}\end{pmatrix}}={\begin{pmatrix}+{\begin{vmatrix}5&6\\8&9\end{vmatrix}}-{\begin{vmatrix}2&3\\8&9\end{vmatrix}}+{\begin{vmatrix}2&3\\5&6\end{vmatrix}}\\-{\begin{vmatrix}4&6\\7&9\end{vmatrix}}+{\begin{vmatrix}1&3\\7&9\end{vmatrix}}-{\begin{vmatrix}1&3\\4&6\end{vmatrix}}\\+{\begin{vmatrix}4&5\\7&8\end{vmatrix}}-{\begin{vmatrix}1&2\\7&8\end{vmatrix}}+{\begin{vmatrix}1&2\\4&5\end{vmatrix}}\end{pmatrix}}={\begin{pmatrix}-3&6&-3\\6&-12&6\\-3&6&-3\end{pmatrix}}$
    This exercise is recommended for all readers.

### Problem 4

Find the matrix adjoint to each.
* ${\begin{pmatrix}2&1&4\\-1&0&2\\1&0&1\end{pmatrix}}$
* ${\begin{pmatrix}3&-1\\2&4\end{pmatrix}}$
* ${\begin{pmatrix}1&1\\5&0\end{pmatrix}}$
* ${\begin{pmatrix}1&4&3\\-1&0&3\\1&8&9\end{pmatrix}}$

### Answer

* ${\begin{pmatrix}T_{1,1}&T_{2,1}&T_{3,1}\\T_{1,2}&T_{2,2}&T_{3,2}\\T_{1,3}&T_{2,3}&T_{3,3}\end{pmatrix}}={\begin{pmatrix}{\begin{vmatrix}0&2\\0&1\end{vmatrix}}&-{\begin{vmatrix}1&4\\0&1\end{vmatrix}}&{\begin{vmatrix}1&4\\0&2\end{vmatrix}}\\-{\begin{vmatrix}-1&2\\1&1\end{vmatrix}}&{\begin{vmatrix}2&4\\1&1\end{vmatrix}}&-{\begin{vmatrix}2&4\\-1&2\end{vmatrix}}\\{\begin{vmatrix}-1&0\\1&0\end{vmatrix}}&-{\begin{vmatrix}2&1\\1&0\end{vmatrix}}&{\begin{vmatrix}2&1\\-1&0\end{vmatrix}}\end{pmatrix}}={\begin{pmatrix}0&-1&2\\3&-2&-8\\0&1&1\end{pmatrix}}$
* The minors are $1\!\times \!1$: ${\begin{pmatrix}T_{1,1}&T_{2,1}\\T_{1,2}&T_{2,2}\end{pmatrix}}={\begin{pmatrix}{\begin{vmatrix}4\end{vmatrix}}&-{\begin{vmatrix}-1\end{vmatrix}}\\-{\begin{vmatrix}2\end{vmatrix}}&{\begin{vmatrix}3\end{vmatrix}}\end{pmatrix}}={\begin{pmatrix}4&1\\-2&3\end{pmatrix}}$.
* ${\begin{pmatrix}0&-1\\-5&1\end{pmatrix}}$
* ${\begin{pmatrix}T_{1,1}&T_{2,1}&T_{3,1}\\T_{1,2}&T_{2,2}&T_{3,2}\\T_{1,3}&T_{2,3}&T_{3,3}\end{pmatrix}}={\begin{pmatrix}{\begin{vmatrix}0&3\\8&9\end{vmatrix}}&-{\begin{vmatrix}4&3\\8&9\end{vmatrix}}&{\begin{vmatrix}4&3\\0&3\end{vmatrix}}\\-{\begin{vmatrix}-1&3\\1&9\end{vmatrix}}&{\begin{vmatrix}1&3\\1&9\end{vmatrix}}&-{\begin{vmatrix}1&3\\-1&3\end{vmatrix}}\\{\begin{vmatrix}-1&0\\1&8\end{vmatrix}}&-{\begin{vmatrix}1&4\\1&8\end{vmatrix}}&{\begin{vmatrix}1&4\\-1&0\end{vmatrix}}\end{pmatrix}}={\begin{pmatrix}-24&-12&12\\12&6&-6\\-8&-4&4\end{pmatrix}}$
    This exercise is recommended for all readers.

### Problem 5

Find the inverse of each matrix in the prior question with Theorem 1.9.

### Answer

* $(1/3)\cdot {\begin{pmatrix}0&-1&2\\3&-2&-8\\0&1&1\end{pmatrix}}={\begin{pmatrix}0&-1/3&2/3\\1&-2/3&-8/3\\0&1/3&1/3\end{pmatrix}}$
* $(1/14)\cdot {\begin{pmatrix}4&1\\-2&3\end{pmatrix}}={\begin{pmatrix}2/7&1/14\\-1/7&3/14\end{pmatrix}}$
* $(1/-5)\cdot {\begin{pmatrix}0&-1\\-5&1\end{pmatrix}}={\begin{pmatrix}0&1/5\\1&-1/5\end{pmatrix}}$
* The matrix has a zero determinant, and so has no inverse.

### Problem 6

Find the matrix adjoint to this one.
    ${\begin{pmatrix}2&1&0&0\\1&2&1&0\\0&1&2&1\\0&0&1&2\end{pmatrix}}$

### Answer

${\begin{pmatrix}T_{1,1}&T_{2,1}&T_{3,1}&T_{4,1}\\T_{1,2}&T_{2,2}&T_{3,2}&T_{4,2}\\T_{1,3}&T_{2,3}&T_{3,3}&T_{4,3}\\T_{1,4}&T_{2,4}&T_{3,4}&T_{4,4}\end{pmatrix}}={\begin{pmatrix}4&-3&2&-1\\-3&6&-4&2\\2&-4&6&-3\\-1&2&-3&4\end{pmatrix}}$
    This exercise is recommended for all readers.

### Problem 7

Expand across the first row to derive the formula for the determinant of a $2\!\times \!2$ matrix.

### Answer

The determinant
    ${\begin{vmatrix}a&b\\c&d\end{vmatrix}}$
expanded on the first row gives $a\cdot (+1)\left|d\right|+b\cdot (-1)\left|c\right|=ad-bc$ (note the two $1\!\times \!1$ minors).
    This exercise is recommended for all readers.

### Problem 8

Expand across the first row to derive the formula for the determinant of a $3\!\times \!3$ matrix.

### Answer

The determinant of
    ${\begin{pmatrix}a&b&c\\d&e&f\\g&h&i\end{pmatrix}}$
is this.
    $a\cdot {\begin{vmatrix}e&f\\h&i\end{vmatrix}}-b\cdot {\begin{vmatrix}d&f\\g&i\end{vmatrix}}+c\cdot {\begin{vmatrix}d&e\\g&h\end{vmatrix}}=a(ei-fh)-b(di-fg)+c(dh-eg)$
    This exercise is recommended for all readers.

### Problem 9

* Give a formula for the adjoint of a $2\!\times \!2$ matrix.
* Use it to derive the formula for the inverse.

### Answer

* ${\begin{pmatrix}T_{1,1}&T_{2,1}\\T_{1,2}&T_{2,2}\end{pmatrix}}={\begin{pmatrix}{\begin{vmatrix}t_{2,2}\end{vmatrix}}&-{\begin{vmatrix}t_{1,2}\end{vmatrix}}\\-{\begin{vmatrix}t_{2,1}\end{vmatrix}}&{\begin{vmatrix}t_{1,1}\end{vmatrix}}\end{pmatrix}}={\begin{pmatrix}t_{2,2}&-t_{1,2}\\-t_{2,1}&t_{1,1}\end{pmatrix}}$
* $(1/t_{1,1}t_{2,2}-t_{1,2}t_{2,1})\cdot {\begin{pmatrix}t_{2,2}&-t_{1,2}\\-t_{2,1}&t_{1,1}\end{pmatrix}}$
    This exercise is recommended for all readers.

### Problem 10

Can we compute a determinant by expanding down the diagonal?

### Answer

No. Here is a determinant whose value
    ${\begin{vmatrix}1&0&0\\0&1&0\\0&0&1\end{vmatrix}}=1$
doesn't equal the result of expanding down the diagonal.
    $1\cdot (+1){\begin{vmatrix}1&0\\0&1\end{vmatrix}}+1\cdot (+1){\begin{vmatrix}1&0\\0&1\end{vmatrix}}+1\cdot (+1){\begin{vmatrix}1&0\\0&1\end{vmatrix}}=3$

### Problem 11

Give a formula for the adjoint of a diagonal matrix.

### Answer

Consider this diagonal matrix.
    $D={\begin{pmatrix}d_{1}&0&0&\ldots \\0&d_{2}&0&\\0&0&d_{3}\\&&&\ddots \\&&&&d_{n}\end{pmatrix}}$
If $i\neq j$ then the $i,j$ minor is an $(n-1)\!\times \!(n-1)$ matrix with only $n-2$ nonzero entries, because both $d_{i}$ and $d_{j}$ are deleted. Thus, at least one row or column of the minor is all zeroes, and so the cofactor $D_{i,j}$ is zero. If $i=j$ then the minor is the diagonal matrix with entries $d_{1}$, ..., $d_{i-1}$, $d_{i+1}$, ..., $d_{n}$. Its determinant is obviously $(-1)^{i+j}=(-1)^{2i}=1$ times the product of those.
    ${\text{adj}}\,(D)={\begin{pmatrix}d_{2}\cdots d_{n}&0&&0\\0&d_{1}d_{3}\cdots d_{n}&&0\\&&\ddots \\&&&d_{1}\cdots d_{n-1}\end{pmatrix}}$
By the way, Theorem 1.9 provides a slicker way to derive this conclusion.
    This exercise is recommended for all readers.

### Problem 12

Prove that the transpose of the adjoint is the adjoint of the transpose.

### Answer

Just note that if $S={{T}^{\rm {trans}}}$ then the cofactor $S_{j,i}$ equals the cofactor $T_{i,j}$ because $(-1)^{j+i}=(-1)^{i+j}$ and because the minors are the transposes of each other (and the determinant of a transpose equals the determinant of the matrix).

### Problem 13

Prove or disprove: ${\text{adj}}\,({\text{adj}}\,(T))=T$.

### Answer

It is false; here is an example.
    $T={\begin{pmatrix}1&2&3\\4&5&6\\7&8&9\end{pmatrix}}\qquad {\text{adj}}\,(T)={\begin{pmatrix}-3&6&-3\\6&-12&6\\-3&6&-3\end{pmatrix}}\qquad {\text{adj}}\,({\text{adj}}\,(T))={\begin{pmatrix}0&0&0\\0&0&0\\0&0&0\end{pmatrix}}$

### Problem 14

A square matrix is upper triangular if each $i,j$ entry is zero in the part above the diagonal, that is, when $i>j$.
* Must the adjoint of an upper triangular matrix be upper triangular? Lower triangular?
* Prove that the inverse of a upper triangular matrix is upper triangular, if an inverse exists.

### Answer

* An example suggests the right answer. The result is indeed upper triangular. A check of this is detailed but not hard. The entries in the upper triangle of the adjoint are $M_{a,b}$ where $a>b$. We need to verify that the cofactor $M_{a,b}$ is zero if $a>b$. With $a>b$, row $a$ and column $b$ of $M$, when deleted, leave an upper triangular minor, because entry $i,j$ of the minor is either entry $i,j$ of $M$ (this happens if $a>i$ and $b>j$; in this case $i<j$ implies that the entry is zero) or it is entry $i,j+1$ of $M$ (this happens if $i<a$ and $j>b$; in this case, $i<j$ implies that $i<j+1$, which implies that the entry is zero), or it is entry $i+1,j+1$ of $M$ (this last case happens when $i>a$ and $j>b$; obviously here $i<j$ implies that $i+1<j+1$ and so the entry is zero). Thus the determinant of the minor is the product down the diagonal. Observe that the $a-1,a$ entry of $M$ is the $a-1,a-1$ entry of the minor (it doesn't get deleted because the relation $a>b$ is strict). But this entry is zero because $M$ is upper triangular and $a-1<a$. Therefore the cofactor is zero, and the adjoint is upper triangular. (The lower triangular case is similar.)
    $M={\begin{pmatrix}1&2&3\\0&4&5\\0&0&6\end{pmatrix}}$
    ${\text{adj}}\,(M)={\begin{pmatrix}M_{1,1}&M_{2,1}&M_{3,1}\\M_{1,2}&M_{2,2}&M_{3,2}\\M_{1,3}&M_{2,3}&M_{3,3}\end{pmatrix}}={\begin{pmatrix}{\begin{vmatrix}4&5\\0&6\end{vmatrix}}&-{\begin{vmatrix}2&3\\0&6\end{vmatrix}}&{\begin{vmatrix}2&3\\4&5\end{vmatrix}}\\-{\begin{vmatrix}0&5\\0&6\end{vmatrix}}&{\begin{vmatrix}1&3\\0&6\end{vmatrix}}&-{\begin{vmatrix}1&3\\0&5\end{vmatrix}}\\{\begin{vmatrix}0&4\\0&0\end{vmatrix}}&-{\begin{vmatrix}1&2\\0&0\end{vmatrix}}&{\begin{vmatrix}1&2\\0&4\end{vmatrix}}\end{pmatrix}}={\begin{pmatrix}24&-12&-2\\0&6&-5\\0&0&4\end{pmatrix}}$
    ${\begin{pmatrix}m_{1,1}&\ldots &m_{1,b}&&\\m_{2,1}&\ldots &m_{2,b}&&\\\vdots &&\vdots &&\\m_{a,1}&\ldots &m_{a,b}&\ldots &m_{a,n}\\&&\vdots &&\\&&m_{n,b}&&\end{pmatrix}}$
* This is immediate from the prior part, by Corollary 1.11.

### Problem 15

This question requires material from the optional Determinants Exist subsection. Prove Theorem 1.5 by using the permutation expansion.

### Answer

We will show that each determinant can be expanded along row $i$. The argument for column $j$ is similar.
Each term in the permutation expansion contains one and only one entry from each row. As in Example 1.1, factor out each row $i$ entry to get $\left|T\right|=t_{i,1}\cdot {\hat {T}}_{i,1}+\dots +t_{i,n}\cdot {\hat {T}}_{i,n}$, where each ${\hat {T}}_{i,j}$ is a sum of terms not containing any elements of row $i$. We will show that ${\hat {T}}_{i,j}$ is the $i,j$ cofactor.
Consider the $i,j=n,n$ case first:
    $t_{n,n}\cdot {\hat {T}}_{n,n}=t_{n,n}\cdot \sum _{\phi }t_{1,\phi (1)}t_{2,\phi (2)}\dots \,t_{n-1,\phi (n-1)}\operatorname {sgn}(\phi )$
where the sum is over all $n$-permutations $\phi$ such that $\phi (n)=n$. To show that ${\hat {T}}_{i,j}$ is the minor $T_{i,j}$, we need only show that if $\phi$ is an $n$-permutation such that $\phi (n)=n$ and $\sigma$ is an $n-1$-permutation with $\sigma (1)=\phi (1)$, ..., $\sigma (n-1)=\phi (n-1)$ then $\operatorname {sgn}(\sigma )=\operatorname {sgn}(\phi )$. But that's true because $\phi$ and $\sigma$ have the same number of inversions.
Back to the general $i,j$ case. Swap adjacent rows until the $i$-th is last and swap adjacent columns until the $j$-th is last. Observe that the determinant of the $i,j$-th minor is not affected by these adjacent swaps because inversions are preserved (since the minor has the $i$-th row and $j$-th column omitted). On the other hand, the sign of $\left|T\right|$ and ${\hat {T}}_{i,j}$ is changed $n-i$ plus $n-j$ times. Thus ${\hat {T}}_{i,j}=(-1)^{n-i+n-j}\left|T_{i,j}\right|=(-1)^{i+j}\left|T_{i,j}\right|$.

### Problem 16

Prove that the determinant of a matrix equals the determinant of its transpose using Laplace's expansion and induction on the size of the matrix.

### Answer

This is obvious for the $1\!\times \!1$ base case.
For the inductive case, assume that the determinant of a matrix equals the determinant of its transpose for all $1\!\times \!1$, ..., $(n-1)\!\times \!(n-1)$ matrices. Expanding on row $i$ gives $\left|T\right|=t_{i,1}T_{i,1}+\dots \,+t_{i,n}T_{i,n}$ and expanding on column $i$ gives $\left|{{T}^{\rm {trans}}}\right|=t_{1,i}({{T}^{\rm {trans}}})_{1,i}+\dots +t_{n,i}({{T}^{\rm {trans}}})_{n,i}$ Since $(-1)^{i+j}=(-1)^{j+i}$ the signs are the same in the two summations. Since the $j,i$ minor of ${{T}^{\rm {trans}}}$ is the transpose of the $i,j$ minor of $T$, the inductive hypothesis gives $\left|({{T}^{\rm {trans}}})_{i,j}\right|=\left|T_{i,j}\right|$.

### ? Problem 17

Show that
    $F_{n}={\begin{vmatrix}1&-1&1&-1&1&-1&\ldots \\1&1&0&1&0&1&\ldots \\0&1&1&0&1&0&\ldots \\0&0&1&1&0&1&\ldots \\.&.&.&.&.&.&\ldots \end{vmatrix}}$
where $F_{n}$ is the $n$-th term of $1,1,2,3,5,\dots ,x,y,x+y,\ldots \,$, the Fibonacci sequence, and the determinant is of order $n-1$. (Walter & Tytun 1949)

### Answer

This is how the answer was given in the cited source.
Denoting the above determinant by $D_{n}$, it is seen that $D_{2}=1$, $D_{3}=2$. It remains to show that $D_{n}=D_{n-1}+D_{n-2},\;n\geq 4$. In $D_{n}$ subtract the $(n-3)$-th column from the $(n-1)$-th, the $(n-4)$-th from the $(n-2)$-th, ..., the first from the third, obtaining
    $F_{n}={\begin{vmatrix}1&-1&0&0&0&0&\ldots \\1&1&-1&0&0&0&\ldots \\0&1&1&-1&0&0&\ldots \\0&0&1&1&-1&0&\ldots \\.&.&.&.&.&.&\ldots \end{vmatrix}}.$
By expanding this determinant with reference to the first row, there results the desired relation.

## References

* Walter, Dan (proposer); Tytun, Alex (solver) (1949), "Elementary problem 834", American Mathematical Monthly, American Mathematical Society, 56 (6): 409.