Problem Set 1

# load libraries
library(Matrix)
## Warning: package 'Matrix' was built under R version 4.2.3

Q1. What is the rank of the matrix A?

matrix_A <- matrix(c(1,-2,0,5,2,0,1,4,3,1,-2,-2,4,3,1,-3), ncol=4)

matrix_A
##      [,1] [,2] [,3] [,4]
## [1,]    1    2    3    4
## [2,]   -2    0    1    3
## [3,]    0    1   -2    1
## [4,]    5    4   -2   -3
rankMatrix(matrix_A)[1]
## [1] 4

Q2. Given an mxn matrix m > n, what can be the maximum rank? The minimum rank, assuming that the matrix is non-zero?

Assuming that the matrix is non-zero, the determinant will be non-zero. The upper bound for the rank of a matrix will be the maximum rank. For the minimum rank, it will be the lowest value and will not be zero.

Q3, What is the rank of matrix B?

matrix_B <- matrix(c(1,3,2,2,6,4,1,3,2), ncol=3)

matrix_B
##      [,1] [,2] [,3]
## [1,]    1    2    1
## [2,]    3    6    3
## [3,]    2    4    2
rankMatrix(matrix_B)[1]
## [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

matrix_A2 <- matrix(c(1,0,0,2,4,0,3,5,6), ncol=3)

matrix_A2
##      [,1] [,2] [,3]
## [1,]    1    2    3
## [2,]    0    4    5
## [3,]    0    0    6

R Solution

eigen(matrix_A2)
## 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