1. Problem set 1

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} \]

The rank of the matrix refers to the number of linearly independent rows or columns in the matrix. ρ(A) is used to denote the rank of matrix A.

Properties of the Rank of the Matrix:

  1. Rank linear algebra refers to finding column rank or row rank collectively known as the rank of the matrix.

  2. Zero matrices have no non-zero row. Hence it has an independent row (or column). So, the rank of the zero matrices is zero.

  3. When the rank equals the smallest dimension it is called the full rank matrix.

Matrix A.

library(Matrix)
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

Use rankMatrix() fundction to obtain the rank matrix.

rankA<-rankMatrix(A)
rankA[1]
## [1] 4

The rank matrix for A is 4.

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

For the Linearly independent columns, the maximum rank is the number of the columns, and since the matix is non-zero matrix, the minumum rank should be 1.

3) What is the rank of matrix B?

\[B= \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
rankB<-rankMatrix(B)
rankB[1]
## [1] 1

According to the rankMatrix() function, The rank of matrix B is 1.

2. 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= \begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \\ \end{bmatrix} \]

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

Eigen value and Eigen vectors with eigen() function.

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

With R computation, I got the eigen values and eigen vectors. Let me see how is this work in mathmatic term.

\[ \begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \\ \end{bmatrix} - \begin{bmatrix} \lambda & 0 & 0 \\ 0 & \lambda & 0 \\ 0 & 0 & \lambda \\ \end{bmatrix} =0 \] \[ \begin{bmatrix} 1-\lambda & 0 & 3 \\ 0 & 4-\lambda & 0 \\ 0 & 0 & 6-\lambda \\ \end{bmatrix} =0 \] \[(1-\lambda)(4-\lambda)(6-\lambda)=0\]

\[1-\lambda = 0\]

\[\lambda1 = 1\]

\[4-\lambda = 0\] \[\lambda2 = 4\]

\[6-\lambda = 0\] \[\lambda3 = 6\]

when \[\lambda = 6, \begin{bmatrix} -5 & 2 & 3 \\ 0 & -2 & 5 \\ 0 & 0 & 0 \\ \end{bmatrix} =0 \]

when \[\lambda = 1, \begin{bmatrix} 0 & 2 & 3 \\ 0 & 3 & 5 \\ 0 & 0 & 5 \\ \end{bmatrix} =0 \]

when \[\lambda = 4, \begin{bmatrix} -3 & 2 & 3 \\ 0 & 8 & 5 \\ 0 & 0 & 10 \\ \end{bmatrix} =0 \] lambda = 6 vector = (1, 1.6, 2.5)

1.6/sqrt(1.6^2+2.5^2+1^2)
## [1] 0.5108407
2.5/sqrt(1.6^2+2.5^2+1^2)
## [1] 0.7981886
1/sqrt(1.6^2+2.5^2+1^2)
## [1] 0.3192754

lambda = 1 vector = (0, 0, 1)

1/sqrt(0^2+0^2+1^2)
## [1] 1
0/sqrt(0^2+0^2+1^2)
## [1] 0
0/sqrt(0^2+0^2+1^2)
## [1] 0

lambda = 4 vector = (0, 1.5, 1)

1/sqrt(1^2 +1.5^2+0^2)
## [1] 0.5547002
1.5/sqrt(1^2 +1.5^2 + 0^2)
## [1] 0.8320503
0/sqrt(1^2 +1.5^2 + 0^2)
## [1] 0

It looks the the two methods give the same answers.