\[\mathbf{A} = \begin{bmatrix}1 & 2 & 3 & 4 \\-1 & 0 & 1 &3 \\ 0 & 1 & -2 & 1 \\ 5 & 4 & -2 & -3\end{bmatrix} \\\] The rank of A is n, r (A) = n. how do we find the rank of A? We found the rank of A by finding the maximum numbers of independent row or number of linear independent column.
(1), r_1 = (1, 2, 3, 4) –> r_2 + r_1 = (0, 2, 4, 7) (2), r_2 = (-1, 0, 1, 3)
(3), r_3 = (0, 1, -2, 1) –> (r_1 - 2r_2) - 2r_3 = (0, 0, 8, 5) (4), r_4 = (5, 4, -2, -3) –> 5r_2 + r_4 = (0, 4, 3, 12) –> 2(r_2 + r_1) - (5r_2 + r_4) = (0, 0, 5, -2) We cannot reduce anymore each line. So, the final reduced matrix A \[\mathbf{A} = \begin{bmatrix}0 & 2 & 4 & 7 \\-1 & 0 & 1 &3 \\ 0 & 0 & 8 & 5 \\ 0 & 0 & 5 & -2\end{bmatrix} \\\] Since there is no single null row or all 04 rows are linearly independent, rank of A is 4. We can double check this by computing rank of A as shown below.
A <- matrix(c(1,-1,0,5, 2,0,1,4, 3, 1,-2,-2, 4, 3,1, -3) , 4,4)
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
rank_A <- qr(A)$rank
cat("The rank of A is ", rank_A)
## The rank of A is 4
Let’s say matrix A is a mxn , where m > n , based on the definition of rank A, and A is not a square matrix. S0, if we have n linearly independent columns, consequently , we must have n linearly independent row. since m > n , we cannot have m column , but we can have n rows. therefore, the maximum rank cannot be above n. Thus, max rank of A is n.
The minimum rank? Well, since A is non-zero matrix, based on the definition of rank A, max_rank(A) = n , 0 < max_rank(A) , matrix is non-zero (in other words, there is at least one row and column non null) and rank is an integer, thus 1 < max_rank(A). Thus, min rank of A is 1.
\[\mathbf{B} = \begin{bmatrix}1 & 2 & 1 \\ 3 & 6 & 3 \\ 2 & 4 & 2\end{bmatrix} \\\] Let’s call row, r. Thus, we have r_1, r_2, r_3. From B we can easily see r_2 = 3r_1 and r_3 = 2r_1. Thus, by row reduction, we will have 02 null rows. meaning only r_1 os non null and the only linearly independent row. Rank of matrix B is 1.
Let’s double check this result in R.
B <- matrix(c(1,3,2 ,2,6,4, 1,3,2) , 3,3)
B
## [,1] [,2] [,3]
## [1,] 1 2 1
## [2,] 3 6 3
## [3,] 2 4 2
rank_B <- qr(B)$rank
cat("The rank of B is ", rank_B)
## The rank of B is 1
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.
\[\mathbf{A} = \begin{bmatrix}1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6\end{bmatrix} \\\] \[\qquad let \quad P_A(\lambda) \quad be \quad the\quad the \quad charateristic\quad polynomial \quad, \quad \lambda \quad is\quad an \quad eigenvalue \quad of \quad A \quad only \quad if \quad P_A(\lambda) = det(\lambda I_n - A) = 0\]
\[ \mathbf{det(\lambda I_n - A)} = \begin{bmatrix}\lambda - 1 & 2 & -3 \\ 0 & \lambda - 4 & 5 \\ 0 & 0 & \lambda -6\end{bmatrix} = 0 \quad\Longrightarrow (\lambda -1)[(\lambda-4)(\lambda-6)-(5)(0)] - 2[0(\lambda - 6) -5\times0] + 3[0\times0 -0\times(\lambda-4)]=0 \\\qquad\qquad\qquad\qquad \qquad \qquad\qquad \qquad\qquad\qquad \qquad \Longrightarrow (\lambda -1)[(\lambda -4)(\lambda - 6)] = 0\\ \qquad\qquad\qquad\qquad \qquad \qquad \Longrightarrow \lambda^3 - 11\lambda^2 +34\lambda - 24=0 \\ \qquad \Longrightarrow \lambda^3 - 11\lambda^2 +34\lambda - 24=0 \] ### Polynomial equation can be solved with R-function
lambda <- polyroot(c(-24,34,-11,1))
cat("The eigenvalues lambda are: ", lambda)
## The eigenvalues lambda are: 1+0i 4-0i 6+0i
Now, we have the eigenvalues of matrix A are λ = {1,4, 6} Suppose that A is a square matrix and λ is an eigenvalue of A. Then, the eigenspace of A for λ, \[ E_A (λ )\], is the set of all the eigenvectors of A for λ
So for any eigenvalue λ \[ E_A(λ ) = N(λI_n -A)\] for λ = 1 , \[ E_A(1) = N\left(\begin{bmatrix}\ 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{bmatrix} - \begin{bmatrix}\ 1 & 2 &3 \\ 0 & 4 & 5\\ 0 & 0 & 6 \end{bmatrix}\right) = N\left (\begin{bmatrix}\ 0 & -2 & -3 \\ 0 & -3 & -5\\ 0 & 0 & -5 \end{bmatrix}\right)\]
So we are looking for all \[ \vec V \quad so \quad that \quad \begin{bmatrix}\ 0 & -2 & -3 \\ 0 & -3 & -5\\ 0 & 0 & -5 \end{bmatrix} \vec V = \vec 0 \\ let \quad \vec V = \begin{bmatrix}v_1 \\ v_2 \\ v_3\end{bmatrix} , \quad therefore \quad we \quad have \begin{bmatrix}\ 0 & -2 & -3 \\ 0 & -3 & -5\\ 0 & 0 & -5 \end{bmatrix} \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} \\ \qquad\qquad\qquad \Longrightarrow \begin {cases} 0v_1 -2v_2 - 3v_3=0 \\ 0v_1 -3v_2 - 5v_3 = 0 \\ 0v_1 + 0v_2 - 5v_3 = 0 \end{cases} \qquad\qquad\qquad \Longrightarrow \begin {cases} 2v_2 = -3v_3 \\ 3v_2 = - 3v_3 \\ -5v_3 =0 \end{cases} \qquad\qquad \Longrightarrow \begin {cases} v_1 = t ∈ R \\ v_2 = 0 \\ v_3 =0 \end{cases}\\ \qquad\qquad\qquad \Longrightarrow so \quad for \quad eigenvalue\quad λ = 1, \quad all \quad eigenvectors \quad are \quad in \quad E_A(1) = \left \lbrace \begin{bmatrix} t \\ 0 \\ 0 \end{bmatrix}, \quad t ∈ R \right \rbrace \]
for λ = 4 , \[ E_A(4) = N\left(\begin{bmatrix}\ 4 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 4\end{bmatrix} - \begin{bmatrix}\ 1 & 2 &3 \\ 0 & 4 & 5\\ 0 & 0 & 6 \end{bmatrix}\right) = N\left (\begin{bmatrix}\ 3 & -2 & -3 \\ 0 & 0 & -5\\ 0 & 0 & -2 \end{bmatrix}\right)\]
So we are looking for all \[ \vec V \quad so \quad that \quad \begin{bmatrix}\ 3 & -2 & -3 \\ 0 & 0 & -5\\ 0 & 0 & -2 \end{bmatrix} \vec V = \vec 0 \\ let \quad \vec V = \begin{bmatrix}v_1 \\ v_2 \\ v_3\end{bmatrix} , \quad therefore \quad we \quad have \begin{bmatrix}\ 3 & -2 & -3 \\ 0 & 0 & -5\\ 0 & 0 & -2 \end{bmatrix} \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} \\ \qquad\qquad\qquad \Longrightarrow \begin {cases} 3v_1 -2v_2 - 3v_3=0 \\ 0v_1 + 0v_2 - 5v_3 = 0 \\ 0v_1 + 0v_2 - 2v_3 = 0 \end{cases} \qquad\qquad\qquad \Longrightarrow \begin {cases} 3v_1 = 2v_2 \\ 5v_3 = 0 \\ -2v_3 =0 \end{cases} \qquad\qquad \Longrightarrow \begin {cases} v_1 = t ∈ R \\ v_2 = \frac{3}{2}t \\ v_3 =0 \end{cases}\\ \qquad\qquad\qquad \Longrightarrow so \quad for \quad eigenvalue\quad λ = 4, \quad all \quad eigenvectors\quad are \quad in \quad E_A(4) = \left \lbrace \begin{bmatrix} t \\ \frac{3}{2}t \\ 0 \end{bmatrix}, \quad t ∈ R \right \rbrace \]
for λ = 6 , \[ E_A(4) = N\left(\begin{bmatrix}\ 6 & 0 & 0 \\ 0 & 6 & 0 \\ 0 & 0 & 6\end{bmatrix} - \begin{bmatrix}\ 1 & 2 &3 \\ 0 & 4 & 5\\ 0 & 0 & 6 \end{bmatrix}\right) = N\left (\begin{bmatrix}\ 5 & -2 & -3 \\ 0 & 2 & -5\\ 0 & 0 & 0 \end{bmatrix}\right)\]
So we are looking for all \[ \vec V \quad so \quad that \quad \begin{bmatrix}\ 5 & -2 & -3 \\ 0 & 2 & -5\\ 0 & 0 & 0 \end{bmatrix} \vec V = \vec 0 \\ let \quad \vec V = \begin{bmatrix}v_1 \\ v_2 \\ v_3\end{bmatrix} , \quad therefore \quad we \quad have \begin{bmatrix}\ 5 & -2 & -3 \\ 0 & 2 & -5\\ 0 & 0 & 0 \end{bmatrix} \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} \\ \qquad\qquad\qquad \Longrightarrow \begin {cases} 5v_1 -2v_2 - 3v_3=0 \\ 0v_1 + 2v_2 - 5v_3 = 0 \\ 0v_1 + 0v_2 + 0v_3 = 0 \end{cases} \qquad\qquad\qquad \Longrightarrow \begin {cases} 5v_1 = 8v_3 \\ 2v_2 = 5v_3 \\ v_3 =0 \quad or \quad any \quad t \in R \end{cases} \qquad\qquad \Longrightarrow \begin {cases} v_1 = \frac{8}{5}t \\ v_2 = \frac{5}{2}t \\ v_3 = t \in R \end{cases}\\ \qquad\qquad\qquad \Longrightarrow so \quad for \quad eigenvalue\quad λ = 4, \quad all \quad eigenvectors \quad are \quad in \quad E_A(4) = \left \lbrace \begin{bmatrix} \frac{8}{5}t \\ \frac{5}{2}t \\ t \end{bmatrix}, \quad t ∈ R \right \rbrace \]