QUESTION 1.1:

A1 <- matrix(c(1,2,3,4,-1,0,1,3,0,1,-2,1,5,4,-2,-3), nrow = 4, byrow = T)

A1
##      [,1] [,2] [,3] [,4]
## [1,]    1    2    3    4
## [2,]   -1    0    1    3
## [3,]    0    1   -2    1
## [4,]    5    4   -2   -3
dim(A1)
## [1] 4 4

Solution: From the above matrix, its known that its dimension is 4x4(a square matrix), therefore it rank is 4

QUESTION 1.2:

Solution:

Since the rank is the number of all non-zero row, the rank has to be no greater than the smaller of the row or column dimension is n.

QUESTION 1.3

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

B
##      [,1] [,2] [,3]
## [1,]    1    2    1
## [2,]    3    6    3
## [3,]    2    4    2
dim(B)
## [1] 3 3
R1 <- B[1, ]
R2 <- B[2, ]
R3 <- B[3, ]

a <- R1-(1/3)%*%R2
b <- R3-(2/3)%*%R2


Mat <- matrix(c(a,b,R2), nrow = 3, byrow = T)

Mat
##      [,1] [,2] [,3]
## [1,]    0    0    0
## [2,]    0    0    0
## [3,]    3    6    3

Solution:

Since the rank is the number of all non-zero row, therefore the rank is 1.

QUESTION 2:Compute the eigenvalues and eigenvectors of the matrix A.

A <- matrix(c(1,2,3,0,4,5,0,0,6), nrow = 3, byrow = T)

A
##      [,1] [,2] [,3]
## [1,]    1    2    3
## [2,]    0    4    5
## [3,]    0    0    6
I <- matrix(c("x" ,0,0,0,"x" ,0,0,0,"x" ), nrow = 3, byrow = T)

I
##      [,1] [,2] [,3]
## [1,] "x"  "0"  "0" 
## [2,] "0"  "x"  "0" 
## [3,] "0"  "0"  "x"

\(det\left( \left[ \begin{matrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \end{matrix} \right] \quad -\quad \left[ \begin{matrix} \lambda & 0 & 0 \\ 0 & \lambda & 0 \\ 0 & 0 & \lambda \end{matrix} \right] \right) \quad =\quad det\left( \left[ \begin{matrix} 1-\lambda & 2 & 3 \\ 0 & 4-\lambda & 0 \\ 0 & 0 & 6-\lambda \end{matrix} \right] \right)\)

\(=\quad (1-\lambda )\left[ (4-\lambda )(6-\lambda )\quad -(0*0) \right] \quad -\quad (2)\left[ (0)(6-\lambda )-(0*0 \right] \quad +\quad (3)\left[ (0*0)-(0*4-\lambda ) \right]\)

\(=\quad (1-\lambda )\left[ (4-\lambda )(6-\lambda ) \right] \quad =\quad 0\)

Their respective Eigenvalues are:

For \(\lambda_1\) = 1, its eigenvectors are \(\left[\begin{matrix} 1.0000 \\ 0.0000 \\ 0.0000 \end{matrix} \right]\)

For \(\lambda_2\) = 4, its eigenvestors are \(\left[\begin{matrix} 1.6000 \\ 2.5000 \\ 1.0000 \end{matrix} \right]\)

For \(\lambda_3\) = 6, its eigenvectors are \(\left[\begin{matrix} 0.6667 \\ 1.0000 \\ 0.0000 \end{matrix} \right]\)

OR

eigen(A, only.values = FALSE, EISPACK = TRUE)
## $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