(A<-matrix(c(1,-1,0,5,
2,0,1,4,
3,1,-2,-2,
4,3,1,-2), nrow =4))
## [,1] [,2] [,3] [,4]
## [1,] 1 2 3 4
## [2,] -1 0 1 3
## [3,] 0 1 -2 1
## [4,] 5 4 -2 -2
qr(A)$rank
## [1] 4
The maximum rank of a matrix where m>n assuming non-zero matrix is n, the miminum rank will 1 as long as a matrix has at least 1 element
(B<-matrix(c(1,3,2,
2,6,4,
1,3,2),nrow = 3))
## [,1] [,2] [,3]
## [1,] 1 2 1
## [2,] 3 6 3
## [3,] 2 4 2
qr(B)$rank
## [1] 1
Compute the eigenvalues and eigenvectors of the matrix A. You’ll need to show your work.
\[A = \begin{bmatrix} 1 & 2 & 3\\ 0 & 4 & 5\\ 0 & 0 & 6\\ \end{bmatrix}\]
The rule of Sarros describes the characteristic equation for our given matrix as:
\[|A-\lambda I| = 0 = det \begin{bmatrix} 1-\lambda & 2 & 3\\ 0 & 4-\lambda & 5\\ 0 & 0 & 6-\lambda\\ \end{bmatrix}\]
meaning that our expected eigen values are 1, 4, and 6. We can compute the eigen vector as:
A<-matrix(c(1,0,0,
2,4,0,
3,5,6), nrow =3)
eigen(A)
## 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