Assignment 3

1. PROBLEM SET 1

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. One of the ways to find the rank of the matrix is by Echelon form. By elementary row operations, bring the matrix into the echelon form. The number of non-zero rows in the echelon form is the rank of the given matrix.

Using R function rref() to produce reduced row echelon form using Gauss Jordan elimination with partial pivoting.

library(pracma)

rref_A <- rref(A)
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

The reduced row has 4 pivot columns, so the rank of A is 4.

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

Let’s create a 4x3 matrix for solve the question.

mnMatrix <- matrix(c(1,-1,0,5, 2,0,1,4, 3,1,-2,-2), nrow=4, ncol=3)
mnMatrix
##      [,1] [,2] [,3]
## [1,]    1    2    3
## [2,]   -1    0    1
## [3,]    0    1   -2
## [4,]    5    4   -2

One of the properties of rank is that equals the smallest independent dimension (row or column). As m>n for the matrix, to find the rank we have to transpose the matrix to make m<n. 

# Transposing the matrix
mnMatrix_T <- t(mnMatrix)
mnMatrix_T
##      [,1] [,2] [,3] [,4]
## [1,]    1   -1    0    5
## [2,]    2    0    1    4
## [3,]    3    1   -2   -2

Reduced row echelon form for mnMatrix_T

rref_mn <- rref(mnMatrix_T)
rref_mn
##      [,1] [,2] [,3]   [,4]
## [1,]    1    0    0  1.375
## [2,]    0    1    0 -3.625
## [3,]    0    0    1  1.250

As there are 3 pivot columns, the maximum rank is 3.

1.3) What is the rank of the matrix B?

\[ B = \begin{bmatrix} 1 & 2 & 1 \\ 3 & 6 & 3 \\ 2 & 4 & 2 \end{bmatrix} \] Reduced row echelon form for mnMatrix_T

rref_B <- rref(B)
rref_B
##      [,1] [,2] [,3]
## [1,]    1    2    1
## [2,]    0    0    0
## [3,]    0    0    0

There is only one pivot column, 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 characteristics polynomial and show your solution.

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

Solution attachment seperate in pdf format