What is the rank of the matrix A?
[1 2 3 4]
[-1 0 1 3]
A=
[0 1 -2 1]
[5 4 -2 -3]
To solve this problem, I inserted matrix A into R and used the rankMatrix() function
#what is the rank of matrix A?
library(Matrix)
A=matrix(c(1,2,3,4,-1,0,1,3),nrow=4,ncol=4)
rank_A=rankMatrix(A)
rank_A
## [1] 2
## attr(,"method")
## [1] "tolNorm2"
## attr(,"useGrad")
## [1] FALSE
## attr(,"tol")
## [1] 8.881784e-16
The rank of matrix A is 2
The maximum rank of a mxn matrix is n because rank is defined by the dimensions of column and row space. It cannot be more than n. The minimum rank of a non-zero matrix is 1 because it will at least have 1 row.
What is the rank of matrix B?
[1 2 1]
B= [3 6 3 ]
[2 4 2]
To solve this problem, I inserted matrix B into R and again used the rankMatrix() function.
B=matrix(c(1,2,1,3,6,3,2,4,2),ncol=3, nrow=3)
rank_B=rankMatrix(B)
rank_B
## [1] 1
## attr(,"method")
## [1] "tolNorm2"
## attr(,"useGrad")
## [1] FALSE
## attr(,"tol")
## [1] 6.661338e-16
The rank of matrix B is 1.
Compute the convectors and eigenvalues of the given matrix.
For this question, I did the computation manually. Below is my work:
I will check my work with R below:
D=matrix(c(1,2,3,0,4,5,0,0,6), nrow=3, ncol=3)
eigen(D)
## eigen() decomposition
## $values
## [1] 6 4 1
##
## $vectors
## [,1] [,2] [,3]
## [1,] 0 0.0000000 0.83077316
## [2,] 0 0.3713907 -0.55384878
## [3,] 1 -0.9284767 0.05538488
My eigenvalues and eigenvectors match.