The rank is 4. Since its only necessary to RREF until the Lower Triangle has been calculated, we can stop without needing to go all the way to RREF. The rank is equal to all non-zero rows.
[ \[\begin{alignat*}{2} \left(\begin{array}{rrrr} 1 & 2 & 3 & 4 \\ -1 & 0 & 1 & 3 \\ 0 & 1 & -2 & 1 \\ 5 & 4 & -2 & -2 \end{array}\right) &\xrightarrow{r_2 = r_1+r_2} \left(\begin{array}{rrrr} 1 & 2 & 3 & 4 \\ 0 & 2 & 4 & 7 \\ 0 & 1 & -2 & 1 \\ 5 & 4 & -2 & -2 \end{array}\right) &\xrightarrow{r_4 = r_4-5r_1} \left(\begin{array}{rrrr} 1 & 2 & 3 & 4 \\ 0 & 2 & 4 & 7 \\ 0 & 1 & -2 & 1 \\ 0 & -6 & -17 & -22 \end{array}\right) &\xrightarrow{r_3 = 2r_3-r_2} \left(\begin{array}{rrrr} 1 & 2 & 3 & 4 \\ 0 & 2 & 4 & 7 \\ 0 & 0 & -8 & 5 \\ 0 & -6 & -17 & -22 \end{array}\right) \\ \\ &\xrightarrow{r_4 = r_4+3r_2} \left(\begin{array}{rrrr} 1 & 2 & 3 & 4 \\ 0 & 2 & 4 & 7 \\ 0 & 0 & -8 & 5 \\ 0 & 0 & -5 & -1 \end{array}\right) &\xrightarrow{r_3 = -1/8r_2} \left(\begin{array}{rrrr} 1 & 2 & 3 & 4 \\ 0 & 2 & 4 & 7 \\ 0 & 0 & 1 & -.625 \\ 0 & 0 & -5 & -1 \end{array}\right) &\xrightarrow{r_4 = r_4+5r_3} \left(\begin{array}{rrrr} 1 & 2 & 3 & 4 \\ 0 & 2 & 4 & 7 \\ 0 & 0 & 1 & -.625 \\ 0 & 0 & 0 & -4.125 \end{array}\right) \end{alignat*}\] ]
# Confirm the rank of A
# Load the Matrix package
#install.packages("Matrix")
library(Matrix)
# Define matrix A
A <- matrix(c(1, 2, 3, 4,
-1, 0, 1, 3,
0, 1, -2, 1,
5, 4, -2, -2), nrow = 4, byrow = TRUE)
# Calculate the rank of the matrix A
matrix_rank <- rankMatrix(A)
# Print the rank
print(paste("The rank of the matrix is:", matrix_rank))
## [1] "The rank of the matrix is: 4"
For an mxn matrix where m > n, the maximum rank the matrix can have is n. The rank of a matrix is defined as the maximum number of linearly independent rows or columns in the matrix. Since the matrix has more rows than columns, the maximum number of linearly independent columns it can have is limited to n, the total number of columns.
The minimum rank it can have is 1. A rank of zero would imply that all entries in the matrix are zero. A rank of 1 means that at least one row or column is linearly independent.
The rank for matrix B is 1. After RREF, only 1 non zero row remains.
\[ \begin{alignat*}{2} \left(\begin{array}{rrr} 1 & 2 & 1 \\ 3 & 6 & 3 \\ 2 & 4 & 2 \end{array}\right) &\xrightarrow{r_2 = r_2-3r_1} \left(\begin{array}{rrrr} 1 & 2 & 1 \\ 0 & 0 & 0 \\ 2 & 4 & 2 \end{array}\right) &\xrightarrow{r_3 = r_3-2r_1} \left(\begin{array}{rrrr} 1 & 2 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{array}\right) \end{alignat*} \]
# Confirm the rank of B
# Define matrix B
B <- matrix(c(1, 2, 1,
3, 6, 3,
2, 4, 2), nrow = 3, byrow = TRUE)
# Calculate the rank of matrix B
matrix_rank <- rankMatrix(B)
# Print the rank
print(paste("The rank of the matrix is:", matrix_rank))
## [1] "The rank of the matrix is: 1"
\[ A = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \end{pmatrix} \]
1. Substract A from lambda x identify matrix \[ \lambda I - A = \begin{pmatrix} \lambda-1 & 0-2 & 0-3 \\ 0-0 & \lambda-4 & 0-5 \\ 0-0 & 0-0 & \lambda-6 \end{pmatrix} \]
2. Calculate the Determinant using the Rule of Sarrus
The determinant of a 3x3 matrix can be calculated by multiplying and summing the diagonals and then subtracting the sum of the reverse diagonals.
\[ \begin{pmatrix} \lambda-1 & -2 & -3 \\ 0 & \lambda-4 & -5 \\ 0 & 0 & \lambda-6 \end{pmatrix} \begin{pmatrix} \lambda-1 & -2 \\ 0 & \lambda-4 \\ 0 & 0 \end{pmatrix} \]
\[ \text{det}(\lambda I-A) = ((\lambda-1)(\lambda-4)(\lambda-6) + (2*5*0) + (3*0*0))- ((2*0*(\lambda-6)+ ((\lambda)-1*5*0) + (3*(\lambda-4)*0)\\ = ((\lambda-1)(\lambda-4)(\lambda-6) + 0 + 0 - 0 + 0 + 0 \]
3. Characteristic Polynomial of Matrix A
After simplification, the characteristic polynomial equation is
\[ (\lambda-1)(\lambda-4)(\lambda-6) = 0 \]
4. Solve for \(\lambda\) to get eigenvalues
\[ \lambda_1 = 1, \quad \lambda_2 = 4, \quad \lambda_3 = 6 \]
# Verify the eigenvalues
# Define the matrix A
A_matrix <- matrix(c(1, 2, 3,
0, 4, 5,
0, 0, 6), nrow = 3, byrow = TRUE)
# Calculate the eigenvalues and eigenvectors
eigen_result <- eigen(A_matrix)
# Extract the eigenvalues
eigen_values <- eigen_result$values
# Extract the eigenvectors
eigen_vectors <- eigen_result$vectors
# Print the eigenvalues
print(eigen_values)
## [1] 6 4 1
\[ A = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \end{pmatrix} \]
To calculate the eigenvectors for each eigenvalue, we substitute the values in the lambda matrix and solve the \(A - \lambda I\)
\[ A - \lambda I = \begin{pmatrix} 1-\lambda & 2 & 3 \\ 0 & 4-\lambda & 5 \\ 0 & 0 & 6-\lambda \end{pmatrix} \]
1. Subtract \(\lambda I\) from Matrix A and augment matrix
\[ \left(\begin{array}{rrr|r} -5 & 2 & 3 & 0 \\ 0 & -2 & 5 & 0 \\ 0 & 0 & 0 & 0 \end{array}\right) \]
2. RREF the Augmented Matrix A
\[ \begin{align*} \\ &\quad R1 = -\frac{1}{5} R1 \rightarrow \left(\begin{array}{ccc|c} 1 & -\frac{2}{5} & -\frac{3}{5} & 0 \\ 0 & -2 & 5 & 0 \\ 0 & 0 & 0 & 0 \end{array}\right) \\ \\ &\quad R2 = -\frac{1}{2} R2 \rightarrow \left(\begin{array}{ccc|c} 1 & -\frac{2}{5} & -\frac{3}{5} & 0 \\ 0 & 1 & -\frac{5}{2} & 0 \\ 0 & 0 & 0 & 0 \end{array}\right) \\ \\ &\quad R1 = R1 + \frac{2}{5} R2 \rightarrow \left(\begin{array}{ccc|c} 1 & 0 & -\frac{11}{5} & 0 \\ 0 & 1 & -\frac{5}{2} & 0 \\ 0 & 0 & 0 & 0 \end{array}\right) \end{align*} \]
3. RREF of Matrix A
\[ \left(\begin{array}{rrr|r} 1 & 0 & -\frac{11}{5} & 0 \\ 0 & 1 & -\frac{5}{2} & 0 \\ 0 & 0 & 0 & 0 \end{array}\right) \]
4. The system of equations from the augmented matrix
\[ \begin{align*} x_1 - \frac{11}{5}x_3 &= 0 \\ x_2 - \frac{5}{2}x_3 &= 0 \end{align*} \]
5. Solve for \(x_1, x_2, x_3\) Eigenvectors for \(\lambda = 6\):
\[ x_1 = \frac{11}{5}x_3\\ x_2 = \frac{5}{2}x_3\\ \]
Since \(x_3\) is a free variable, we let \(x_3 = t\).
6. If we let \(x_3\) = t, the eigenvector for \(\lambda = 6\)
\[ \mathbf{v} = t \begin{pmatrix} \frac{11}{5} \\ \frac{5}{2} \\ 1 \\ \end{pmatrix} \]
1. Subtract \(\lambda I\) from Matrix A and augment matrix
\[ \left(\begin{array}{rrr|r} 1 - 4 & 2 & 3 & 0 \\ 0 & 4 - 4 & 5 & 0 \\ 0 & 0 & 6 - 4 & 0 \end{array}\right) = \left(\begin{array}{rrr|r} -3 & 2 & 3 & 0 \\ 0 & 0 & 5 & 0 \\ 0 & 0 & 2 & 0 \end{array}\right) \]
2. RREF the Augmented Matrix A
\[ \begin{align*} &\quad R1 = -\frac{1}{3} R1 \rightarrow \left(\begin{array}{ccc|c} 1 & -\frac{2}{3} & -1 & 0 \\ 0 & 0 & 5 & 0 \\ 0 & 0 & 2 & 0 \end{array}\right) \\ &\quad R3 = \frac{1}{2} R3 \rightarrow \left(\begin{array}{ccc|c} 1 & -\frac{2}{3} & -1 & 0 \\ 0 & 0 & 5 & 0 \\ 0 & 0 & 1 & 0 \end{array}\right) \\ &\quad R2 = R2 - 5R3 \rightarrow \left(\begin{array}{ccc|c} 1 & -\frac{2}{3} & -1 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \end{array}\right) \\ &\quad R1 = R1 + R3 \rightarrow \left(\begin{array}{ccc|c} 1 & -\frac{2}{3} & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \end{array}\right) \end{align*} \]
3. RREF of Matrix A
\[ \left(\begin{array}{rrr|r} 1 & -\frac{2}{3} & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \end{array}\right) \]
4. The system of equations from the augmented matrix
\[ \begin{align*} x_1 - \frac{2}{3}x_2 &= 0 \\ x_3 &= 0 \end{align*} \]
5. Solve for \(x_1, x_2, x_3\) Eigenvectors for \(\lambda = 4\):
\[ x_1 = \frac{2}{3}x_2\\ x_3 = 0 \]
Since \(x_2\) is a free variable, we let \(x_2 = t\).
6. If we let \(x_2\) = t, the eigenvector for \(\lambda = 4\)
\[ \mathbf{v} = t \begin{pmatrix} \frac{2}{3} \\ 1 \\ 0 \\ \end{pmatrix} \]
1. Subtract \(\lambda I\) from Matrix A and augment matrix
\[ \left(\begin{array}{rrr|r} 1 - 1 & 2 & 3 & 0 \\ 0 & 4 - 1 & 5 & 0 \\ 0 & 0 & 6 - 1 & 0 \end{array}\right) = \left(\begin{array}{rrr|r} 0 & 2 & 3 & 0 \\ 0 & 3 & 5 & 0 \\ 0 & 0 & 5 & 0 \end{array}\right) \]
2. RREF the Augmented Matrix A
Converting the augmented matrix to RREF:
\[ \begin{align*} &\quad R2 = \frac{1}{3} R2 \rightarrow \left(\begin{array}{ccc|c} 0 & 2 & 3 & 0 \\ 0 & 1 & \frac{5}{3} & 0 \\ 0 & 0 & 5 & 0 \end{array}\right) \\ &\quad R1 = R1 - 2R2 \rightarrow \left(\begin{array}{ccc|c} 0 & 0 & -\frac{1}{3} & 0 \\ 0 & 1 & \frac{5}{3} & 0 \\ 0 & 0 & 5 & 0 \end{array}\right) \\ &\quad R3 = \frac{1}{5} R3 \rightarrow \left(\begin{array}{ccc|c} 0 & 0 & -\frac{1}{3} & 0 \\ 0 & 1 & \frac{5}{3} & 0 \\ 0 & 0 & 1 & 0 \end{array}\right) \\ &\quad R1 = R1 + \frac{1}{3} R3 \rightarrow \left(\begin{array}{ccc|c} 0 & 0 & 0 & 0 \\ 0 & 1 & \frac{5}{3} & 0 \\ 0 & 0 & 1 & 0 \end{array}\right) \\ &\quad R2 = R2 - \frac{5}{3}R3 \rightarrow \left(\begin{array}{ccc|c} 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \end{array}\right) \end{align*} \]
3. RREF of Matrix A
\[ \left(\begin{array}{rrr|r} 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \end{array}\right) \]
4. The system of equations from the augmented matrix
\[ \begin{align*} x_2 &= 0 \\ x_3 &= 0 \end{align*} \]
5. Solve for \(x_1, x_2, x_3\) Eigenvectors for \(\lambda = 1\):
\[ x_1 \ is \ a \ free \ variable\\ x_2 = 0\\ x_3 = 0 \]
Since \(x_1\) is a free variable, we let \(x_1 = t\).
6. If we let \(x_1\) = t, the eigenvector for \(\lambda = 1\)
\[ \mathbf{v} = t \begin{pmatrix} 1 \\ 0 \\ 0 \\ \end{pmatrix} \]
# Verify eigenvectors for Matrix A
# Define the matrix A
A <- matrix(c(
1, 2, 3,
0, 4, 5,
0, 0, 6), nrow = 3, byrow = TRUE)
# Calculate the eigenvalues and eigenvectors
eigen_A <- eigen(A)
# Print the eigenvalues
cat("Eigenvalues:\n")
## Eigenvalues:
## [1] 6 4 1
## Eigenvectors:
## [,1] [,2] [,3]
## [1,] 0.5108407 0.5547002 1
## [2,] 0.7981886 0.8320503 0
## [3,] 0.3192754 0.0000000 0