##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
##
## Attaching package: 'kableExtra'
## The following object is masked from 'package:dplyr':
##
## group_rows
## [,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 = \begin{bmatrix}1&2&3&4 \\-1&0&1&3 \\0&1&-2&1 \\5&4&-2&-3 \\\end{bmatrix} \]
## [1] -9
## [,1] [,2] [,3] [,4]
## [1,] 1 0 0 0
## [2,] 0 1 0 0
## [3,] 0 0 1 0
## [4,] 0 0 0 1
## [1] 4
Because \({A}\) is a square matrix with non-zero determinant, it is full rank, i.e., rank = 4 .
This is confirmed as the Row-Reduced Echelon Form contains 4 non-zero rows.
The maximum rank is \({maxrank = min(m,n)}\) , which in this case is the number of columns, \({n}\), as there are more rows than columns.
The minimum rank is 1.
## [,1] [,2] [,3]
## [1,] 1 2 1
## [2,] 3 6 3
## [3,] 2 4 2
\[ B = \begin{bmatrix}1&2&1 \\3&6&3 \\2&4&2 \\\end{bmatrix} \]
## [1] 0
## [,1] [,2] [,3]
## [1,] 1 2 1
## [2,] 0 0 0
## [3,] 0 0 0
## [1] 1
B has only a single independent column: \({ \begin{bmatrix}1 \\3 \\2 \\\end{bmatrix}}\) .
The third column is the same as the first, and the middle column is double the first.
Also, the number of non-zero rows in the row-echelon form is 1.
Therefore, the matrix \({B}\) has rank 1.
You’ll need to show your work.
You’ll need to write out the characteristic polynomial and show your solution.
## [,1] [,2] [,3]
## [1,] 1 2 3
## [2,] 0 4 5
## [3,] 0 0 6
\[ A = \begin{bmatrix}1&2&3 \\0&4&5 \\0&0&6 \\\end{bmatrix} \] \[ Ax = \lambda x \] \[ Ax - \lambda x = 0 \] \[ \left(A-\lambda I \right)x = 0 \]
\[ \begin{bmatrix}1&2&3 \\0&4&5 \\0&0&6 \\\end{bmatrix} - \begin{bmatrix} \lambda & 0 & 0 \\ 0 & \lambda & 0 \\ 0 & 0 & \lambda \end{bmatrix} = 0 \] \[ \begin{bmatrix} 1-\lambda & 2 & 3 \\ 0 & 4-\lambda & 5 \\ 0 & 0 & 6-\lambda \end{bmatrix} x = 0 \]
\[ det \begin{bmatrix} 1-\lambda & 2 & 3 \\ 0 & 4-\lambda & 5 \\ 0 & 0 & 6-\lambda \end{bmatrix} = 0 \] Because the matrix is upper triangular, the determinant equals the product of the diagonal entries:
\[ (1-\lambda) (4-\lambda)(6-\lambda) = 0 \] The characteristic polynomial is \({24-34x+11x^2-x^3}=0\), but we can easily see from the factored form above that the eigenvalues are \({\lambda \in \{6,4,1\}}\) .
\[ \begin{bmatrix} 1-\lambda & 2 & 3 \\ 0 & 4-\lambda & 5 \\ 0 & 0 & 6-\lambda \end{bmatrix} \begin{bmatrix} x_{ 1 } \\ x_{ 2 } \\ x_{ 3 } \end{bmatrix} =\lambda \begin{bmatrix} x_{ 1 } \\ x_{ 2 } \\ x_{ 3 } \end{bmatrix}\\ \]
\[ \begin{bmatrix} 1-6 & 2 & 3 \\ 0 & 4-6 & 5 \\ 0 & 0 & 6-6 \end{bmatrix} \begin{bmatrix} x_{ 1 } \\ x_{ 2 } \\ x_{ 3 } \end{bmatrix} =\begin{bmatrix} -5 & 2 & 3 \\ 0 & -2 & 5 \\ 0 & 0 & 0 \end{bmatrix} \begin{bmatrix} x_{ 1 } \\ x_{ 2 } \\ x_{ 3 } \end{bmatrix}=0 \]
\[ \begin{cases} -5x_{ 1 }+2x_{ 2 }+3x_{ 3 }=0 \\ 0x_{ 1 }-2x_{ 2 }+5x_{ 3 }=0 \\ 0x_{ 1 }+0x_{ 2 }+0x_{ 3 }=0 \end{cases}\\ \]
\[ \Rightarrow \begin{cases} -5x_{ 1 }+5x_{ 3 }+3x_{ 3 }=0 \\ 5x_{ 3 }=2x_{ 2 } \end{cases}\\ \Rightarrow \begin{cases} x_{ 2 }=\frac { 5x_{ 3 } }{ 2 } \\ 5x_{ 1 }=8x_{ 3 } \end{cases}\\ \Rightarrow \begin{cases} x_{ 2 }=\frac { 5x_{ 3 } }{ 2 } =2.5(x_{ 3 }) \\ x_{ 1 }=\frac { 8 }{ 5 } x_{ 3 }=1.6(x_{ 3 }) \end{cases}\\ \Rightarrow \begin{bmatrix} x_{ 1 } \\ x_{ 2 } \\ x_{ 3 } \end{bmatrix}=\begin{bmatrix} 1.6 \\2.5 \\ 1.0 \end{bmatrix}\\\\ \]
Check:
## [1] 1.6 2.5 1.0
## [,1]
## [1,] 1.6
## [2,] 2.5
## [3,] 1.0
## [,1]
## [1,] -0.000000000000000222045
## [2,] 0.000000000000000000000
## [3,] 0.000000000000000000000
## [,1]
## [1,] TRUE
## [2,] TRUE
## [3,] TRUE
## [1] 9.81
## [1] 0.510841 0.798189 0.319275
\[ \begin{bmatrix} x_{ 1 } \\ x_{ 2 } \\ x_{ 3 } \end{bmatrix} =\begin{bmatrix} 1.6 \\2.5 \\ 1.0 \end{bmatrix} \cdot \frac{1}{\sqrt{9.81}} =\begin{bmatrix} .510841 \\ .798189 \\ .319275 \end{bmatrix} \]
\[ \begin{bmatrix} 1-4 & 2 & 3 \\ 0 & 4-4 & 5 \\ 0 & 0 & 6-4 \end{bmatrix} \begin{bmatrix} x_{ 1 } \\ x_{ 2 } \\ x_{ 3 } \end{bmatrix} =\begin{bmatrix} -3 & 2 & 3 \\ 0 & 0 & 5 \\ 0 & 0 & 2 \end{bmatrix} \begin{bmatrix} x_{ 1 } \\ x_{ 2 } \\ x_{ 3 } \end{bmatrix}=0 \]
\[ \begin{cases} -3x_{ 1 }+2x_{ 2 }+3x_{ 3 }=0 \\ 0x_{ 1 }+0x_{ 2 }+5x_{ 3 }=0 \\ 0x_{ 1 }+0x_{ 2 }+2x_{ 3 }=0 \end{cases} \Rightarrow \begin{cases} x_{ 3 }=0 \\ -3x_{ 1 }+2x_{ 2 }=0 \end{cases} \Rightarrow \begin{cases} x_{ 3 }=0 \\ 3x_{ 1 }=2x_{ 2 } \end{cases} \Rightarrow \begin{cases} x_{ 3 }=0 \\ x_{ 1 }=\frac{2x_{ 2 }}{3} \end{cases}\\ \Rightarrow \begin{bmatrix} x_{ 1 } \\ x_{ 2 } \\ x_{ 3 } \end{bmatrix} =\begin{bmatrix} 2 \\3 \\ 0 \end{bmatrix}\\\\ \]
## [1] 2 3 0
## [,1]
## [1,] 2
## [2,] 3
## [3,] 0
## [,1]
## [1,] 0
## [2,] 0
## [3,] 0
## [,1]
## [1,] TRUE
## [2,] TRUE
## [3,] TRUE
## [1] 13
## [1] 0.55470 0.83205 0.00000
\[ \begin{bmatrix} x_{ 1 } \\ x_{ 2 } \\ x_{ 3 } \end{bmatrix} =\begin{bmatrix} 2 \\3 \\ 0 \end{bmatrix} \cdot \frac{1}{\sqrt{13}} =\begin{bmatrix} .55470 \\ .83205 \\ 0 \end{bmatrix} \]
\[ \begin{bmatrix} 1-1 & 2 & 3 \\ 0 & 4-1 & 5 \\ 0 & 0 & 6-1 \end{bmatrix} \begin{bmatrix} x_{ 1 } \\ x_{ 2 } \\ x_{ 3 } \end{bmatrix} =\begin{bmatrix} 0 & 2 & 3 \\ 0 & 3 & 5 \\ 0 & 0 & 5 \end{bmatrix} \begin{bmatrix} x_{ 1 } \\ x_{ 2 } \\ x_{ 3 } \end{bmatrix}=0 \]
\[ \begin{cases} 0x_{ 1 }+2x_{ 2 }+3x_{ 3 }=0 \\ 0x_{ 1 }+3x_{ 2 }+5x_{ 3 }=0 \\ 0x_{ 1 }+0x_{ 2 }+5x_{ 3 }=0 \end{cases} \Rightarrow \begin{cases} x_{ 3 }=0 \\ x_{ 2 }=0 \\ x_{ 1 }=1 \end{cases}\\ \Rightarrow \begin{bmatrix} x_{ 1 } \\ x_{ 2 } \\ x_{ 3 } \end{bmatrix}=\begin{bmatrix} 1 \\0 \\ 0 \end{bmatrix}\\\\ \]
Check:
## [1] 1 0 0
## [,1]
## [1,] 1
## [2,] 0
## [3,] 0
## [,1]
## [1,] 0
## [2,] 0
## [3,] 0
## [,1]
## [1,] TRUE
## [2,] TRUE
## [3,] TRUE
## [1] 1
## [1] 1 0 0
## x6_norm x4_norm x1_norm
## [1,] 0.510841 0.55470 1
## [2,] 0.798189 0.83205 0
## [3,] 0.319275 0.00000 0
My normalized eigenvectors (each column): \({\begin{bmatrix}0.510840685451281&0.554700196225229&1 \\0.798188571017626&0.832050294337844&0 \\0.31927542840705&0&0 \\\end{bmatrix}}\)
\[ Eigenvalues: \lambda = \begin{bmatrix}6 \\4 \\1 \\\end{bmatrix} \] \[ Eigenvectors: x = \begin{bmatrix}0.510840685451281&0.554700196225229&1 \\0.798188571017626&0.832050294337844&0 \\0.31927542840705&0&0 \\\end{bmatrix} \]
# Check if Ax[i] = lambda[i] x[i]
lhs = rhs = difference = rep.int(list(NULL),3)
lhstext = rhstext = difftext = rep.int(list(NULL),3)
#whicheig = 1
for (whicheig in 1:3) {
lhstext[[whicheig]] = paste0("A x_{",whicheig,"}")
lhs[[whicheig]] = A %*% eigvecs[,whicheig]
rhstext[[whicheig]] = paste0(eigvals[whicheig]," x_{",whicheig,"}")
rhs[[whicheig]] = as.matrix(eigvals[whicheig] * eigvecs[,whicheig])
difference[[whicheig]] = lhs[[whicheig]] - rhs[[whicheig]]
}\[ Checking \quad A x_{1} = \lambda_{1} x_{1} \quad : \quad \lambda_{1} = 6 \quad ; \quad x_{1} = \begin{bmatrix}0.510840685451281 \\0.798188571017626 \\0.31927542840705 \\\end{bmatrix} \] \[ A x_{1} = \begin{bmatrix}3.06504411270768 \\4.78913142610576 \\1.9156525704423 \\\end{bmatrix} \quad ; \quad 6 x_{1} = \begin{bmatrix}3.06504411270768 \\4.78913142610576 \\1.9156525704423 \\\end{bmatrix} \quad ; \quad diff = \begin{bmatrix}-0.000000000000000444089209850063 \\0 \\0 \\\end{bmatrix} \]
\[ Checking \quad A x_{2} = \lambda_{2} x_{2} \quad : \quad \lambda_{2} = 4 \quad ; \quad x_{2} = \begin{bmatrix}0.554700196225229 \\0.832050294337844 \\0 \\\end{bmatrix} \] \[ A x_{2} = \begin{bmatrix}2.21880078490092 \\3.32820117735137 \\0 \\\end{bmatrix} \quad ; \quad 4 x_{2} = \begin{bmatrix}2.21880078490092 \\3.32820117735137 \\0 \\\end{bmatrix} \quad ; \quad diff = \begin{bmatrix}0 \\0 \\0 \\\end{bmatrix} \]
\[ Checking \quad A x_{3} = \lambda_{3} x_{3} \quad : \quad \lambda_{3} = 1 \quad ; \quad x_{3} = \begin{bmatrix}1 \\0 \\0 \\\end{bmatrix} \] \[ A x_{3} = \begin{bmatrix}1 \\0 \\0 \\\end{bmatrix} \quad ; \quad 1 x_{3} = \begin{bmatrix}1 \\0 \\0 \\\end{bmatrix} \quad ; \quad diff = \begin{bmatrix}0 \\0 \\0 \\\end{bmatrix} \]
## x6_norm x4_norm x1_norm
## [1,] 0.510841 0.55470 1
## [2,] 0.798189 0.83205 0
## [3,] 0.319275 0.00000 0
## [,1] [,2] [,3]
## [1,] 0.510841 0.55470 1
## [2,] 0.798189 0.83205 0
## [3,] 0.319275 0.00000 0
## x6_norm x4_norm x1_norm
## [1,] -0.000000000000000111022 0 0
## [2,] 0.000000000000000000000 0 0
## [3,] 0.000000000000000000000 0 0
## x6_norm x4_norm x1_norm
## [1,] TRUE TRUE TRUE
## [2,] TRUE TRUE TRUE
## [3,] TRUE TRUE TRUE
Please show your work using an R-markdown document. Please name your assignment submission with your first initial and last name.