Chapter 2 – Exercises

Exercise 1: Matrix Operations

a. Multiplication

(i) Compute the following matrix products:

    1. AB for

          \[ A = \begin{pmatrix} 3 & 4\\ 1 & 9 \end{pmatrix} \hspace{0.5cm}\text{and}\hspace{0.5cm} B = \begin{pmatrix} 5 & 2 & -1\\ 3 & -3 & 0 \end{pmatrix} \]

    2. AB, B'A' and BA for

          \[ A = \begin{pmatrix} 0 & 2\\ 3 & -5\\ -2 & 3 \end{pmatrix} \hspace{0.5cm}\text{and}\hspace{0.5cm} B = \begin{pmatrix} -1 & 2 & -3\\ 4 & -5 & 6 \end{pmatrix} \]

    3. v'A'Av for

          \[ A = \begin{pmatrix} 2 & 8\\ -3 & 2 \end{pmatrix} \hspace{0.5cm}\text{and}\hspace{0.5cm} v = \begin{pmatrix} 2\\1 \end{pmatrix} \]

1.


Before multiplying the matrices, it is instructive to check whether they meet the dimensionality criterion. Here, A\in\mathbb R^{2\times 2} and B\in \mathbb R^{2\times 3}, and the column dimension of A is equal to the row dimension of B. Therefore, AB exists, and the product will be of dimension 2\times 3 . We have

    \[\begin{split} AB &= \begin{pmatrix} 3 & 4\\ 1 & 9 \end{pmatrix}\begin{pmatrix} 5 & 2 & -1\\ 3 & -3 & 0 \end{pmatrix}\\& = \begin{pmatrix} 3\cdot 5 + 4 \cdot 3 & 3\cdot 2 + 4 \cdot (-3) & 3\cdot (-1) + 4 \cdot 0\\ 1 \cdot 5 + 9 \cdot 3 & 1 \cdot 2 + 9 \cdot (-3) & 1 \cdot (-1) + 9 \cdot 0\\ \end{pmatrix}\\& = \begin{pmatrix} 27 & -6 & -3\\ 32 & -25 & -1\\ \end{pmatrix}. \end{split}\]

 

2.


Before multiplying the matrices, it is instructive to check whether they meet the dimensionality criterion. Here, A\in\mathbb R^{3\times 2} and B\in \mathbb R^{2\times 3}, and the column dimension of A is equal to the row dimension of B. Therefore, AB exists, and the product will be of dimension 3\times 3, and moreover, BA exists and is of dimension 2\times 2. We have

    \[\begin{split} AB &= \begin{pmatrix} 0 & 2\\ 3 & -5\\ -2 & 3 \end{pmatrix} \begin{pmatrix} -1 & 2 & -3\\ 4 & -5 & 6 \end{pmatrix}\\&= \begin{pmatrix} 0\cdot (-1) + 2\cdot 4 & 0\cdot 2 + 2\cdot (-5) & 0\cdot (-3) + 2\cdot 6 \\ 3\cdot (-1) + (-5)\cdot 4 & 3\cdot 2 + (-5)\cdot (-5) & 3\cdot (-3) + (-5)\cdot 6 \\ (-2)\cdot (-1) + 3\cdot 4 & (-2)\cdot 2 + 3\cdot (-5) & (-2)\cdot (-3) + 3\cdot 6 \\ \end{pmatrix} \\&= \begin{pmatrix} 8 & -10 & 12\\ -23 & 31 & -39\\ 14 & -19 & 24 \end{pmatrix} \end{split}\]

For B'A', we can either multiply this expression out directly, or use that B'A' = (AB)' and exploit that we already know AB. Using the latter approach,

    \[ B'A' = (AB)' = \begin{pmatrix} 8 & -23 & 14\\ -10 & 31 & -19\\ 12 & -39 & 24 \end{pmatrix} \]

Finally,

    \[\begin{split} BA &= \begin{pmatrix} -1 & 2 & -3\\ 4 & -5 & 6 \end{pmatrix}\begin{pmatrix} 0 & 2\\ 3 & -5\\ -2 & 3 \end{pmatrix} \\&= \begin{pmatrix} (-1)\cdot 0 + 2\cdot 3 + (-3) \cdot (-2)& (-1)\cdot 2 + 2\cdot (-5) + (-3) \cdot 3 \\ 4\cdot 0 + (-5)\cdot 3 + 6 \cdot (-2)& 4\cdot 2 + (-5)\cdot (-5) + 6 \cdot 3 \\ \end{pmatrix} \\&= \begin{pmatrix} 12 & -21\\ -27 & 51 \end{pmatrix} \end{split}\]

 

3.


We can simplify multiplication by noting that v'A'Av = (Av)'Av = (Av)\cdot (Av), i.e. we are looking for the scalar product of Av with itself. We have

    \[ Av = \begin{pmatrix} 2 & 8\\ -3 & 2 \end{pmatrix}\begin{pmatrix} 2\\1 \end{pmatrix} = \begin{pmatrix} 2\cdot 2 + 8\cdot 1\\(-3)\cdot 2 + 2\cdot 1 \end{pmatrix} = \begin{pmatrix} 12\\-4 \end{pmatrix} \]

Hence,

    \[ v'A'Av = (Av)\cdot (Av) = 12^2 + (-4)^2 = 144 + 16 = 160 \]

This is also the answer you should obtain when multiplying the expression out directly, i.e. without the scalar product simplification. Note that for this approach, the order of multiplication is irrelevant, and you should always obtain the same result.

 

(ii) The course has introduced matrices E for left-multiplication that achieve elementary matrix operations. Use the following examples to verify that this approach works:

    1. Left-multiply

          \[ E = \begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix} \hspace{0.5cm}\text{to}\hspace{0.5cm} A = \begin{pmatrix} 5 & 2 & -1\\ 3 & -3 & 0 \end{pmatrix} \]

      to exchange the columns of A.

    2. Left-multiply

          \[ E = \begin{pmatrix} 1 & 5\\ 0 & 1 \end{pmatrix} \hspace{0.5cm}\text{to}\hspace{0.5cm} A = \begin{pmatrix} 3 & 8\\ 2 & -1 \end{pmatrix} \]

      to add 5 times row 2 to row 1 of A.

    3. Left-multiply

          \[ E = \begin{pmatrix} 3 & 0\\ -1 & 1 \end{pmatrix} \hspace{0.5cm}\text{to}\hspace{0.5cm} A = \begin{pmatrix} 3 & 8\\ 2 & -1 \end{pmatrix} \]

      to subtract row 1 from row 2 and subsequently multiply row 1 by 3.

1.

    \[\begin{split} EA &= \begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix} \begin{pmatrix} 5 & 2 & -1\\ 3 & -3 & 0 \end{pmatrix} \\&= \begin{pmatrix} 0\cdot 5 + 1\cdot 3 & 0\cdot 2 + 1\cdot (-3) & 0\cdot (-1) + 1\cdot 0\\ 1\cdot 5 + 0 \cdot 3 & 1\cdot 2 + 0 \cdot (-3) & 1\cdot (-1) + 0 \cdot 0 \end{pmatrix} \\&= \begin{pmatrix} 3 & -3 & 0\\ 5 & 2 & -1 \end{pmatrix} \end{split}\]

Indeed, left-multiplying E to A has exchanged the rows of A.

 

2.

    \[\begin{split} EA &= \begin{pmatrix} 1 & 5\\ 0 & 1 \end{pmatrix} \begin{pmatrix} 3 & 8\\ 2 & -1 \end{pmatrix} \\&= \begin{pmatrix} 1\cdot 3 + 5 \cdot 2 & 1\cdot 8 + 5 \cdot (-1)\\ 1\cdot 3 + 0 \cdot 2 & 1\cdot 8 + 0 \cdot (-1)\\ \end{pmatrix} \\&= \begin{pmatrix} 13 & 3\\ 2 & -1 \end{pmatrix} \end{split}\]

Indeed, left-multiplying E to A has left row 2 unchanged; further, it is easily verified that 5 times row 2 has been added to row 1.

 

3.

    \[\begin{split} EA &= \begin{pmatrix} 3 & 0\\ -1 & 1 \end{pmatrix} \begin{pmatrix} 3 & 8\\ 2 & -1 \end{pmatrix} \\&= \begin{pmatrix} 3\cdot 3 + 0 \cdot 2 & 3\cdot 8 + 0 \cdot (-1)\\ (-1)\cdot 3 + 1 \cdot 2 & (-1)\cdot 8 + 1 \cdot (-1)\\ \end{pmatrix} \\&= \begin{pmatrix} 9 & 24\\ -1 & -9 \end{pmatrix} \end{split}\]

Indeed, left-multiplying E to A has performed the desired operation.
This example shows that several operations can be performed at once, i.e. using only one matrix E, or respectively, that sequential application of operations can be summarized by a single matrix. However, be careful when doing so: all entries in E must refer to the initial matrix A that you start from, and not some intermediate matrix obtained after one or multiple operations. As a concrete example, if we wanted to first multiply row 1 by 3 and then subtract this from the second row, we would use E = \begin{pmatrix} 3 & 0\\ -3 & 1 \end{pmatrix}, as we subtract 3 times the initial first row from the second.

 

b. Determinant

(i) For the following matrices, compute the determinant using an appropriate rule.

    1. A = \begin{pmatrix} 3 & 8\\ 2 & -1 \end{pmatrix}
    2. B = \begin{pmatrix} 1 & -2 & 4\\ -\frac{1}{2} & \frac{1}{4} & -\frac{1}{8}\\ 1 & 2 & 1 \end{pmatrix}
    3. C = \begin{pmatrix} 0 & 0 & 2\\ 3 & 1 & -1\\ 2 & 2 & 4 \end{pmatrix}

1.


The rule we are using is that for a matrix M = \begin{pmatrix} a & b\\ c & d \end{pmatrix}, the determinant can be computed as

    \[ \det(M) = ad - bc \]

Accordingly,

    \[ \det(A) = 3\cdot (-1) - 8\cdot 3 = -3-24 = -27 \]

 

2.


The rule we are using is that for a matrix M = \begin{pmatrix} a & b & c\\ d & e & f\\ g & h & i\\ \end{pmatrix}, the determinant can be computed as (recall the intuition of left- and right-diagonals)

    \[ \det(M) = aei + bfg + cdh - ceg - bdi - afh \]

Accordingly,

    \[\begin{split} \det(B) &= 1\cdot \frac{1}{4} \cdot 1 + (-2)\cdot \left (-\frac{1}{8}\right ) \cdot 1 + 4\cdot \left (-\frac{1}{2}\right ) \cdot 2 - 4\cdot \frac{1}{4} \cdot 1 - (-2)\cdot \left (-\frac{1}{2}\right ) \cdot 1 - 1\cdot \left (-\frac{1}{8}\right ) \cdot 2 \\&= \frac{1}{4} + \frac{1}{4} - 4 - 1 - 1 + \frac{1}{4} \\&= \frac{3}{4} - 6 = -\frac{21}{4} \end{split}\]

 

3.


The rule we are using is again that for a matrix M = \begin{pmatrix} a & b & c\\ d & e & f\\ g & h & i\\ \end{pmatrix}, the determinant can be computed as (recall the intuition of left- and right-diagonals)

    \[ \det(M) = aei + bfg + cdh - ceg - bdi - afh \]

Because one row is equal to zeros except for one entry, we know that only one right- and left-diagonal each will not reduce to zero, which simplifies computation. This would be the case also if one column had zeros everywhere but for one entry. We obtain

    \[ \det(C) = 2\cdot 3 \cdot 2 - 2\cdot 1 \cdot 2 = 12 - 4 = 8 \]

Alternatively, we could have obtained this result from a Laplace-expansion for the first row, which is the more direct/formal way to exploit the zeros:

     \[\begin{split} \det(C) &= (-1)^{1+3} \cdot 2\cdot \det\begin{pmatrix} 3 & 1\\ 2 & 2\end{pmatrix} + (-1)^{1+1} \cdot 0\cdot \det\begin{pmatrix} 1 & -1\\ 2 & 4\end{pmatrix} + (-1)^{1+2} \cdot 0\cdot \det\begin{pmatrix} 3 & -1\\ 2 & 4\end{pmatrix} \\&= 2\cdot (3\cdot 2 - 1\cdot 2) = 2\cdot (6-2) = 8 \end{split}\]

where the last row uses the 2×2-rule we saw in Ex. 1.b.(i).1. Typically, you would not need to write out the last two summands in the first line when performing the Laplace-expansion, it is just done here for tractability.

 

(ii) In the course, we said that we typically deal with matrices of manageable size when computing the determinant, or that the matrix has a convenient structure (triangular, diagonal), where computing the determinant is as simple as multiplying all diagonal elements to obtain the trace. In some applications, however, you may not be that lucky, and revert to the general Laplace rule. Especially if there are zeros in the matrix, this method is still quite easily and quickly applied; this exercise is supposed to convince you of this fact.

Compute \det(A) when

    \[ A = \begin{pmatrix} 1 & -1 & 0 & 0 & 0 \\ 3 & 1 & 0 & 2 & 1 \\ 0 & 12\cdot\pi & 3 & -5 & 1 \\ 0 & 2 & 0 & -1 & 1 \\ 1 & 1 & 0 & 2 & 3 \\ \end{pmatrix} \]

When applying Laplace rule, you typically look for the row or column with the most zeros, as this gives you the shortest sum of sub-determinants in the next step. Here, accordingly, we first expand by the third column. Be careful to correctly carry over the non-zero entry!

    \[ \det(A) = (-1)^{3 + 3} \cdot 3 \cdot \det\begin{pmatrix} 1 & 3 & 0 & 0 \\ -1 & 1 & 2 & 1 \\ 0 & 2 & -1 & 1 \\ 1 & 1 & 2 & 3 \\ \end{pmatrix} = 3 \cdot \det\begin{pmatrix} 1 & 3 & 0 & 0 \\ -1 & 1 & 2 & 1 \\ 0 & 2 & -1 & 1 \\ 1 & 1 & 2 & 3 \\ \end{pmatrix} \]

Now, the first row has the most zeros, and we will use this row for expansion.

    \[ \det(A) = 3\cdot \left [(-1)^{1+1} \cdot 1\cdot \det\begin{pmatrix} 1 & 2 & 1 \\ 2 & -1 & 1 \\ 1 & 2 & 3 \\ \end{pmatrix} + (-1)^{1+2} \cdot 3 \cdot \det\begin{pmatrix} -1 & 2 & 1 \\ 0 & -1 & 1 \\ 1 & 2 & 3 \\ \end{pmatrix} \right ] \]

Now, we can apply the 3×3 rule twice:

    \[ \det\begin{pmatrix} 1 & 2 & 1 \\ 2 & -1 & 1 \\ 1 & 2 & 3 \\ \end{pmatrix} = -3 + 2 + 4 - (-1) - 2 - 12 = -10 \]

and

    \[ \det\begin{pmatrix} -1 & 2 & 1 \\ 0 & -1 & 1 \\ 1 & 2 & 3 \\ \end{pmatrix} = 3 + 2 + 0 - (-1) - (-2) - 0 = 8 \]

Accordingly, we obtain

    \[ \det(A) = 3\cdot (1\cdot (-10) - 3\cdot 8) = 3\cdot (-34) = -102 \]

 

c. Inversion

(i) For the following matrices, perform a test for invertability (using e.g. the determinant) and, if possible, compute the inverse matrix, using either a shortcut theorem or the Gauss-Jordan method:

    1. A = \begin{pmatrix} 3 & 8\\ 2 & -1 \end{pmatrix}
    2. B = \begin{pmatrix} -3 & 2 & 4\\ -6 & 5 & 4\\ 1 & -1 & 0 \end{pmatrix}
    3. C = \begin{pmatrix} 1 & 0 & 4\\ 0 & 1 & 2\\ -2 & 1 & 3 \end{pmatrix}

1.


Using the 2\times 2 rule for the determinant,

    \[\det(A) = 3\cdot (-1) - 8\cdot 2 = -3 - 16 = -19 \neq 0\]

Hence, A is invertible. Using the 2\times 2 rule for the inverse,

    \[ A^{-1} = \frac{1}{\det(A)} \begin{pmatrix} -1 & -8\\ -2 & 3 \end{pmatrix} = \begin{pmatrix} 1/19 & 8/19\\ 2/19 & -3/19 \end{pmatrix} \]

 

2.


Using the 3\times 3 rule for the determinant,

    \[\begin{split} \det(B) &= (-3)\cdot 5 \cdot 0 + 2\cdot 4 \cdot 1 + 4 \cdot (-6)\cdot (-1) - [4\cdot 5\cdot 1 + 4\cdot (-1) \cdot (-3) + 0\cdot 2\cdot (-6)] \\&= 0 + 8 + 24 - (20 + 12 + 0) = 32 - 32 = 0 \end{split}\]

Hence, B is not invertible.
Indeed, you could have also used the rank criterion here, as it is relatively straightforward to see that the columns/rows of B are linearly dependent; for instance, subtracting 3 times row 3 from row 1 yields row 2. Hence, B can not have full row rank, and can thus not be invertible.

 

3.


Using the 3\times 3 rule for the determinant,

    \[\begin{split} \det(C) &= 1\cdot 1 \cdot 3 + 0\cdot 2 \cdot (-2) + 4 \cdot 0\cdot 1 - [4\cdot 1\cdot (-2) + 2\cdot 1 \cdot 1 + 0\cdot 0\cdot 3] \\&= 3 + 0 + 0 - (-8 + 2) = 3 + 6 = 9 \neq 0 \end{split}\]

Hence, C is invertible.
The solution for the inverse is obtained from Gauss-Jordan. There are infinitely many ways of obtaining the inverse; your steps may be different and/or in a different order, the final result that you obtain should, however, coincide with the one of this solution.
For Gauss-Jordan, we bring C to identity form using elementary matrix operations, and perform the same operations in the same order to an identity matrix of appropriate dimension. As is done commonly, we write the intermediate matrices next to each other at every stage. Initially, we have

    \[ \begin{pmatrix} 1 & 0 & 4\\ 0 & 1 & 2\\ -2 & 1 & 3 \end{pmatrix} \hspace{0.5cm} \begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{pmatrix} \]

The first row can be used to eliminate all but one non-zero entry in the first column. Here, we add two times row 1 to row 3 to obtain

    \[ \begin{pmatrix} 1 & 0 & 4\\ 0 & 1 & 2\\ 0 & 1 & 11 \end{pmatrix} \hspace{0.5cm} \begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 2 & 0 & 1 \end{pmatrix} \]

Next, row 2 can be used to eliminate all but one non-zero entry in the second column. Here, we subtract row 2 from row 3 to obtain

    \[ \begin{pmatrix} 1 & 0 & 4\\ 0 & 1 & 2\\ 0 & 0 & 9 \end{pmatrix} \hspace{0.5cm} \begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 2 & -1 & 1 \end{pmatrix} \]

Next, we want a 1 in row 3 to be able to eliminate non-zero entries in the third column. For this, we multiply row 3 by 1/9:

    \[ \begin{pmatrix} 1 & 0 & 4\\ 0 & 1 & 2\\ 0 & 0 & 1 \end{pmatrix} \hspace{0.5cm} \begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 2/9 & -1/9 & 1/9 \end{pmatrix} \]

Finally, we subtract 2 times row 3 from row 2 and 4 times row 3 from row 1 to obtain the identity matrix:

    \[ \begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{pmatrix} \hspace{0.5cm} \begin{pmatrix} 1/9 & 4/9 & -4/9\\ -4/9 & 11/9 & -2/9\\ 2/9 & -1/9 & 1/9 \end{pmatrix} \]

Accordingly,

    \[ C^{-1} = \begin{pmatrix} 1/9 & 4/9 & -4/9\\ -4/9 & 11/9 & -2/9\\ 2/9 & -1/9 & 1/9 \end{pmatrix} = \frac{1}{9} \begin{pmatrix} 1 & 4 & -4\\ -4 & 11 & -2\\ 2 & -1 & 1 \end{pmatrix} \]

To verify that you have computed the correct inverse, you can multiply C^{-1} to C (it does not matter whether you left- or right-multiply as C^{-1}C = CC^{-1} = I_3) and check whether you arrive at the 3\times 3 identity matrix. This is a helpful tool for problem sets or exams that you can use to rule out mistakes, especially if you need the inverse matrix in subsequent problems.

 

(ii) In rare cases, you may come across applications where you need to invert “bigger” matrices than we usually deal with, i.e. matrices of higher dimension. Generally, this is quite computation-intensive, however, some matrices make your life easier than others. This exercise gives you some examples where despite matrix size, invertability checks and inversion are still manageable.

For the following matrices, perform a test for invertability (using e.g. the determinant) and, if possible, compute the inverse matrix, using either a shortcut theorem or the Gauss-Jordan method:

    1. A = \begin{pmatrix} 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1\\ 0 & 0 & 0 & 2 & 0 & 2 & 0 & 2 & 0\\ 0 & 0 & 3 & 0 & 3 & 0 & 3 & 0 & 3\\ 0 & 0 & 0 & 0 & 0 & 4 & 0 & 4 & 0\\ 0 & 0 & 0 & 0 & 5 & 0 & 5 & 0 & 5\\ 0 & 0 & 0 & 0 & 0 & 6 & 0 & 6 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 7 & 0 & 7\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 8 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 9\\ \end{pmatrix}
    2. B = \begin{pmatrix} 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0\\ 0 & 2 & 0 & 2 & 0 & 2 & 0 & 2\\ 0 & 0 & 3 & 0 & 3 & 0 & 3 & 0\\ 0 & 0 & 0 & 4 & 0 & 4 & 0 & 4\\ 0 & 0 & 0 & 0 & 5 & 0 & 5 & 0\\ 0 & 0 & 0 & 0 & 0 & 6 & 0 & 6\\ 0 & 0 & 0 & 0 & 0 & 0 & 7 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 8\\ \end{pmatrix}
    3. C = diag\{1/2^n: n\in\{1,2,\ldots,100\}\}\in\mathbb R^{100\times 100}

1.

A is an upper-triangular matrix, for which we know that the determinant is equal to the trace:

    \[ \det(A) = 1\cdot 0\cdot 3\cdot 0 \cdot 4 \cdot 6 \cdot 7 \cdot 8 \cdot 9 = 0. \]

As for any triangular matrix, the determinant is unequal to zero if and only if there are no zeros on the diagonal. Here, A has two zeros on the diagonal, and hence, A is not invertible.

Alternatively, you could argue that column 2 is the zero vector, which is linearly dependent of any other (set of) vector(s), and hence, A can not have full rank and is therefore not invertible.

 

2.

B is an upper-triangular matrix, and has no zeros on the diagonal. Hence, it is invertible. Due to its particular structure, Gauss-Jordan can be applied with relative ease: first, we multiply every i-th row with 1/i, i\in\{1,2,\ldots,8\}, which gives the second stage of Gauss-Jordan:

    \[ \begin{pmatrix} 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0\\ 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1\\ 0 & 0 & 1 & 0 & 1 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 & 0 & 1 & 0 & 1\\ 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1\\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\\ \end{pmatrix} \hspace{0.5cm} diag\{1/i: i\in\{1,2,\ldots,8\}\} \]

Now, use the 8th row to eliminate all ones in the 8th column, the 7th row for those in the 7th column, and so forth. This already yields the identity matrix on the LHS. For clarity, this step is divided into several intermediate ones below. For columns 5 through 8, this gives:

    \[ \begin{pmatrix} 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0\\ 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1\\ 0 & 0 & 1 & 0 & 1 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 & 0 & 1 & 0 & 1\\ 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\\ \end{pmatrix} \hspace{0.5cm} \begin{pmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 1/2 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 1/3 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 1/4 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 1/5 & 0 & -1/7 & 0\\ 0 & 0 & 0 & 0 & 0 & 1/6 & 0 & -1/8\\ 0 & 0 & 0 & 0 & 0 & 0 & 1/7 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1/8\\ \end{pmatrix} \]

Proceeding with rows 3 and 4 where we subtract rows 5 and 7 and 6 and 8, respectively,

    \[ \begin{pmatrix} 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0\\ 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1\\ 0 & 0 & 1 & 0 & 1 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\\ \end{pmatrix} \hspace{0.5cm} \begin{pmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 1/2 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 1/3 & 0 & -1/5 & 0 & 0 & 0\\ 0 & 0 & 0 & 1/4 & 0 & -1/6 & 0 & 0\\ 0 & 0 & 0 & 0 & 1/5 & 0 & -1/7 & 0\\ 0 & 0 & 0 & 0 & 0 & 1/6 & 0 & -1/8\\ 0 & 0 & 0 & 0 & 0 & 0 & 1/7 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1/8\\ \end{pmatrix} \]

Note that the 1/7 and -1/7 and 1/8 and -1/8, respectively, cancel each other out when computing rows 3 and 4. Proceeding with rows 1 and 2 where we subtract rows 3, 5 and 7 and 4, 6 and 8, respectively, we arrive at the identity on the LHS and obtain on the RHS:

    \[ B^{-1} = \begin{pmatrix} 1 & 0 & -1/3 & 0 & 0 & 0 & 0 & 0\\ 0 & 1/2 & 0 & -1/4 & 0 & 0 & 0 & 0\\ 0 & 0 & 1/3 & 0 & -1/5 & 0 & 0 & 0\\ 0 & 0 & 0 & 1/4 & 0 & -1/6 & 0 & 0\\ 0 & 0 & 0 & 0 & 1/5 & 0 & -1/7 & 0\\ 0 & 0 & 0 & 0 & 0 & 1/6 & 0 & -1/8\\ 0 & 0 & 0 & 0 & 0 & 0 & 1/7 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1/8\\ \end{pmatrix} \]

Indeed, with a bit more formality, you can show that any matrix of the form of B, i.e. upper-triangular with alternating row index and zero, has an inverse with diagonal equal to one over the row index, the second upper off-diagonal equal to -1 over the row index plus 2, and zeros everywhere else.

 

3.


For any diagonal matrix, to arrive at the identity, we must simply multiply row i by 1/a_{ii} where a_{ii} is the row-i-column-i-entry of the matrix to be inverted. Accordingly, by applying the same operations to an identity matrix, we obtain

    \[ C^{-1} = diag\{2^n:n\in\{1,2,\ldots,100\}\} \]

 

Exercise 2: Equation Systems

As we have seen in the course, matrices are a helpful tool in solving systems of linear equations, especially when the number of equations and variables coincide. In the following, you are given two systems of equations. For either system, argue that it has a unique solution and determine it, or otherwise, decide whether the system has no or infinitely many solutions. In the latter case, give at least two different vectors that solve the equation system.
Hint: You may need to determine the column space of a matrix A at some point. You can do this by using that the column space is the set of linear combinations that you can obtain from any largest set of linearly independent columns of A; e.g. when A = (a_1, a_2, a_3) and the columns \{a_1, a_2\}, \{a_1, a_3\} and \{a_2, a_3\} are linearly independent but \{a_1,a_2,a_3\} are not, then

    \[ Co(A) = \{\lambda a_1 + \mu a_2: \lambda,\mu \in\mathbb R\} = \{\lambda a_1 + \mu a_3: \lambda,\mu \in\mathbb R\} = \{\lambda a_2 + \mu a_3: \lambda,\mu \in\mathbb R\}. \]

 

(i) Solve

    \[ \begin{split} 2 x + 3 y + 2 z &= 5\\ x - 2 y &= 3\\ x + y + z &= 0 \end{split} \]


To solve the equation system using the matrix approach, we first write it in matrix notation (Ax = b):

    \[ \begin{pmatrix} 2 & 3 & 2\\ 1 & -2 & 0\\ 1 & 1 & 1 \end{pmatrix} \begin{pmatrix} x\\y\\z \end{pmatrix} = \begin{pmatrix} 5\\3\\0 \end{pmatrix} \]

To check for a unique solution, we need to investigate whether the matrix is invertible. Using the determinant test,

    \[ \det\begin{pmatrix} 2 & 3 & 2\\ 1 & -2 & 0\\ 1 & 1 & 1 \end{pmatrix} = -4 + 0 + 2 - (-4) - 3 - 0 = -1 \neq 0 \]

Thus, we already know that the system will have a unique solution, given by

    \[ \begin{pmatrix} x^*\\y^*\\z^* \end{pmatrix} = \begin{pmatrix} 2 & 3 & 2\\ 1 & -2 & 0\\ 1 & 1 & 1 \end{pmatrix}^{-1} \begin{pmatrix} 5\\3\\0 \end{pmatrix} \]

To determine the solution, it remains to invert the system’s matrix. As usual, we do this using Gauss-Jordan. The following briefly summarizes a potential sequence of elementary operations that yield the inverse; for more extensive solutions to Gauss-Jordan, please consult Ex. 1.c.

We get the one in the top left corner by multiplying row 1 by 1/2; subsequently, we subtract it from rows 2 and 3 to obtain zeros in column 1 for these rows. We arrive at

    \[ \begin{pmatrix} 1 & 3/2 & 1\\ 0 & -7/2 & -1\\ 0 & -1/2 & 0 \end{pmatrix} \hspace{0.5cm} \begin{pmatrix} 1/2 & 0 & 0\\ -1/2 & 1 & 0\\ -1/2 & 0 & 1 \end{pmatrix} \]

We then exchange rows 2 and 3, multiply the new row 2 by -2, and use it to eliminate the non-zero entry in column 2 in the first and third row to arrive at

    \[ \begin{pmatrix} 1 & 0 & 1\\ 0 & 1 & 0\\ 0 & 0 & -1 \end{pmatrix} \hspace{0.5cm} \begin{pmatrix} -1 & 0 & 3\\ 1 & 0 & -2\\ 3 & 1 & -7 \end{pmatrix} \]

Finally, we multiply row 3 by -1 and subtract it from row 1 to obtain

    \[ \begin{pmatrix} 2 & 3 & 2\\ 1 & -2 & 0\\ 1 & 1 & 1 \end{pmatrix}^{-1} = \begin{pmatrix} 2 & 1 & -4\\ 1 & 0 & -2\\ -3 & -1 & 7 \end{pmatrix} \]

Therefore, the solution is

    \[ \begin{pmatrix} x^*\\y^*\\z^* \end{pmatrix} = \begin{pmatrix} 2 & 1 & -4\\ 1 & 0 & -2\\ -3 & -1 & 7 \end{pmatrix} \begin{pmatrix} 5\\3\\0 \end{pmatrix} =\begin{pmatrix} 13\\5\\-18 \end{pmatrix} \]

 

(ii) Solve

    \[ \begin{split} 2 x - y + z &= -1\\ -3x +3 y - 2z &= 7\\ 5x - y + 2z &= 3 \end{split} \]


To solve the equation system using the matrix approach, we first write it in matrix notation (Ax = b):

    \[ \begin{pmatrix} 2 & -1 & 1\\ -3 & 3 & -2\\ 5 & -1 & 2 \end{pmatrix} \begin{pmatrix} x\\y\\z \end{pmatrix} = \begin{pmatrix} -1\\7\\3 \end{pmatrix} \]

To check for a unique solution, we need to investigate whether the matrix is invertible. Using the determinant test,

    \[ \det \begin{pmatrix} 2 & -1 & 1\\ -3 & 3 & -2\\ 5 & -1 & 2 \end{pmatrix} = 12 + 10 + 3 - 15 - 4 - 6 = 25 - 25 = 0 \]

Hence, the matrix is not invertible, and there is no unique solution to the system of equations.

To determine whether there are no or infinitely many solutions, we compute the column space of the system’s matrix and check whether the vector of solutions is an element of this space, i.e. whether we can use the columns of the matrix to “reach” the solution vector through linear combination.
To compute the column space, we must first know how many linearly independent columns the system’s matrix has. It is relatively easy to see that the answer is 2: if it were 1, then for any two columns a_j, a_k of the matrix, there would exist \lambda\in\mathbb R such that a_j = \lambda a_k. However, this is not the case. If, on the other hand, the matrix had 3 linearly independent columns, it would have full column rank and hence be invertible; this, we have already ruled out using the determinant test. Thus, the matrix has two linearly independent columns.
According to the hint, the column space contains any linear combination that can be obtained from combining two columns of the system’s matrix. Let us pick the first two. Then,

    \[ Co(A) = \{\lambda (2, -3, 5)' + \mu (-1, 3, -1)': \lambda,\mu\in\mathbb R\} \]

To see if the solution vector is an element of this space, we must check whether there are \lambda, \mu\in\mathbb R such that

    \[ \lambda\begin{pmatrix} 2\\ -3\\ 5 \end{pmatrix} + \mu \begin{pmatrix} -1\\ 3\\ -1 \end{pmatrix} = \begin{pmatrix} -1\\ 7\\ 3 \end{pmatrix} \]

From the first row, \mu = 1 + 2\lambda. Plugging this into the third, we obtain \lambda = \frac{4}{3} and, accordingly, \mu = \frac{11}{3}. Plugging this into the second row, we obtain

    \[ \frac{4}{3} \cdot (-3) + \frac{11}{3}\cdot 3 = 7\hspace{0.5cm} \Leftrightarrow\hspace{0.5cm} 11 - 4 = 7, \]

and thus no contradiction. Hence, it is true that

    \[ \frac{4}{3}\begin{pmatrix} 2\\ -3\\ 5 \end{pmatrix} + \frac{11}{3} \begin{pmatrix} -1\\ 3\\ -1 \end{pmatrix} = \begin{pmatrix} -1\\ 7\\ 3 \end{pmatrix} \]

and therefore (-1, 7, 3)'\in Co(A), where A is the system’s matrix. Therefore, we know that the system has infinitely many solutions.

Comment. For a system with no solutions, we had proceeded as above, but arrived at a contradiction when checking for whether the (\lambda, \mu)-combination we found for the first two lines investigated also satisfies the third line. No matter which lines you start out with, you only get a (\lambda, \mu)-combination consistent with all three lines if the solution vector is an element of the column space of the system’s matrix.

To compute two solutions, we need to find two independent ways of “arriving at” the solutions vector by linearly combining the columns of A (recall the graphic from chapter 2). A first combination has already been obtained above: we know that using only columns 1 and 2, i.e. setting z = 0, we can arrive at the solutions vector with x=\frac{4}{3} and y = \frac{11}{3}. A second vector can be found fixing again x, y or z and computing the combination of free variables that yields the solution vector. There are infinitely many ways of doing so, one of which is presented below.

Fix z = -1. Bringing z\cdot (1, -2, 2) to the other side, we obtain

    \[ x\begin{pmatrix} 2\\ -3\\ 5 \end{pmatrix} + y \begin{pmatrix} -1\\ 3\\ -1 \end{pmatrix} = \begin{pmatrix} 0\\ 5\\ 5 \end{pmatrix} \]

From the first line, y=2x. Plugging this into the third, x=\frac{5}{3}, and therefore, y=\frac{10}{3}. Again, no contradiction is obtained from line two.

In conclusion, two possible solutions are

    \[ \begin{pmatrix} x^*\\y^*\\z^* \end{pmatrix} \in\left \{ \begin{pmatrix} 5/3\\10/3\\-1 \end{pmatrix},\begin{pmatrix} 4/3\\11/3\\0 \end{pmatrix} \right \} \]

Of course, because the system has infinitely many solutions, your two examples may well be different from the ones found here. To verify whether your solution is correct, simply plug the solutions you found into the equation system and verify that they solve it. Alternatively, you can check whether it satisfies the general structure given below.

Comment. The general formula for all solutions, i.e. the space of solutions to this equation system can be obtained by the same logic as above: if we don’t set z equal to -1 but bring it to the other side with variable argument, we can solve for x(z) and y(z), i.e. the other two variables as functions of z (alternatively, you could also solve for y(x) and z(x) or x(y) and z(y), i.e. it does not matter which variable you “fix”). Proceeding accordingly, we get

    \[ x\begin{pmatrix} 2\\ -3\\ 5 \end{pmatrix} + y \begin{pmatrix} -1\\ 3\\ -1 \end{pmatrix} = \begin{pmatrix} -1 - z\\ 7 + 2z\\ 3 - 2z \end{pmatrix} \]

Then, we get from line 1 that y = 2x + 1 + z which, with line 3, yields

    \[5x - (2x + 1 + z) = 3 - 2z \hspace{0.5cm} \Leftrightarrow\hspace{0.5cm} 3x = 4 - z \Leftrightarrow\hspace{0.5cm} x = \frac{4}{3} - \frac{z}{3} \]

Plugging this into y, we obtain

    \[ y = 2\left (\frac{4}{3} - \frac{z}{3}\right )+ 1 + z = \frac{11}{3} + \frac{1}{3}z \]

Hence, the space of solutions is

    \[ S = \left \{\frac{1}{3}\cdot\begin{pmatrix} 4-z\\ 11-z\\ 3z \end{pmatrix}: z\in\mathbb R\right \} \]

 

Exercise 3: Rank, Eigenvalues and Definiteness

a. The Rank of a Square Matrix

Consider the matrix

    \[ A = \begin{pmatrix} 2 & 1 & 0 & 1\\ 4 & 3 & 1 & 1\\ 3 & 1 & -1 & 3\\ 0 & 2 & 4 & - 6\\ \end{pmatrix} \]

What is the rank of A?
Hint: The rank is invariant to (i.e., unchanged by) elementary matrix operations; the rank of triangular matrices is relatively straightforward to determine using the linear independence test for vectors.


The rank of A is easiest to determine from a triangular matrix obtained by applying elementary operations to A. Adding -2 times row 1 to row 2 and -3/2 times row 1 to row 3, one obtains

    \[ \tilde A = \begin{pmatrix} 2 & 1 & 0 & 1\\ 0 & 1 & 1 & -1\\ 0 & -\frac{1}{2} & -1 & \frac{3}{2}\\ 0 & 2 & 4 & - 6\\ \end{pmatrix} \]

Next, adding 1/2 times row 2 to row 3 and -2 times row 2 to row 4, we arrive at

    \[ \tilde A = \begin{pmatrix} 2 & 1 & 0 & 1\\ 0 & 1 & 1 & -1\\ 0 & 0 & -\frac{1}{2} & 1\\ 0 & 0 & 2 & - 4\\ \end{pmatrix} \]

Finally, adding 4 times the third to the fourth row, we obtain the triangular matrix:

    \[ \tilde A = \begin{pmatrix} 2 & 1 & 0 & 1\\ 0 & 1 & 1 & -1\\ 0 & 0 & -\frac{1}{2} & 1\\ 0 & 0 & 0 & 0\\ \end{pmatrix} \]

It is more or less obvious that the rank of this matrix is rk (\tilde A) = 3: considering the rows of \tilde A (recall: rank = row rank = column rank), the last row, as the zero vector, is linearly dependent of any other vector in \mathbb R^4. On the other hand, the remaining three rows are linearly independent. This can be seen from the linear independence test for vectors: if

    \[ \begin{pmatrix} 0\\ 0\\ 0\\ 0\\ \end{pmatrix} = \lambda_1 \begin{pmatrix} 2\\ 1\\ 0\\ 1\\ \end{pmatrix} + \lambda_2 \begin{pmatrix} 0\\ 1\\ 1\\ -1\\ \end{pmatrix} + \lambda_3 \begin{pmatrix} 0\\ 0\\ -\frac{1}{2}\\ 1\\ \end{pmatrix} = \begin{pmatrix} 2\lambda_1 \\ \lambda_1 + \lambda_2\\ \lambda_2 -\frac{1}{2}\lambda_3\\ \lambda_1 - \lambda_2 + \lambda_3\\ \end{pmatrix} \]

then from line 1, \lambda_1 = 0. From line 2, we obtain \lambda_2 = 0, which, with line 3, gives \lambda_3 = 0, so that \lambda_1 = \lambda_2 = \lambda_3 = 0. Hence, for the first three rows a_1,a_2,a_3 of \tilde A, \lambda_1a_1 + \lambda_2a_2 + \lambda_3a_3 = \mathbf 0 implies \lambda_1 = \lambda_2 = \lambda_3 = 0. Therefore, by the linear independence test proposition, a_1,a_2,a_3 are linearly independent. This allows to conclude that

    \[ rk (A) = rk (\tilde A) = 3. \]

 

b. Definiteness and Eigenvalues

Consider the matrix

    \[ A = \begin{pmatrix} 2 & 1 & 0\\ 0 & 3 & 1\\ -1 & 1 & -1 \end{pmatrix} \]

(i) Is A positive or negative (semi-)definite? What can you say about the invertability of A from this fact?


For a vector v = (v_1, v_2, v_3)'\in \mathbb R^3,

    \[ v'Av = v' \begin{pmatrix} 2 v_1 + v_2\\ 3 v_2 + v_3\\ v_2 - v_1 - v_3 \end{pmatrix} = 2v_1^2 + v_1v_2 + 3v_2^2 + v_2v_3 + v_2v_3 - v_1v_3 - v_3^2 \]

Typically, when you see that the expression can not be reduced to squares (either directly or using binomial formulas) or some squares have opposing signs, you directly know that the matrix is indefinite. To show this, you find two examples where v'Av > 0 for one and v'Av < 0 for the other; this rules out all forms of (semi-)definiteness.
For v = (1,0,0), v'Av = 2\cdot (1)^2 = 1 > 0 whereas for v = (0, 0, 1), v'Av = (-1)\cdot (1)^2 = -1 < 0.
Hence, A is indefinite.
Because A is indefinite, it meets none of the definiteness conditions for invertability, and we can not use definiteness to judge upon A‘s invertability. Note, however, that definiteness provides only a sufficient condition for invertability, such that finding that the matrix is indefinite is not a justified argument to conclude upon its non-invertability.

 

(ii) What are the eigenvalues of A? What can you say about the invertability of A from this fact?


To compute the eigenvalues, we compute the characteristic polynomial of A and then set it to zero:

    \[\begin{split} \mathcal P_A(\lambda) &= \det\begin{pmatrix} \lambda - 2 & -1 & 0\\ 0 & \lambda - 3 & -1\\ 1 & -1 & \lambda + 1 \end{pmatrix} \\ &= (\lambda-2)(\lambda-3)(\lambda+1) + 1 - (\lambda - 2) \\& = (\lambda^2 - 5\lambda + 6)(\lambda+1) + 3 - \lambda \\& = \lambda^3 - 5\lambda^2 + 6\lambda + \lambda^2 - 5\lambda + 6 + 3 - \lambda \\& = \lambda^3 - 4\lambda^2 + 9 \end{split}\]

Therefore,
\mathcal P_A(\lambda) = 0 if and only if

    \[ \lambda^2(4 - \lambda) = 9 \]

This is not an obvious equation to solve, with a bit of analytical reasoning and some experimentation, however, there is still a way to find the solutions. The typical approach to cubic equation systems is to be able to guess one solution (typically something “easy” like 0,1,2 or 1/2) and then compute the other ones from polynomial division.
First of all, we know that \lambda = 0 is not a solution, as the equation would become 0=9, a contradiction.
Hence, we can divide by \lambda^2 to obtain

    \[ 4 - \lambda = \frac{9}{\lambda^2} \]

With some experimentation (or trying the usual suspects iteratively), you may find that \lambda = 3 yields 1 = 1, and therefore solves the equation. Dividing \mathcal P_A(\lambda) by x-3, one obtains

    \[ \mathcal P_A(\lambda) = (\lambda^2 - \lambda - 3)(x-3) \]

For the former summand, \lambda^2 - \lambda - 3 = 0 if and only if

    \[ \lambda \in \left \{\frac{1}{2}\pm \sqrt{\frac{1}{4} + 3}\right \} \hspace{0.5cm} \Leftrightarrow \hspace{0.5cm} \lambda \in \left \{\frac{1-\sqrt{13}}{2}, \frac{1+\sqrt{13}}{2}\right \} \]

Hence, the eigenvalues of A are given by

    \[ E(A) = \left \{\frac{1-\sqrt{13}}{2}, \frac{1+\sqrt{13}}{2}, 3\right \} \]

Because zero is not an element of the eigenvalues of A, we know that A is invertible.

 

(Bonus question) If A is invertible, compute its inverse.


As (ii) has revealed, A is invertible. We compute the inverse using Gauss-Jordan. Eliminating all but the first non-zero entry in column 1 gives

    \[ \begin{pmatrix} 1 & \frac{1}{2} & 0\\ 0 & 1 & \frac{1}{3}\\ 0 & \frac{3}{2} & -1 \end{pmatrix} \hspace{0.5cm} \begin{pmatrix} \frac{1}{2} & 0 & 0\\ 0 & \frac{1}{3} & 0\\ \frac{1}{2} & 0 & 1 \end{pmatrix} \]

Clearing column 2 gives

    \[ \begin{pmatrix} 1 & 0 & -\frac{1}{6}\\ 0 & 1 & \frac{1}{3}\\ 0 & 0 & -\frac{3}{2} \end{pmatrix} \hspace{0.5cm} \begin{pmatrix} \frac{1}{2} & -\frac{1}{6} & 0\\ 0 & \frac{1}{3} & 0\\ \frac{1}{2} & -\frac{1}{2} & 1 \end{pmatrix} \]

Next, let us set up to clear column 3:

    \[ \begin{pmatrix} 1 & 0 & -\frac{1}{6}\\ 0 & 1 & \frac{1}{3}\\ 0 & 0 & 1 \end{pmatrix} \hspace{0.5cm} \begin{pmatrix} \frac{1}{2} & -\frac{1}{6} & 0\\ 0 & \frac{1}{3} & 0\\ -\frac{1}{3} & \frac{1}{3} & -\frac{2}{3} \end{pmatrix} \]

Clearing column 3 gives

    \[ A^{-1} = \begin{pmatrix} \frac{8}{18} & -\frac{2}{18} & -\frac{2}{18}\\ \frac{1}{9} & \frac{2}{9} & \frac{2}{9} \\ -\frac{1}{3} & \frac{1}{3} & -\frac{2}{3} \end{pmatrix} = \frac{1}{18}\cdot\begin{pmatrix} 8 & -2 & -2\\ 2 & 4 & 4 \\ -6 & 6 & -12 \end{pmatrix} \]

 

c. Definiteness of a Matrix Product with its Transpose

Can you say something about the definiteness of A'A where A is an arbitrary matrix? Give a formal argument for your answer!
Hint 1: Recall that definiteness of a matrix can be thought of as a generalization of a real number’s sign. For real numbers a\in\mathbb R, we know that a'a = a^2 \geq 0.
Hint 2: If you have already solved the exercises for chapter 1, a sub-question of Ex. 1 should ring a bell here.


Note first that no matter the dimensions of A, A'A will always be symmetric, and it is therefore meaningful to talk about the definiteness of A'A: if A\in\mathbb R^{n\times k}, then A'\in\mathbb R^{k\times n}, such that the column dimension of A' coincides with the row dimension of A, and the product exists with dimension k\times k.

Second, for any v\in\mathbb R^k, with w = Av, it holds that

    \[ v'A'Av = (Av)'Av = w'w = \sum_{i=1}^k w_i^2 \geq 0 \]

so that A'A is always positive semi-definite. Hence, like the product of a (transposed) real number with itself, the respective matrix product is “non-negative”. Further, it is strictly positive if for any v\in\mathbb R^k\backslash\{\mathbf 0\}, Av \neq 0, which is the case whenever A has full column rank (cf. the elaborations on OLS in chapter 2). For a real number a\in\mathbb R, a has “full column rank” if and only if a\neq 0. Hence, the column rank concept is useful to think about generalizing an object’s property of “not being equal to zero” to the matrix context.