###Problem Set 1

  1. What is the rank of the Matrix \(A\)?

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

Using the function Matrix::rankMatrix, we find that the rank of this matrix is 4. This indicates that all four rows of the Matrix \(A\) are linearly independent of one another.

A <- matrix(c(1, -1, 0, 5, 2, 0, 1, 4, 3, 1, -2, -2, 4, 3, 1, 3), nrow=4, ncol=4, byrow=FALSE)
rankA <- rankMatrix(A)
rankA[1]
## [1] 4
  1. Given an \(m \times n\) matrix where \(m > n\), what can be the maximum rank? the minimum rank, assuming that the matrix is nonzero?

Since the maximum rank of an \(m \times n\) matrix cannot be greater than \(min(m, n)\), in the case where \(m > n\) , the rank can be no greater than \(n\).

The minimum rank of a nonzero matrix is 1.

  1. What is the rank of the matrix \(B\)?

\[ B = \begin{vmatrix} 1 & 2 & 1 \\ 3 & 6 & 3 \\ 2 & 4 & 2 \end{vmatrix} \]

Using the function Matrix::rankMatrix, we find that the rank of this matrix is 1. We can verify this by noticing that rows 1 and 3 are both multiples of row 2. Row 1 goes into row 2 three times, while row 3 goes into row 2 one and one half times.

B <- matrix(c(1, 2, 1, 3, 6, 3, 2, 4, 2), nrow=3, ncol=3, byrow=TRUE)
rankB <- rankMatrix(B)
rankB[1]
## [1] 1

###Problem Set 2

Compute the eigenvalues and eigenvecotrs of the matrix \(A\):

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

We need to find the characteristic polynomial \(p_A(\lambda) = det(A - \lambda I)\).

\[A - \lambda I = \begin{vmatrix} 1 - \lambda & 2 & 3 \\ 0 & 4 - \lambda& 5 \\ 0 & 0 & 6 - \lambda \end{vmatrix}\]

\[p_A(\lambda) = det(A - \lambda I) = det\left(\begin{vmatrix} 1 - \lambda & 2 & 3 \\ 0 & 4 - \lambda& 5 \\ 0 & 0 & 6 - \lambda \end{vmatrix}\right) \]

Since column 1 has only 1 nonzero value equal to \(1 - \lambda\), we’ll expand along it to reduce the calculations necessary. This give us:

\[p_A(\lambda) = (1 - \lambda) \times det\left(\begin{vmatrix} 4 - \lambda& 5 \\ 0 & 6 - \lambda \end{vmatrix} \right) \]

Since we now have a \(2 \times 2\) matrix, its determinant is easy to find following the formula \(ad - bc\). What’s more, \(bc = 5(0) = 0\) in this case, so:

\[\begin{align}p_A(\lambda) &= (1 - \lambda)((4 - \lambda)(6 - \lambda)) \\ \\ &= (1 - \lambda)(\lambda^2 - 10\lambda + 24) \\ \\ &= -\lambda^3 + 10\lambda^2 - 24\lambda + \lambda^2 - 10\lambda +24 \\ \\ &= -\lambda^3 + 11\lambda^2 - 34\lambda + 24\end{align}\]

We will find the eigenvalues by setting this polynomial equal to zero and finding its roots. \[\begin{align} 0 &= -\lambda^3 + 11\lambda^2 - 34\lambda + 24 \\ \\ &= \lambda^3 - 11\lambda^2 + 34\lambda - 24 \end{align}\]

We know that 1 is a root because:

\[\begin{align} 1^3 - 11(1)^2 + 34(1) - 24 = 0 \end{align}\]

So, let’s factor out \(\lambda - 1\):

\[\begin{align} &= \lambda^3 - 11\lambda^2 + 34\lambda - 24 \\ \\ &= (\lambda - 1) (\lambda^2 + 10\lambda + 24) \\ \\ &= (\lambda - 1) (\lambda + 4) (\lambda + 6) \end{align}\]

So, -4 and -6 are also roots and therefore are also eigenvalues.

Now, to find the eigenvectors, we need to plug these values back into the equation for eigen, \((A - \lambda I) v = 0\).

Doing so for 1 and 4 yields only zero vectors - not very interesting. But when we plug in 6…

\[\left(\begin{vmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \end{vmatrix} - \begin{vmatrix} 6 & 0 & 0 \\ 0 & 6 & 0 \\ 0 & 0 & 6 \end{vmatrix} \right)\begin{vmatrix} v_1 \\ v_2 \\ v_3 \end{vmatrix}= 0\]

\[\left(\begin{vmatrix} -5 & 2 & 3 \\ 0 & -2 & 5 \\ 0 & 0 & 0 \end{vmatrix}\right)\begin{vmatrix} v_1 \\ v_2 \\ v_3 \end{vmatrix}= 0\]

\[\begin{align} -5 v_1 + 2 v_2 + 3 v_3 &= 0\\ -2 v_2 + 5 v_3 &= 0\\ \end{align}\]

Subtracting the second from the first row yields:

\[\begin{align} -5v_1 + 3 v_3 &= 0\\ \end{align}\]

or:

\[\begin{align} v_1 = \frac{3}{5} v_3 \\ \end{align}\]

So therefore, the only eigenvector beside \(\begin{vmatrix}0 \\ 0\\ 0\\\end{vmatrix}\) for this matrix is:

\(\begin{vmatrix} 1 \\ 0\\ \frac{5}{3}\\\end{vmatrix}\)