A = matrix(c(1,2,3,4,-1,0,1,3,0,1,-2,1,5,4,-2,-3), nrow=4, byrow=TRUE)
paste("The Rank of the Matrix A is", Rank(A))
## [1] "The Rank of the Matrix A is 4"
QUESTION (2) Given an mxn matrix where m > n, what can be the
maximum rank? The minimum rank, assuming that the matrix is non-zero?
The maximum rank the maximum number of its linearly independent
column vectors (or row vectors). In this case the maximum rank of an mxn
matrix where m > n is m.
The minimum rank,
assuming that the matrix is non-zero would be 1.
QUESTION (3) What is the rank of matrix B? \[\begin{equation*}
B =
\begin{bmatrix}
1 & 2 & 1\\
3 & 6 & 3\\
2 & 4 & 2
\end{bmatrix}
\end{equation*}\]
B = matrix(c(1,2,1,3,6,3,2,4,2), nrow = 3, byrow = T)
B
## [,1] [,2] [,3]
## [1,] 1 2 1
## [2,] 3 6 3
## [3,] 2 4 2
paste("The Rank of the Matrix B is", Rank(B))
## [1] "The Rank of the Matrix B is 1"
QUESTION: 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. \[\begin{equation*} A = \begin{bmatrix} 1 & 2 & 3\\ 0 & 4 & 5\\ 0 & 0 & 6 \end{bmatrix} \end{equation*}\]
A = matrix(c(1,2,3,0,4,5,0,0,6), nrow = 3, byrow = T)
eigen(A)$values
## [1] 6 4 1
\({det}\left(A-\lambda \,I\right)\,=\,0\)
\({det}\left(\begin{bmatrix}1&2&3\\0&4&5\\0&0&6\end{bmatrix} - \lambda \begin{bmatrix}1 & 0 & 0 \\ 0 & 1 & 0\\ 0 & 0 & 1 \end{bmatrix}\right)=0\)
\({det}\left(\begin{bmatrix}1-\lambda &2&3\\0&4-\lambda &5\\0&0&6-\lambda \end{bmatrix}\right)=0\)
\(\left(1-\lambda\right) [\left(4-\lambda \right)\left(6-\lambda \right)-5\times 0] + 2[0 \times \left(6-\lambda \right)-5\times 0] + 3[0\times0 - 0\left(6-\lambda \right)]=0\)
\(\left(1-\lambda\right)\left(4-\lambda \right)\left(6-\lambda \right)=0\)
The eigenvalues are 1, 4 & 6
eigen(A)$vectors
## [,1] [,2] [,3]
## [1,] 0.5108407 0.5547002 1
## [2,] 0.7981886 0.8320503 0
## [3,] 0.3192754 0.0000000 0
Solve lamda = 1
\(\lambda_1=1\)
\((A- \lambda_1 I)v=0\)
\(\begin{bmatrix}1-1&2&3\\0&4-1&5\\0&0&6-1\end{bmatrix}=0\)
\(\begin{bmatrix}0&2&3\\0&3&5\\0&0&5\end{bmatrix}=0\)
\(2y + 3z = 0\\ 3y + 5z = 0\\5z = 0\\\)
\(X=1\\ Y and Z = 0\\\) \(E_{\lambda_3=1}=c\begin{bmatrix}1 \\ 0 \\ 0\end{bmatrix}\)
Solve lamda = 4
\(\lambda_2=4\)
\((A- \lambda_2 I)v=0\)
\(\begin{bmatrix}1-4&2&3\\0&4-4&5\\0&0&6-4\end{bmatrix}=0\)
\(\begin{bmatrix}-3&2&3\\0&0&5\\0&0&2\end{bmatrix}=0\)
\(-3x + 2y + z = 0\\ 5z = 0\\2z = 0\)
\(Y=1\\ Y and X=2/3\)
\(E_{\lambda_2=4}=c\begin{bmatrix}2/3 \\ 1 \\ 0\end{bmatrix}\)
Solve lamda = 6
\(\lambda_3=6\)
\((A- \lambda_3 I)v=0\)
\(\begin{bmatrix}1-6&2&3\\0&4-6&5\\0&0&6-6\end{bmatrix}=0\)
\(\begin{bmatrix}-5&2&3\\0&-2&5\\0&0&0\end{bmatrix}=0\)
\(-5x + 2y + 3z = 0 \\ -2y + 5z = 0\)
\(Y=1\):
\(-2 + 5z = 0; z = 2/5\)
Substituting Y and Z:
\(-5x + 2 + 3(2/5) = 0 \\ -5x = -16/5 \\ x = 16/25\)
\(E_{\lambda_1=6}=c\begin{bmatrix}16/25 \\ 1 \\ 2/5\end{bmatrix}\)
The eigenvectors are: \(\begin{bmatrix}1 \\ 0 \\ 0\end{bmatrix}\) \(\begin{bmatrix}2/3 \\ 1 \\ 0\end{bmatrix}\) \(\begin{bmatrix}16/25 \\ 1 \\ 2/5\end{bmatrix}\)
charpoly(A, info = FALSE)
## [1] 1 -11 34 -24
\(= \left|\begin{bmatrix}1-\lambda & 2 & 3\\ 0 & 4-\lambda & 5\\ 0 & 0 & 6-\lambda\end{bmatrix}\right|\)
\((1 - \lambda)\Big[24-10\lambda+\lambda^2\Big] = 24 -10\lambda + \lambda^2 -24\lambda +10\lambda^2 - \lambda^3 = -\lambda^3 + 11\lambda^2 -34\lambda + 24\)
characteristic polynomial:- \(-\lambda^3 + 11\lambda^2 - 34\lambda + 24\)