605: hw3

Jie Zou

2021-09-11

Problem set 1

  1. What is the rank of the matrix A?
    \[\mathbf{A} = \begin{bmatrix} 1 & 2 & 3 & 4 \\ -1 & 0 & 1 & 3 \\ 0 & 1 & -1 & 1 \\ 5 & 4 & -2 & -3 \end{bmatrix} \]
A = matrix(c(1,2,3,4,-1,0,1,3,0,1,-2,1,5,4,-2,-3), 4,4, byrow = T)

# the rank of square matrix will be its dimension
dim(A)
## [1] 4 4
  1. Given an \(m\)x\(n\) matrix when \(m>n\), what can be the maximum rank? the minimum rank, assuming that the matrix is non-zero?
    \(m>n\) means that the matrix will be rectangular. the rank will be smaller column or row. In this case, the maximum rank will be n. If the matrix is non-zero, the minimum rank will be 1.
  2. What is the rank of matrix B? \[\mathbf{B} = \begin{bmatrix} 1 & 2 & 1 \\ 3 & 6 & 3 \\ 2 & 4 & 2 \\ \end{bmatrix} \]
B = matrix(c(1,2,1,3,6,3,2,4,2), 3,3, byrow = T)

# the rank of B:
dim(B)
## [1] 3 3

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. \[\mathbf{A} = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \\ \end{bmatrix} \]

Solution:

To get the eigenvalues, we have \[det(\begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \\ \end{bmatrix} - \begin{bmatrix} \lambda & 0 & 0 \\ 0 & \lambda & 0 \\ 0 & 0 & \lambda \\ \end{bmatrix}) = 0\]


so the equation becomes: \[det(\begin{bmatrix} 1-\lambda & 2 & 3 \\ 0 & 4-\lambda & 5 \\ 0 & 0 & 6-\lambda \end{bmatrix}) = 0 \]


which reduces to \[(1-\lambda)\begin{bmatrix} 4-\lambda & 5 \\ 0 & 6-\lambda \end{bmatrix} - 2\begin{bmatrix} 0 & 5 \\ 0 & 6-\lambda \end{bmatrix} + 3\begin{bmatrix} 0 & 4-\lambda \\ 0 & 0 \end{bmatrix} = 0 \]
which gives the characteristic polynomial as \((1-\lambda)[(4-\lambda)(6-\lambda)] = 0\)
It comes out three eigenvalues: \(\lambda_1 = 1\), \(\lambda_2 = 4\) and \(\lambda_3 = 6\). For each \(\lambda\) in the definition of eigenvalue, we get, \(Av-\lambda v = (A - \lambda I)v = 0\)

When \(\lambda = 1\) we have \[(\begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \\ \end{bmatrix} - \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}) \begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix} = 0\]

or \[\begin{bmatrix} 0 & 2 & 3 \\ 0 & 3 & 5 \\ 0 & 0 & 5 \end{bmatrix} \begin{bmatrix} v_1 \\v_2 \\ v_3 \end{bmatrix} = 0\]
According to the third row
\(5v_3 = 0 => \underline{v_3 = 0}\)
plug in \(v_3 = 0\) into second or the first row, we get \(0v_1 + 3v_2 + 5v_3 = 0 => \underline{v_2 = 0}\)
So, \(v = (0,0,0)\) is an eigenvector. Similarly, we’re going to plug \(\lambda_2\) in the definition of eigenvalue.

When \(\lambda = 4\), we get \[(\begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \\ \end{bmatrix} - \begin{bmatrix} 4 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 4 \end{bmatrix}) \begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix} = 0\]

which reduces to \[\begin{bmatrix} -3 & 2 & 3 \\ 0 & 0 & 5 \\ 0 & 0 & 2 \end{bmatrix} \begin{bmatrix} v_1 \\v_2 \\ v_3 \end{bmatrix} = 0\]

According to the second/third row, we get \(v_3 = 0\), therefore, in the first row, we have
\(-3v_1+2v_2 = 0\)
\(3v_1 = 2v_2\)
we can pick any value for \(v_1\) and \(v_2\) to make equation turn true. So I pick \(v_1 = \frac{1}{3}, v_2 = \frac{1}{2}\), so another eigenvector is \(v = (\frac{1}{3}, \frac{1}{2}, 0)\)

Last, when \(\lambda = 6\), we get \[(\begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \\ \end{bmatrix} - \begin{bmatrix} 6 & 0 & 0 \\ 0 & 6 & 0 \\ 0 & 0 & 6 \end{bmatrix}) \begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix} = 0\]

which reduces to \[\begin{bmatrix} -5 & 2 & 3 \\ 0 & -2 & 5 \\ 0 & 0 & 0 \end{bmatrix} \begin{bmatrix} v_1 \\v_2 \\ v_3 \end{bmatrix} = 0\]

we get \(v_3 = 0\) with the same reason above. Then according to the second row \(0v_1-2v_2+5v_3 = 0 => \underline{v_2 = 0}\), therefore, \(\underline{v_1 = 0}\), the eigenvector for this eigenvalue is the same as \(\lambda = 1\), which is \(v = (0,0,0)\). As a result, matrix A will have only 2 eigenvectors