Problem Set 1

  1. What is the rank of the matrix A?

\[A = \begin{bmatrix} 1 & 2 & 3 & 4\\ -1 & 0 & 1 & 3\\ 0 & 1 & -2 & 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 = TRUE)
qr(A)$rank
## [1] 4
  1. Given an \(mxn\) matrix where \(m > n\), what can be the maximum rank? The minimum rank, assuming that the matrix is non-zero?
    If n is less than m, then the maximum rank of the matrix is n. And if the matrix has at least one non-zero element, its minimum rank will be one.

  2. What is the rank of matrix B?

\[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 = TRUE)
qr(B)$rank
## [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.

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

Characteristic Polynomial is

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

\[=(1-\lambda)det(\begin{bmatrix} 4 - \lambda & 5\\ 0 & 6 - \lambda \end{bmatrix}) - (0)det(\begin{bmatrix} 2 & 3\\ 0 & 6 - \lambda \end{bmatrix}) + (0)det(\begin{bmatrix} 2 & 3\\ 4 - \lambda & 5\end{bmatrix})\]

\[=(1-\lambda)(4-\lambda)(6-\lambda)=0\]Eigenvalues are

\[\lambda_{1}=1, \lambda_{2}=4, \lambda_{3}=6\]

Eigenvector corresponding to \(\lambda_{1}\) \[(\begin{bmatrix} 0 & 2 & 3\\ 0 & 3 & 5\\ 0 & 0 & 5 \end{bmatrix}) \begin{bmatrix} v_{1} \\ v_{2} \\ v_{3} \end{bmatrix} = 0\]

Assume \(v_{1}=1\) \[v_{1} = 1\] \[3v_{2}+5v_{3} = 0 \\ \therefore v_{2} = 0\]

\[5v_{3} = 0 \\ \therefore v_{3} =0 \] \[\lambda_{1} =1=(1, 0,0) \]Eigenvector corresponding to \(\lambda_{2}\) \[(\begin{bmatrix} -3 & 2 & 3\\ 0 & 0 & 5\\ 0 & 0 & 2 \end{bmatrix}) \begin{bmatrix} v_{1} \\ v_{2} \\ v_{3} \end{bmatrix} = 0\]

\[-3v_{1}+2v_{2}+3v_{3}=0 \\ \therefore v_{3}=0\] Assume \(v_{2}=1\) \[v_{2}=1 \\-3v_{1}+2v_{2}=0 \\ \therefore v_{1}=\frac{2}{3} \\\lambda_{2} = 4 =(\frac{2}{3}, 1,0)\]

Eigenvector corresponding to \(\lambda_{3}\) \[(\begin{bmatrix} -5 & 2 & 3\\ 0 & -2 & 5\\ 0 & 0 & 0 \end{bmatrix}) \begin{bmatrix} v_{1} \\ v_{2} \\ v_{3} \end{bmatrix} = 0\]

\[-5v_{1}+2v_{2}+3v_{3}=0 \\ -2v_{2}+5v_{3}=0\] Assume \(v_{3}=1\) \[v_{3} =1 \\ \therefore v_{2}=\frac{5}{2} \\ \therefore v_{1} = \frac{8}{5}\] \[\lambda_{3} = 6 =(\frac{8}{5},\frac{5}{2}, 1)\]

A <- matrix(c(1, 2, 3, 0, 4, 5, 0, 0, 6), 3, 3, byrow = TRUE)

#Verifying the eigenvalues and eigenvectors
eigen(A)$values
## [1] 6 4 1
eigen(A)$vectors
##           [,1]      [,2] [,3]
## [1,] 0.5108407 0.5547002    1
## [2,] 0.7981886 0.8320503    0
## [3,] 0.3192754 0.0000000    0