A <- matrix(c(1,2,3,4,-1,0,1,3,0,1,-2,1,5,4,-2,-3), nrow = 4, byrow = TRUE)
(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
A[2,] <- A[2,] - A[2,1]/A[1,1]*A[1,]
A[4,] <- A[4,] - A[4,1]/A[1,1]*A[1,]
A[3,] <- A[3,] - A[3,2]/A[2,2]*A[2,]
A[4,] <- A[4,] - A[4,2]/A[2,2]*A[2,]
A[4,] <- A[4,] - A[4,3]/A[3,3]*A[3,]
(A)
## [,1] [,2] [,3] [,4]
## [1,] 1 2 3 4.000
## [2,] 0 2 4 7.000
## [3,] 0 0 -4 -2.500
## [4,] 0 0 0 1.125
A[2,] <- A[2,]/A[2,2]
A[3,] <- A[3,]/A[3,3]
A[4,] <- A[4,]/A[4,4]
(A)
## [,1] [,2] [,3] [,4]
## [1,] 1 2 3 4.000
## [2,] 0 1 2 3.500
## [3,] 0 0 1 0.625
## [4,] 0 0 0 1.000
A[3,] <- A[3,] - A[3,4]*A[4,]
A[2,] <- A[2,] - A[2,4]*A[4,]
A[1,] <- A[1,] - A[1,4]*A[4,]
A[2,] <- A[2,] - A[2,3]*A[3,]
A[1,] <- A[1,] - A[1,3]*A[3,]
A[1,] <- A[1,] - A[1,2]*A[2,]
(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
Since \(A\) can be shown to be reduced to echelon form without any non-zero rows, the rank of the matrix is equal to the number of rows in \(A\), 4.
Given that \(m > n\), the maximum rank would be equal to the number of columns, \(n\). If the matrix was non-zero. The minimum rank would be one, if it had at least one non-zero element.
B <- matrix(c(1,2,1,3,6,3,2,4,2), nrow = 3, byrow = TRUE)
(B)
## [,1] [,2] [,3]
## [1,] 1 2 1
## [2,] 3 6 3
## [3,] 2 4 2
B[2,] <- B[2,] - B[2,1]/B[1,1]*B[1,]
B[3,] <- B[3,] - B[3,1]/B[1,1]*B[1,]
(B)
## [,1] [,2] [,3]
## [1,] 1 2 1
## [2,] 0 0 0
## [3,] 0 0 0
Since the the matrix has been reduced to Echelon form with only one non-zero row, the rank of the matrix is 1.
The equation to find the eigenvalues will take the form \[Ax = \lambda x \rightarrow (A - \lambda I)x = 0\] Since \((A-\lambda I)\) must be singular, the determinant of \((A - \lambda I)\) must be 0.
The determinant of \((A- \lambda I)\) and the corresponding eiganvalues:
\[det(A-\lambda I) = det\left ( \begin{bmatrix} 1 -\lambda & 2 & 3\\ 0 & 4 -\lambda & 5\\ 0 & 0 & 6 -\lambda \end{bmatrix} \right )\]
\[= (1-\lambda)\begin{vmatrix} 4-\lambda & 5\\ 0 & 6 - \lambda \end{vmatrix} - 2\begin{vmatrix} 0 & 5\\ 0 & 6 - \lambda \end{vmatrix} + 3\begin{vmatrix} 0 & 4 - \lambda\\ 0 & 0 \end{vmatrix}\]
\[= (1-\lambda)(4-\lambda)(6-\lambda) -2(0) + 3(0)= 0\] \[\therefore \lambda_1 = 1; \lambda_2 = 4; \lambda_3 = 6\] It seems that for any upper matrix U, the eigenvalues would be the diagonal.
Solving for the corresponding eiganvectors:
\[E_{1}=N\left ( \begin{bmatrix} 1 -1 & 2 & 3\\ 0 & 4 -1 & 5\\ 0 & 0 & 6 -1 \end{bmatrix} \right )=N\left ( \begin{bmatrix} 0 & 2 & 3\\ 0 & 3 & 5\\ 0 & 0 & 5 \end{bmatrix} \right )=N\left ( \begin{bmatrix} 0 & 1 & 0\\ 0 & 0 & 1\\ 0 & 0 & 0 \end{bmatrix} \right ) \\ E_1 =\left \{ \begin{bmatrix} x_1\\ x_2\\ x_3 \end{bmatrix} =t\begin{bmatrix} 1\\ 0\\ 0 \end{bmatrix}\right \}\]
\[E_{4}=N\left ( \begin{bmatrix} 1 -4 & 2 & 3\\ 0 & 4 -4 & 5\\ 0 & 0 & 6 -4 \end{bmatrix} \right )=N\left ( \begin{bmatrix} -3 & 2 & 3\\ 0 & 0 & 5\\ 0 & 0 & 2 \end{bmatrix} \right )=N\left ( \begin{bmatrix} 1 & -\frac{2}{3} & 0\\ 0 & 0 & 1\\ 0 & 0 & 0 \end{bmatrix} \right ) \\ E_4 =\left \{ \begin{bmatrix} x_1\\ x_2\\ x_3 \end{bmatrix}=t\begin{bmatrix} x_1 = \frac{2}{3}x_2\\ x_2 = 1\\ 0 \end{bmatrix} =t\begin{bmatrix} \frac{2}{3}\\ 1\\ 0 \end{bmatrix} \right \}\]
\[E_{6}=N\left ( \begin{bmatrix} 1 -6 & 2 & 3\\ 0 & 4 -6 & 5\\ 0 & 0 & 6 -6 \end{bmatrix} \right )=N\left ( \begin{bmatrix} -5 & 2 & 3\\ 0 & -2 & 5\\ 0 & 0 & 0 \end{bmatrix} \right )=N\left ( \begin{bmatrix} 1 & 0 & -\frac{8}{5}\\ 0 & 1 & -\frac{5}{2}\\ 0 & 0 & 0 \end{bmatrix} \right ) \\ E_6 =\left \{ \begin{bmatrix} x_1\\ x_2\\ x_3 \end{bmatrix} =t \begin{bmatrix} x_1 = \frac{8}{5}x_3 \\ x_2 = \frac{5}{2}x_3 \\ x_3 = 1 \end{bmatrix}=t \begin{bmatrix} \frac{8}{5} \\ \frac{5}{2} \\ 1 \end{bmatrix}\right \}\]