(1) What is the rank of the matrix A?

\[ A = \begin{bmatrix}1 & 2 & 3 & 4 \\ -1 & 0 & 1 & 3 \\0 & 1 & -2 & 1 \\5 & 4 & -2 & -3\end{bmatrix}\]

library(pracma)
## Warning: package 'pracma' was built under R version 3.4.3
A <- matrix(c(1,2,3,4,-1,0,1,3,0,1,-2,1,5,4,-2,-3),nrow = 4,byrow = TRUE)
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
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

We see 4 pvot rows when reduced to row echolen form using rref() checking with Rank() function

Both gives result 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?

Answer :- Maximum rank = m rows Minimum rank >= 1

(3) What is the rank of matrix B?

\[ A = \begin{bmatrix}1 & 2 & 1 \\ 3 & 6 & 3 \\ 2 & 4 & 2\end{bmatrix}\]

B <- matrix(c(1,2,1,3,6,3,2,4,2),nrow = 3,byrow = TRUE)
B
##      [,1] [,2] [,3]
## [1,]    1    2    1
## [2,]    3    6    3
## [3,]    2    4    2
rref(B)
##      [,1] [,2] [,3]
## [1,]    1    2    1
## [2,]    0    0    0
## [3,]    0    0    0
Rank(B)
## [1] 1

Ranks is 1

(4) Compute the eigenvalues and eigenvectors of the matrix A. You’ll need to write out the characteristic polynomial and show your solution.

\[ A = \begin{bmatrix}1 & 2 & 3 \\0 & 4 & 5 \\0 & 0 & 6 \end{bmatrix}\] \[ \lambda\,I_3 = \begin{bmatrix}\lambda & 0 & 0 \\0 & \lambda & 0 \\0 & 0 & \lambda \end{bmatrix}\] \[ det(A-\lambda\,I_n)=0\] \[ det\,\begin{bmatrix}1-\lambda & 2 & 3 \\0 & 4-\lambda & 5 \\0 & 0 & 6-\lambda \end{bmatrix} = 0\] \[(1-\lambda)(4-\lambda)(6-\lambda)=0\] \[ Eigenvalues\,of\,A:\] \[\lambda=1,\, \lambda=4,\, \lambda=6\]

Calculating Eigenvectors using R

For λ1=1

A <- matrix(c(1,2,3,0,4,5,0,0,6), nrow=3, byrow=TRUE)
I <- diag(3)
Eigen1 <- A - (1*I)
rref(Eigen1)
##      [,1] [,2] [,3]
## [1,]    0    1    0
## [2,]    0    0    1
## [3,]    0    0    0

So from the above reduced form we see x3 = x2 = 0 and x1 is free So eigenspace = \[E_{=1}=\begin{bmatrix}1 \\ 0 \\ 0\end{bmatrix}\]

For λ2=4

A <- matrix(c(1,2,3,0,4,5,0,0,6), nrow=3, byrow=TRUE)
I <- diag(3)
Eigen2 <- A - (4*I)
rref(Eigen2)
##      [,1]       [,2] [,3]
## [1,]    1 -0.6666667    0
## [2,]    0  0.0000000    1
## [3,]    0  0.0000000    0

Here we see x3 = 0 , x1 - 0.66(x2)= 0 so x2 = 1.5 (x1) Hence eigenspace = \[E_{=4}=\begin{bmatrix}1 \\ 1.5 \\ 0\end{bmatrix}\]

For λ=6

A <- matrix(c(1,2,3,0,4,5,0,0,6), nrow=3, byrow=TRUE)
I <- diag(3)
Eigen3 <- A - (6*I)
rref(Eigen3)
##      [,1] [,2] [,3]
## [1,]    1    0 -1.6
## [2,]    0    1 -2.5
## [3,]    0    0  0.0

x2 - (2.5)x3 = 0 , x2 = 2.5(x3) X1 - (1.6)x3 = 0 , x1 = (1.6)x3

Hence eigenspace = \[E_{=4}=\begin{bmatrix}1.6 \\ 2.5 \\ 1\end{bmatrix}\]

```