library(pracma)
## Warning: package 'pracma' was built under R version 3.3.3
\(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 2 & 3 & 4 \\ -1 & 0 & 1 & 3 \\ 0 & 1 & -2 & 1 \\ 5 & 4 & -2 & -3 \end{matrix}\right]\end{aligned}\)
Step 01: \(\begin{aligned}\mathbf{R_3} \leftrightarrow \mathbf{R_4}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 2 & 3 & 4 \\ -1 & 0 & 1 & 3 \\ 5 & 4 & -2 & -3 \\ 0 & 1 & -2 & 1 \end{matrix}\right]\end{aligned}\)
Step 02: \(\begin{aligned}\mathbf{R_2} = \mathbf{R_1} + \mathbf{R_2}\end{aligned}\) on \(\begin{aligned}\mathbf{R_2}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 2 & 3 & 4 \\ 0 & 2 & 4 & 7 \\ 0 & -6 & -17 & -23 \\ 0 & 1 & -2 & 1 \end{matrix}\right]\end{aligned}\)
Step 03: \(\begin{aligned}\mathbf{R_3} = -5.\mathbf{R_1} + \mathbf{R_3}\end{aligned}\) on \(\begin{aligned}\mathbf{R_3}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 2 & 3 & 4 \\ 0 & 2 & 4 & 7 \\ 0 & -6 & -17 & -23 \\ 0 & 1 & -2 & 1 \end{matrix}\right]\end{aligned}\)
Step 04: \(\begin{aligned}\mathbf{R_2} = 1/2.\mathbf{R_2}\end{aligned}\) on \(\begin{aligned}\mathbf{R_2}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 2 & 3 & 4 \\ 0 & 1 & 2 & 7/2 \\ 0 & -6 & -17 & -23 \\ 0 & 1 & -2 & 1 \end{matrix}\right]\end{aligned}\)
Step 05: \(\begin{aligned}\mathbf{R_1} = -2.\mathbf{R_2} + \mathbf{R_1}\end{aligned}\) on \(\begin{aligned}\mathbf{R_1}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 0 & -1 & -3 \\ 0 & 1 & 2 & 7/2 \\ 0 & -6 & -17 & -23 \\ 0 & 1 & -2 & 1 \end{matrix}\right]\end{aligned}\)
Step 06: \(\begin{aligned}\mathbf{R_3} = 6.\mathbf{R_2} + \mathbf{R_3}\end{aligned}\) on \(\begin{aligned}\mathbf{R_3}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 0 & -1 & -3 \\ 0 & 1 & 2 & 7/2 \\ 0 & 0 & -5 & -2 \\ 0 & 1 & -2 & 1 \end{matrix}\right]\end{aligned}\)
Step 07: \(\begin{aligned}\mathbf{R_4} = -1.\mathbf{R_2} + \mathbf{R_4}\end{aligned}\) on \(\begin{aligned}\mathbf{R_4}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 0 & -1 & -3 \\ 0 & 1 & 2 & 7/2 \\ 0 & 0 & -5 & -2 \\ 0 & 0 & -4 & -5/2 \end{matrix}\right]\end{aligned}\)
Step 08: \(\begin{aligned}\mathbf{R_3} = -1/5.\mathbf{R_3}\end{aligned}\) on \(\begin{aligned}\mathbf{R_3}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 0 & -1 & -3 \\ 0 & 1 & 2 & 7/2 \\ 0 & 0 & 1 & 2/5 \\ 0 & 0 & -4 & -5/2 \end{matrix}\right]\end{aligned}\)
Step 09: \(\begin{aligned}\mathbf{R_1} = \mathbf{R_3} + \mathbf{R_1}\end{aligned}\) on \(\begin{aligned}\mathbf{R_1}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 0 & 0 & -13/5 \\ 0 & 1 & 2 & 7/2 \\ 0 & 0 & 1 & 2/5 \\ 0 & 0 & -4 & -5/2 \end{matrix}\right]\end{aligned}\)
Step 10: \(\begin{aligned}\mathbf{R_2} = -2.\mathbf{R_3} + \mathbf{R_2}\end{aligned}\) on \(\begin{aligned}\mathbf{R_2}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 0 & 0 & -13/5 \\ 0 & 1 & 0 & 27/10 \\ 0 & 0 & 1 & 2/5 \\ 0 & 0 & -4 & -5/2 \end{matrix}\right]\end{aligned}\)
Step 11: \(\begin{aligned}\mathbf{R_4} = 4.\mathbf{R_3} + \mathbf{R_4}\end{aligned}\) on \(\begin{aligned}\mathbf{R_4}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 0 & 0 & -13/5 \\ 0 & 1 & 0 & 27/10 \\ 0 & 0 & 1 & 2/5 \\ 0 & 0 & 0 & -9/10 \end{matrix}\right]\end{aligned}\)
Step 12: \(\begin{aligned}\mathbf{R_4} = -10/9.\mathbf{R_4}\end{aligned}\) on \(\begin{aligned}\mathbf{R_4}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 0 & 0 & -13/5 \\ 0 & 1 & 0 & 27/10 \\ 0 & 0 & 1 & 2/5 \\ 0 & 0 & 0 & 1 \end{matrix}\right]\end{aligned}\)
Step 13: \(\begin{aligned}\mathbf{R_1} = 13/5.\mathbf{R_4} + \mathbf{R_1}\end{aligned}\) on \(\begin{aligned}\mathbf{R_1}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 27/10 \\ 0 & 0 & 1 & 2/5 \\ 0 & 0 & 0 & 1 \end{matrix}\right]\end{aligned}\)
Step 14: \(\begin{aligned}\mathbf{R_2} = -27/10.\mathbf{R_4} + \mathbf{R_2}\end{aligned}\) on \(\begin{aligned}\mathbf{R_2}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 2/5 \\ 0 & 0 & 0 & 1 \end{matrix}\right]\end{aligned}\)
Step 15: \(\begin{aligned}\mathbf{R_3} = -2/5.\mathbf{R_4} + \mathbf{R_3}\end{aligned}\) on \(\begin{aligned}\mathbf{R_3}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{matrix}\right]\end{aligned}\)
\(\begin{aligned}\mathbf{B} = \{1, 2, 3, 4\}\end{aligned}\); B is the set of pivot columns in the row-reduced form of the matrix.
Rank (A) = dimension (B). Therefore, the rank of matrix A is 4.
If \(\begin{aligned} m > n \end{aligned}\) matrix is non-zero then maximum rank would be equal to the number of columns \(\begin{aligned} n \end{aligned}\). If it has at least one non-zero element then the minimum rank would be 1.
\(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 2 & 1 \\ 3 & 6 & 3 \\ 2 & 4 & 2 \end{matrix}\right]\end{aligned}\)
Step 01: \(\begin{aligned}\mathbf{R_2} = -3.\mathbf{R_1} + \mathbf{R_2}\end{aligned}\) on \(\begin{aligned}\mathbf{R_2}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 2 & 1 \\ 0 & 0 & 0 \\ 2 & 4 & 2 \end{matrix}\right]\end{aligned}\)
Step 02: \(\begin{aligned}\mathbf{R_3} = -2.\mathbf{R_1} + \mathbf{R_3}\end{aligned}\) on \(\begin{aligned}\mathbf{R_3}\end{aligned};\) \(\begin{aligned}\mathbf{A}=\left[\begin{matrix} 1 & 2 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{matrix}\right]\end{aligned}\)
\(\begin{aligned}\mathbf{B} = \{1\}\end{aligned}\); B is the set of pivot columns in the row-reduced form of the matrix.
Rank (A) = dimension (B). Therefore, the rank of matrix A is 1.
\[\mathbf{A}=\left[\begin{matrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \end{matrix}\right]; \mathbf{I}=\left[\begin{matrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{matrix}\right]\]
\[\mathbf{p({\lambda})} = \mathbf{det(A + (-{\lambda}.I_3))}\]
\[\mathbf{p({\lambda})} = \mathbf{det(\left[\begin{matrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \end{matrix}\right] + (-{\lambda} \left[\begin{matrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{matrix}\right]))}\]
\[\mathbf{p({\lambda})} = \mathbf{det(\left[\begin{matrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \end{matrix}\right] + \left[\begin{matrix} -{\lambda} & 0 & 0 \\ 0 & -{\lambda} & 0 \\ 0 & 0 & -{\lambda} \end{matrix}\right])}\]
\[\mathbf{p({\lambda})} = \mathbf{det(\left[\begin{matrix} 1-{\lambda} & 2 & 3 \\ 0 & 4-{\lambda} & 5 \\ 0 & 0 & 6-{\lambda} \end{matrix}\right])}\]
\[\mathbf{p({\lambda})} = \mathbf{det(\left[\begin{matrix} 1-{\lambda} & 2 & 3 \\ 0 & 4-{\lambda} & 5 \\ 0 & 0 & 6-{\lambda} \end{matrix}\right])} = (1-{\lambda}).\left|\begin{matrix} 4-{\lambda} & 5 \\ 0 & 6-{\lambda} \end{matrix}\right| + 0.\left|\begin{matrix} 2 & 3 \\ 0 & 6-{\lambda} \end{matrix}\right| + 0.\left|\begin{matrix} 2 & 3 \\ 4-{\lambda} & 5 \end{matrix}\right| \]
\[\mathbf{p({\lambda})} = (1-{\lambda}).[(4-{\lambda}).(6-{\lambda}) - 0.5] + 0 + 0 \]
\[\mathbf{p({\lambda})} = (1-{\lambda}).(4-{\lambda}).(6-{\lambda}); \mathbf{p({\lambda})} = -(1.{\lambda}^3-11.{\lambda}^2+34.{\lambda}-24)\]
Set the polynomial equation to 0 to find the eigenvalues:
\[\mathbf{p({\lambda})} = (1-{\lambda}).(4-{\lambda}).(6-{\lambda}) = 0\]
\[ {\lambda} = 1; {\lambda} = 4; {\lambda} = 6 \]
The eigenvector for \(\begin{aligned}{\lambda} = 1\end{aligned}\) is equal to the null space of the matrix minus the eigenvalue times the identity matrix \(\begin{aligned}{\epsilon_A}(1) = N (A - {\lambda}.I_3)\end{aligned}\)
\(\begin{aligned}{\epsilon_A}(1) = N (\mathbf{\left[\begin{matrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \end{matrix}\right]} - 1. \mathbf{\left[\begin{matrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{matrix}\right]}) = N (\mathbf{\left[\begin{matrix} 0 & 2 & 3 \\ 0 & 3 & 5 \\ 0 & 0 & 5 \end{matrix}\right]})\end{aligned}\)
The eigenvector for \(\begin{aligned}{\lambda} = 4\end{aligned}\) is equal to the null space of the matrix minus the eigenvalue times the identity matrix \(\begin{aligned}{\epsilon_A}(4) = N (A - {\lambda}.I_3)\end{aligned}\)
\(\begin{aligned}{\epsilon_A}(4) = N (\mathbf{\left[\begin{matrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \end{matrix}\right]} - 4. \mathbf{\left[\begin{matrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{matrix}\right]}) = N (\mathbf{\left[\begin{matrix} -3 & 2 & 3 \\ 0 & 0 & 5 \\ 0 & 0 & 2 \end{matrix}\right]})\end{aligned}\)
The eigenvector for \(\begin{aligned}{\lambda} = 6\end{aligned}\) is equal to the null space of the matrix minus the eigenvalue times the identity matrix \(\begin{aligned}{\epsilon_A}(6) = N (A - {\lambda}.I_3)\end{aligned}\)
\(\begin{aligned}{\epsilon_A}(6) = N (\mathbf{\left[\begin{matrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \end{matrix}\right]} - 6. \mathbf{\left[\begin{matrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{matrix}\right]}) = N (\mathbf{\left[\begin{matrix} -5 & 2 & 3 \\ 0 & -2 & 5 \\ 0 & 0 & 0 \end{matrix}\right]})\end{aligned}\)
The eigenspace of A is the union of the vector space of each eigenvalue:
\(\begin{aligned} \mathbf{\left[\begin{matrix} 1 \\ 0 \\ 0 \end{matrix}\right]} , \mathbf{\left[\begin{matrix} 2/3 \\ 1 \\ 0 \end{matrix}\right]} , \mathbf{\left[\begin{matrix} 8/5 \\ 5/2 \\ 1 \end{matrix}\right]} \end{aligned}\)
| EigenValues | \[ {\lambda} = 1; {\lambda} = 4; {\lambda} = 6 \] |
| EigenVectors | \(\begin{aligned} \mathbf{\left[\begin{matrix} 1 \\ 0 \\ 0 \end{matrix}\right]} , \mathbf{\left[\begin{matrix} 2/3 \\ 1 \\ 0 \end{matrix}\right]} , \mathbf{\left[\begin{matrix} 8/5 \\ 5/2 \\ 1 \end{matrix}\right]} \end{aligned}\) |
| Characteristic Polynomial | \[\mathbf{p({\lambda})} = (1-{\lambda}).(4-{\lambda}).(6-{\lambda})\] \[\mathbf{p({\lambda})} = -(1.{\lambda}^3-11.{\lambda}^2+34.{\lambda}-24)\] |
A <- matrix(c(1, 2, 3, 0, 4, 5, 0, 0, 6), nrow = 3, ncol = 3, byrow = TRUE)
charpoly(A)
## [1] 1 -11 34 -24
ev <- eigen(A)
# extract components
(values <- ev$values)
## [1] 6 4 1
(vectors <- ev$vectors)
## [,1] [,2] [,3]
## [1,] 0.5108407 0.5547002 1
## [2,] 0.7981886 0.8320503 0
## [3,] 0.3192754 0.0000000 0