DATA605: Assignment 3

Bonnie Cooper

Eigenvalues / Eigenvectors

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}\]

The rank is 4, because there are no redundant rows. this can be varified:

## [1] 4
## attr(,"method")
## [1] "tolNorm2"
## attr(,"useGrad")
## [1] FALSE
## attr(,"tol")
## [1] 8.881784e-16
  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 A is an mxn matrix: \[rank( A_{mxn} ) \leq min( m,n )\] Therefore, if m > n, it follows that the max rank of A is n

The minimum rank of a non-zero matrix A is 1

  1. What is the rank of matrix B?

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

The rank of B is 1 which can be shown using row reduction:

\[\begin{equation*} B = \begin{bmatrix} 1 & 2 & 1 \\ 3 & 6 & 3 \\ 2 & 4 & 2 \end{bmatrix} \dashrightarrow (R_3 = R_3 - 2*R_1) \dashrightarrow \begin{bmatrix} 1 & 2 & 1 \\ 3 & 6 & 3 \\ 0 & 0 & 0 \end{bmatrix} \dashrightarrow (R_2 = R_2 - 3*R_1) \dashrightarrow \begin{bmatrix} 1 & 2 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix} \end{equation*}\]

This can also be varified with r:

## [1] 1
## attr(,"method")
## [1] "tolNorm2"
## attr(,"useGrad")
## [1] FALSE
## attr(,"tol")
## [1] 6.661338e-16

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} \]

We use the following equations to find the eigenvalues: \[ det(A - \lambda I) = 0 \]

\[ det \begin{pmatrix} 1-\lambda & 2 & 3 \\ 0 & 4-\lambda & 5 \\ 0 & 0 & 6-\lambda \end{pmatrix} = 0 \] Exanding the determinant we get:

\[(1-\lambda )(4-\lambda )(6-\lambda ) + (2)(5)(0) + (3)(0)(0) - (2)(0)(6-\lambda ) - (1-\lambda )(5)(0) - (3)(4-\lambda )(0) = 0\] Removing the terms with 0 simplifies the result to

\[(1-\lambda )(4-\lambda )(6-\lambda ) = 0\] To satisfy this equation, we find the 3 eigenvalues to be:

  1. \(\lambda = 1\)
  2. \(\lambda = 4\)
  3. \(\lambda = 6\)

Now to find the eigenvectors for each eigenvalue by solving \(N( A-\lambda_i I)\)

  1. \(\lambda = 1\)

\[ \left[ \begin{array}{ccc|c} 1-1 & 2 & 3 & 0 \\ 0 & 4-1 & 5 & 0 \\ 0 & 0 & 6-1 & 0 \\ \end{array} \right] \longrightarrow \left[ \begin{array}{ccc|c} 0 & 2 & 3 & 0 \\ 0 & 3 & 5 & 0 \\ 0 & 0 & 5 & 0 \\ \end{array} \right] \]

Now to solve with gaussian elimination \[ \left[ \begin{array}{ccc|c} 0 & 2 & 3 & 0 \\ 0 & 3 & 5 & 0 \\ 0 & 0 & 5 & 0 \\ \end{array} \right] \rightarrow (R_1/2) \rightarrow \left[ \begin{array}{ccc|c} 0 & 1 & \frac{3}{2} & 0 \\ 0 & 3 & 5 & 0 \\ 0 & 0 & 5 & 0 \\ \end{array} \right] \rightarrow ((R_2-3)/\frac{1}{2}) \rightarrow \left[ \begin{array}{ccc|c} 0 & 1 & \frac{3}{2} & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 5 & 0 \\ \end{array} \right] \rightarrow (R_3-5*R_2) \rightarrow \left[ \begin{array}{ccc|c} 0 & 1 & \frac{3}{2} & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 \\ \end{array} \right] \] This gives up Var2 = 0 (row 1 equation), Var3 = 0 (row 2 equation) and Var1 = Var1 so the first eigenvector = \[v_1 = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}\]

  1. \(\lambda = 4\)

\[ \left[ \begin{array}{ccc|c} 1-4 & 2 & 3 & 0 \\ 0 & 4-4 & 5 & 0 \\ 0 & 0 & 6-4 & 0 \\ \end{array} \right] \longrightarrow \left[ \begin{array}{ccc|c} -3 & 2 & 3 & 0 \\ 0 & 0 & 5 & 0 \\ 0 & 0 & 2 & 0 \\ \end{array} \right] \]

Now to solve with gaussian elimination \[ \left[ \begin{array}{ccc|c} -3 & 2 & 3 & 0 \\ 0 & 0 & 5 & 0 \\ 0 & 0 & 2 & 0 \\ \end{array} \right] \rightarrow (R_1/-3) \rightarrow \left[ \begin{array}{ccc|c} 1 & \frac{-2}{3} & -1 & 0 \\ 0 & 0 & 5 & 0 \\ 0 & 0 & 2 & 0 \\ \end{array} \right] \rightarrow (R_2/5) \rightarrow \left[ \begin{array}{ccc|c} 1 & \frac{-2}{3} & -1 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 2 & 0 \\ \end{array} \right] \rightarrow (R_3-2*R_2) \rightarrow \left[ \begin{array}{ccc|c} 1 & \frac{-2}{3} & -1 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 \\ \end{array} \right] \rightarrow (R_1+*R_2) \rightarrow \left[ \begin{array}{ccc|c} 1 & \frac{-2}{3} & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 \\ \end{array} \right] \]

This gives up Var3 = 0 (row 2 equation), Var1 - 2/3*Var2 = 0 (row1 equation), so Var1 = 2/3Var2 so the first eigenvector = \[v_2 = \begin{bmatrix} \frac{2}{3} \\ 1 \\ 0 \end{bmatrix}\]

  1. \(\lambda = 6\)

\[ \left[ \begin{array}{ccc|c} 1-6 & 2 & 3 & 0 \\ 0 & 4-6 & 5 & 0 \\ 0 & 0 & 6-6 & 0 \\ \end{array} \right] \longrightarrow \left[ \begin{array}{ccc|c} -5 & 2 & 3 & 0 \\ 0 & -2 & 5 & 0 \\ 0 & 0 & 0 & 0 \\ \end{array} \right] \]

Now to solve with gaussian elimination \[ \left[ \begin{array}{ccc|c} -5 & 2 & 3 & 0 \\ 0 & -1 & 5 & 0 \\ 0 & 0 & 0 & 0 \\ \end{array} \right] \rightarrow (R_1/-5) \rightarrow \left[ \begin{array}{ccc|c} 1 & \frac{-2}{5} & \frac{-3}{5} & 0 \\ 0 & -2 & 5 & 0 \\ 0 & 0 & 0 & 0 \\ \end{array} \right] \rightarrow (R_2/-2) \rightarrow \left[ \begin{array}{ccc|c} 1 & \frac{-2}{5} & \frac{-3}{5} & 0 \\ 0 & 1 & \frac{-5}{2} & 0 \\ 0 & 0 & 0 & 0 \\ \end{array} \right] \rightarrow (R_1-\frac{-2}{5} *R_2) \rightarrow \left[ \begin{array}{ccc|c} 1 & 0 & \frac{-8}{5} & 0 \\ 0 & 1 & \frac{-5}{2} & 0 \\ 0 & 0 & 0 & 0 \\ \end{array} \right] \]

This gives up two equations: Var1 - 8/5Var3 = 0 -> Var1 = 8/5Var3 Var2 - 5/2Var3 = 0 -> Var2 = 5/2Var3

so the first eigenvector = \[v_3 = \begin{bmatrix} \frac{8}{5} \\ \frac{5}{2} \\ 1 \end{bmatrix}\]

This can be verified with r eigen():

## eigen() decomposition
## $values
## [1] 6 4 1
## 
## $vectors
##           [,1]      [,2] [,3]
## [1,] 0.5108407 0.5547002    1
## [2,] 0.7981886 0.8320503    0
## [3,] 0.3192754 0.0000000    0