##(1) What is the rank of the matrix A? A = 1 2 3 4 −1 0 1 3 0 1 −2 1 5 4 −2 −3

A: (1)The set of pivot columns of any reduced row echelon form matrix is known as Rank.

#Create a matrix
A = matrix(c(1,-1,0,5, 2,0,1,4, 3,1,-2,-2, 4,3,1,-3),ncol = 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
#Calculate Rank
RA <- qr(A)
RA$rank
## [1] 4

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

# Answer. The Matrix can have a maximum rank of 3 and mininum rank of 1

What is the rank of matrix B?

M <- matrix(c(1, 3, 2, 2, 6, 4, 1, 3, 2), nrow=3, ncol=3)
det(M)
## [1] 0
# the determinant of the Matrix is 0 and all the determinant of sub matrix of this matrix is also zero , the Rank is 1

2.Compute the eigenvalues and eigenvectors of the matrix A

A <- matrix(c(1, 0, 0, 2, 4, 0, 3, 5, 6), nrow=3, ncol=3)
ev <- eigen(A)
ev
## 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

Demonstration:

A= |1 2 3 4 −1 0 1 3 0 1 −2 1 5 4 −2 −3⎥

Ax=λx

|A−λI|x=0

A= |1-λ 2 3 0 4-λ 5 0 0 6-λ |

(1−λ)(4−λ)(6−λ)=0

Eigenvalue = [1 4 6]