Problem set 1

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

library(matrixcalc)
library(pracma)
## Warning: package 'pracma' was built under R version 3.5.3
matrix_A <- matrix(data = c(1,2,3,4,-1,0,1,3,0,1,-2,1,5,4,-2,-3), nrow = 4, ncol = 4, byrow = TRUE)
matrix_A
##      [,1] [,2] [,3] [,4]
## [1,]    1    2    3    4
## [2,]   -1    0    1    3
## [3,]    0    1   -2    1
## [4,]    5    4   -2   -3
matrix.rank(matrix_A)
## [1] 4

The rank of the matrix A 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? Maximum rank = m (rows) Minimum rank = 1 (all other rows could be linearly dependent)

Ans:The maximum rank would be equal to n since the maximum rank is the lesser of either the number of rows or the number of columns. Since m>n, then n is the maximum rank. The minimum rank of any non-zero matrix is 1.

(3) What is the rank of matrix B?

matrix_B <- matrix(data = c(1,2,1,3,6,3,2,4,2), nrow = 3, ncol = 3, byrow = TRUE)
matrix_B
##      [,1] [,2] [,3]
## [1,]    1    2    1
## [2,]    3    6    3
## [3,]    2    4    2
matrix.rank(matrix_B)
## [1] 1

Problem set 2

Compute the eigenvalues and eigenvectors of the matrix A. You will need to show your work. You will need to write out the characteristic polynomial and show your solution.

matrix_a <- matrix(c(1,2,3,0,4,5,0,0,6), nrow=3, ncol=3, byrow=TRUE)
matrix_a
##      [,1] [,2] [,3]
## [1,]    1    2    3
## [2,]    0    4    5
## [3,]    0    0    6
eigen(matrix_a)$values
## [1] 6 4 1

eigenvalue should be 1, 4, 6

For ??=1:

rref(matrix_a - 1 * diag(3))
##      [,1] [,2] [,3]
## [1,]    0    1    0
## [2,]    0    0    1
## [3,]    0    0    0

Then v1=v1 and v2=0 and v3=0. The E??=1 = [1 0 0].

For ??=4:

rref(matrix_a - 4 * diag(3))
##      [,1]       [,2] [,3]
## [1,]    1 -0.6666667    0
## [2,]    0  0.0000000    1
## [3,]    0  0.0000000    0

Then v1-(2/3)v2 = 0 and v3=0. The E??=4 = [1 1.5 0].

For ??=6:

rref(matrix_a - 6 * diag(3))
##      [,1] [,2] [,3]
## [1,]    1    0 -1.6
## [2,]    0    1 -2.5
## [3,]    0    0  0.0

Then v1-(1.6)v3=0 and v2-(2.5)v3=0. The E??=6 = [1.6 2.5 1].