R Markdown

Problem set 1

What is the rank of the matrix A?

library(pracma)


A <-matrix(c(1,-1,0,5,2,0,1,4,3,1,-2,-2,4,3,1,-3),nrow = 4,ncol = 4)
 
rref(A)
##      [,1] [,2] [,3] [,4]
## [1,]    1    0    0    0
## [2,]    0    1    0    0
## [3,]    0    0    1    0
## [4,]    0    0    0    1
Rank(A)
## [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?

The max rank cannot be > than ‘n’. The min rank in this case (non-zero) is 1.

What is the rank of matrix B?

B <- matrix(c(1,3,2,2,6,4,1,3,2),nrow = 3, ncol= 3)

B
##      [,1] [,2] [,3]
## [1,]    1    2    1
## [2,]    3    6    3
## [3,]    2    4    2
Rank(B)
## [1] 1

Problem set 2

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

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

A caption