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)
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
print("Rank of matrix A")
## [1] "Rank of matrix A"
qr(A)$rank
## [1] 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 possible rank is n. Minimum possible rank is 1.
3. What is the rank of the matrix B?
B=matrix(c(1,3,2,2,6,4,1,3,2), nrow = 3)
B
## [,1] [,2] [,3]
## [1,] 1 2 1
## [2,] 3 6 3
## [3,] 2 4 2
print("Rank of matrix B")
## [1] "Rank of matrix B"
qr(B)$rank
## [1] 1
4. 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.
As per https://www.youtube.com/watch?v=IdsV0RaC9jM