library("pracma")

Problem Set 1

1 What is the rank of the matrix A?

problem set 1.1

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
Rank(a)
## [1] 4

(2) Given an mxn matrix where m > n, what can be the maximum rank? The mini- mum rank, assuming that the matrix is non-zero?

Ans: Assuming the matrix is non-zero, the maximum rank = n and minimum rank is 1

(3) What is the rank of matrix B?

section 1.3

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
Rank(b)
## [1] 1

Section 2

image1

image2

image3

image4

Checking in R

A = matrix(c(1,2,3,0,4,5,0,0,6), nrow = 3)

charpoly(A)
## [1]   1 -11  34 -24
eigen(A)$value
## [1] 6 4 1
eigen(A)$vector
##      [,1]       [,2]        [,3]
## [1,]    0  0.0000000  0.83077316
## [2,]    0  0.3713907 -0.55384878
## [3,]    1 -0.9284767  0.05538488