Problem Set 1

  1. What is the rank of the matrix \(\mathbf{A} = \left[\begin{array} {rrr} 1 & 2 & 3 & 4 \\ -1 & 0 & 1 & 3 \\ 0 & 1 & -2 & 1 \\ 5 & 4 & -2 & -3 \\ \end{array}\right]\)?
A <- matrix(c(1, -1, 0, 5, 2, 0, 1, 4, 3, 1, -2, -2, 4, 3, 1, -3), 4, 4)
pracma::rref(A) 
##      [,1] [,2] [,3] [,4]
## [1,]    1    0    0    0
## [2,]    0    1    0    0
## [3,]    0    0    1    0
## [4,]    0    0    0    1

The rank is 4. There are 4 non-zero columns in the resulting matrix. This is confirmed below.

pracma::Rank(A)
## [1] 4

Given an \(m\times n\) matrix where \(m>n\), what can be the maximum rank? The minimum rank, assuming that the matrix is non-zero?

A <- matrix(c(1, -1, 0, 5, 2, 0, 1, 4, 3, 1, -2, -2), 4, 3)
pracma::rref(A)
##      [,1] [,2] [,3]
## [1,]    1    0    0
## [2,]    0    1    0
## [3,]    0    0    1
## [4,]    0    0    0
pracma::Rank(A)
## [1] 3

Rank can be identified by the number non-zero rows in rref. Since there are three rows the rank is 3. It is not possible to get a rank of 4 in this case as any non-zero 4th row would be eliminated to reach rref. Thus the max rank is \(n\), the number of columns.

A <- matrix(c(1, -1, 0, 5), 4, 1)
pracma::rref(A)
##      [,1]
## [1,]    1
## [2,]    0
## [3,]    0
## [4,]    0
pracma::Rank(A)
## [1] 1

Through example we have reduced the matrix to a rank of 1. The only way to get a rank of 0 is if that matrix had a 0 in it’s first row and that would be the 0 matrix. Thus, the smallest rank of a non-zero matrix is 1.

What is the rank of matrix \(\mathbf{B} = \left[\begin{array} {rrr} 1 & 2 & 1 \\ 3 & 6 & 3 \\ 2 & 4 & 2 \\ \end{array}\right]\)?

B <- matrix(c(1, 3, 2, 2, 6, 4, 1, 3, 2), 3, 3)
pracma::rref(B)
##      [,1] [,2] [,3]
## [1,]    1    2    1
## [2,]    0    0    0
## [3,]    0    0    0

As described above, the number of non-zero rows in rref is 1 and thus the rank is 1. This is confirmed below.

pracma::Rank(B)
## [1] 1

Problem Set 2

Compute the eigenvalues and eigenvectors of the matrix \(A\). You’ll need to show your work. You’ll need to write out the characteristic polynomial and show your solution.

Given the matrix \(\mathbf{A} = \left[\begin{array} {rrr} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \\ \end{array}\right]\) we start by augmenting the matrix along it’s diagonals and finding the resulting determinent.

\(\det\Bigg(\left[\begin{array} {rrr} 1-x & 2 & 3 \\ 0 & 4-x & 5 \\ 0 & 0 & 6-x \\ \end{array}\right]\Bigg)\)

This can be broken down into 3 smaller statements that must be summed.

\((1-x)\det\left(\begin{array} {rrr} 4-x & 5\\ 0 & 6-x\\ \end{array}\right) = (1-x)\bigg((4-x)(6-x)-5(0)\bigg)\)

and

\(2(-1)\det\left(\begin{array} {rrr} 0 & 5\\ 0 & 6-x\\ \end{array}\right) = 2(-1)(0) = 0\)

and

\(3\det\left(\begin{array} {rrr} 0 & 4-x\\ 0 & 0\\ \end{array}\right) = 3(0) = 0\)

Summing and solving gives us:

\((1-x)\bigg((4-x)(6-x)-5(0)\bigg) + 0 + 0 =\)

\((1-x)(24-10x+x^2) =\)

\(24-10x+x^2-24x+10x^2-x^3 =\)

\(-(x-1)(x-4)(x-6)\)

Solving this equation for 0 provides the unique eigenvectors for the original matrix.

\(\lambda = 1, 4, 6\)

We must find the eigenvectors 1 at a time, by finding the null space of the resulting matrix:

\(\left[\begin{array} {rrr} 1-\lambda & 2 & 3 \\ 0 & 4-\lambda & 5 \\ 0 & 0 & 6-\lambda \\ \end{array}\right]\)

\(\left[\begin{array} {rrr} 1-1 & 2 & 3 \\ 0 & 4-1 & 5 \\ 0 & 0 & 6-1 \\ \end{array}\right] = \left[\begin{array} {rrr} 0 & 2 & 3 \\ 0 & 3 & 5 \\ 0 & 0 & 5 \\ \end{array}\right] \xrightarrow{\text{rref}} \left[\begin{array} {rrr} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \\ \end{array}\right]\)

The null space of this matrix (and thus the eigenvector of the original) is: \(\Bigg \langle \left[\begin{array} {rrr} 1 \\ 0 \\ 0 \\ \end{array}\right]\Bigg\rangle\)

Repeating the process for \(\lambda = 4\)

\(\left[\begin{array} {rrr} -3 & 2 & 3 \\ 0 & 0 & 5 \\ 0 & 0 & 2 \\ \end{array}\right] \xrightarrow{\text{rref}} \left[\begin{array} {rrr} 1 & \frac{-2}{3} & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \\ \end{array}\right]\)

The null space of this matrix (and thus the eigenvector of the original) is: \(\Bigg \langle \left[\begin{array} {rrr} \frac{2}{3} \\ 1 \\ 0 \\ \end{array}\right]\Bigg\rangle\) or \(\Bigg \langle \left[\begin{array} {rrr} 2 \\ 3 \\ 0 \\ \end{array}\right]\Bigg\rangle\)

Repeating the process for \(\lambda = 6\)

\(\left[\begin{array} {rrr} -5 & 2 & 3 \\ 0 & -2 & 5 \\ 0 & 0 & 0 \\ \end{array}\right] \xrightarrow{\text{rref}} \left[\begin{array} {rrr} 1 & 0 & \frac{-8}{5} \\ 0 & 1 & \frac{-5}{2} \\ 0 & 0 & 0 \\ \end{array}\right]\)

The null space of this matrix (and thus the eigenvector of the original) is: \(\Bigg \langle \left[\begin{array} {rrr} \frac{8}{5} \\ \frac{5}{2} \\ 1 \\ \end{array}\right]\Bigg\rangle\) or \(\Bigg \langle \left[\begin{array} {rrr} 16 \\ 25 \\ 10 \\ \end{array}\right]\Bigg\rangle\)