1. Problem set 1

(1) What is the rank of the matrix A?

A <- matrix(c(1,-1,0,5,2,0,1,4,3,1,-2,-2,4,3,1,-3), nrow=4, ncol=4)
A_ut <- A

# Row operations to convert matrix into upper triangular form
A_ut[2,] <- A[2,] + A[1,]
A_ut[4,] <- A_ut[4,] - 5*A_ut[1,]
A_ut[3,] <- A_ut[3,] - A_ut[2,]/2
A_ut[4,] <- A_ut[4,] + 3*A_ut[2,]
A_ut[4,] <- A_ut[4,] + (-5/4)*A_ut[3,]

# Upper triangular form
A_ut
##      [,1] [,2] [,3]   [,4]
## [1,]    1    2    3  4.000
## [2,]    0    2    4  7.000
## [3,]    0    0   -4 -2.500
## [4,]    0    0    0  1.125

Solution: Since there are 4 non-zero rows, the rank of the matrix is 4.

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

Solution: The maximum rank can be the maximum number of linearly independent column vectors, therefore it can not exceed the number of rows in the matrix. The minimum rank can be one for non-zero matrices.

(3) What is the rank of matrix B?

B <- matrix(c(1,3,2,2,6,4,1,3,2), nrow=3, ncol=3)
B_ut <- B

# Row operations to convert matrix into upper triangular form
B_ut[2,] <- B[2,] - 3*B[1,]
B_ut[3,] <- B[3,] - 2*B[1,]

# Upper triangular form
B_ut
##      [,1] [,2] [,3]
## [1,]    1    2    1
## [2,]    0    0    0
## [3,]    0    0    0

Solution: Since there is 1 non-zero row, the rank of the matrix is 1.

2. 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}\)

\(I = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}\)

\(A - \lambda I = \begin{bmatrix} 1 - \lambda & 2 & 3 \\ 0 & 4 - \lambda & 5 \\ 0 & 0 & 6 - \lambda \end{bmatrix}\)

Calculate the determinant using the formula: |A| = a(ei − fh) − b(di − fg) + c(dh − eg)

\((1 - \lambda)((4 - \lambda)(6 - \lambda) - 5 \cdot 0) - 2 (0 \cdot (6 - \lambda) - 5 \cdot 0) + 3 (0 \cdot 0) - ((4 - \lambda) \cdot 0)\)

Simplifying…

\((1 - \lambda)((4 - \lambda)(6 - \lambda) - 0) - 0 + 0\)

\((1 - \lambda)((4 - \lambda)(6 - \lambda))\)

\((1 - \lambda)(24 - 4\lambda - 6\lambda + \lambda^2)\)

\((1 - \lambda)(24 - 10\lambda + \lambda^2)\)

\(-24\lambda + 10\lambda^2 - \lambda^3 + 24 - 10\lambda + \lambda^2\)

\(-34\lambda + 11\lambda^2 - \lambda^3 + 24\)

The characteristic polynomial is:

\(- \lambda^3 + 11\lambda^2 -34\lambda + 24\)

And due to our previous form: \((1 - \lambda)((4 - \lambda)(6 - \lambda) - 0) - 0 + 0\)

Solution: We know the eigenvalues are: \(\lambda = 1, \lambda = 4, \lambda = 6\)

# Create matrix A
A <- matrix(c(1,2,3,0,4,5,0,0,6), nrow=3, ncol=3, byrow=TRUE)
A
##      [,1] [,2] [,3]
## [1,]    1    2    3
## [2,]    0    4    5
## [3,]    0    0    6
# Create identity matrix
I <- diag(3)
I
##      [,1] [,2] [,3]
## [1,]    1    0    0
## [2,]    0    1    0
## [3,]    0    0    1
# Eigenvectors for λ = 1
eigenvec_1 <- A - 1 * I
eigenvec_1
##      [,1] [,2] [,3]
## [1,]    0    2    3
## [2,]    0    3    5
## [3,]    0    0    5
# Row operations to convert matrix into reduced row echelon form 
eigenvec_1[3,] <- (1/5)*eigenvec_1[3,]
eigenvec_1[2,] <- eigenvec_1[2,] - 5*eigenvec_1[3,]
eigenvec_1[1,] <- eigenvec_1[1,] - 3*eigenvec_1[3,]
eigenvec_1[2,] <- (1/3)*eigenvec_1[2,]
eigenvec_1[1,] <- eigenvec_1[1,] - 2*eigenvec_1[2,]

eigenvec_1
##      [,1] [,2] [,3]
## [1,]    0    0    0
## [2,]    0    1    0
## [3,]    0    0    1

Solution: \(y = 0, z = 0\) Therefore, an eigenvector for \(\lambda = 1\) is \({(1,0,0)}\)

# Eigenvectors for λ = 4
eigenvec_4 <- A - 4 * I
eigenvec_4
##      [,1] [,2] [,3]
## [1,]   -3    2    3
## [2,]    0    0    5
## [3,]    0    0    2
# Row operations to convert matrix into reduced row echelon form 
eigenvec_4[3,] <- 0.5*eigenvec_4[3,]
eigenvec_4[2,] <- eigenvec_4[2,] - 5*eigenvec_4[3,]
eigenvec_4[1,] <- eigenvec_4[1,] - 3*eigenvec_4[3,]
eigenvec_4[1,] <- (-1/3)*eigenvec_4[1,]

eigenvec_4
##      [,1]       [,2] [,3]
## [1,]    1 -0.6666667    0
## [2,]    0  0.0000000    0
## [3,]    0  0.0000000    1

Solution: \(x = 2/3y, z = 0\) Therefore, an eigenvector for \(\lambda = 4\) is \({(2,3,0)}\)

# Eigenvectors for λ = 6
eigenvec_6 <- A - 6 * I
eigenvec_6
##      [,1] [,2] [,3]
## [1,]   -5    2    3
## [2,]    0   -2    5
## [3,]    0    0    0
eigenvec_6[2,] <- - 0.5*eigenvec_6[2,]
eigenvec_6[1,] <- eigenvec_6[1,] - 2*eigenvec_6[2,]
eigenvec_6[1,] <- (-1/5)*eigenvec_6[1,]

eigenvec_6
##      [,1] [,2] [,3]
## [1,]    1    0 -1.6
## [2,]    0    1 -2.5
## [3,]    0    0  0.0

Solution: \(x = 1.6z, y = 2.5z\) Therefore, an eigenvector for \(\lambda = 4\) (making \(z = 10\) to result in integers) is \({(16,25,10)}\)

References

Beezer, Subsection RNM Rank and Nullity of a Matrix, A First Course in Linear Algebra, page 325

Beezer, Subsection ECEE Examples of Computing Eigenvalues and Eigenvectors, A First Course in Linear Algebra, page 379

Matrix Rank

Find the characteristic polynomial of a matrix

Determinant of a Matrix

Can You Add a Multiple of a Matrix Row to itself?