1.Problemset 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} \]
library(pracma)
## Warning: package 'pracma' was built under R version 4.3.2
A <- matrix(c(1,-1,0,5,2,0,1,4,3,1,-2,-2,4,3,1,-3),4,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

Ans. The rank of the matrix A is 4.

  1. Given an m x n matrix where m > n, what can be the maximum rank ? The minimum rank, assuming that the matrix is non-zero ?

Ans. Assuming the matrix is non-zero, the maximum rank would be the minimum(m x b) which will equal to n and the minimum rank would be 1.

  1. What is the rank of matrix B ? \[ B = \begin{bmatrix} 1 & 2 & 1 \\ 3 & 6 & 3 \\ 2 & 4 & 2 \\ \end{bmatrix} \]

Ans. Matrix B can also be written as \(B = [ \vec{b_1} \vec{b_2} \vec{b_3}]\). Where \(b_i\) correspond to the column vectors of the matrix \(B\). Therefore \(\vec{b_1} = \vec{b_3}\) and \(\vec{b_2} = 2 \vec{b_1}\). The 3 vectors are linear independent so the rank is 1.

library(pracma)
A <- matrix(c(1,2,1,3,6,3,2,4,2),3,3)
rref(A)
##      [,1] [,2] [,3]
## [1,]    1    3    2
## [2,]    0    0    0
## [3,]    0    0    0

Problem Set 2

Compute the eigen values and eigen vectors 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} \] Please show your work using an R-markdown document. Please name your assignment submission with your first initial and last name.

I want to find all \(\lambda , \vec{v}\) such that \(A \vec{v} = \lambda\vec{v}\).

This can be re-written as \[ A \vec{v} - \lambda\vec{v} = 0 \]. \[ (A - \lambda I ) \vec{v} = 0\] Where \(I\) denotes the identity matrix.

I will assume that \(\vec{v} \ne \vec{0}\). Therefore, the above equation will only have a solution when \(A - \lambda I\) is singular. That is when \(| A - \lambda I | = 0\).

I will now calculate the determinant, N.B. \(A - \lambda I\) is an upper triangular matrix therefore its determinant is the product of the diagonal. \[ A - \lambda I = \begin{bmatrix} 1 - \lambda & 2 & 3 \\ 0 & 4 - \lambda & 5 \\ 0 & 0 & 6 - \lambda \\ \end{bmatrix} \]

\[ |A - \lambda I | = (1 - \lambda)(4 - \lambda)(6 - \lambda) \]

The above equation is the characteristic polynomial of \(A\). The eigenvalues are the three roots of this equation, as shown below. \[ \lambda = 1 \] \[ \lambda = 4 \] \[ \lambda = 6 \]

I now want to find the corresponding eigenvector for each eigenvalue, i.e. find \(\vec{v}\), such that \(A - \lambda I \vec{v} = (A - \lambda I) \vec{v} = \vec{0}\).

\[ (A - \lambda I )\vec{v} = \begin{bmatrix} 1 - \lambda & 2 & 3 \\ 0 & 4 - \lambda & 5 \\ 0 & 0 & 6 - \lambda \\ \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \\ v_3 \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ \end{bmatrix} \]

For \(\lambda = 1\): \[ (A - I )\vec{v} = \begin{bmatrix} 0 & 2 & 3 \\ 0 & 3 & 5 \\ 0 & 0 & 5 \\ \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \\ v_3 \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ \end{bmatrix} \]

The solution to this is \(span \left\{ \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} \right\}\) . As \(v_1\) is a free variable and \(v_2 = v_3 = 0\).

For \(\lambda = 4\): \[ (A - I )\vec{v} = \begin{bmatrix} -3 & 2 & 3 \\ 0 & 0 & 5 \\ 0 & 0 & 2 \\ \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \\ v_3 \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ \end{bmatrix} \]

The solution to this is \(span \left\{ \begin{bmatrix} 2 \\ 3 \\ 0 \end{bmatrix} \right\}\) . As \(v_2\) is a free variable, \(v_1 = \frac{2}{3} v_2\) and \(v_3 = 0\).

For \(\lambda = 6\): \[ (A - I )\vec{v} = \begin{bmatrix} -5 & 2 & 3 \\ 0 & -2 & 5 \\ 0 & 0 & 0 \\ \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \\ v_3 \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ \end{bmatrix} \]

The solution to this is \(span \left\{ \begin{bmatrix} 16 \\ 25 \\ 10 \end{bmatrix} \right\}\) . As \(v_3\) is a free variable, \(v_1 = \frac{8}{5} v_3\) and \(v_2 = \frac{5}{2}v_3\).