C24 Find the eigenvalues,eigenspaces,algebraic and geometric multiplicities for A =
Given the matrix $A = \[\begin{pmatrix} 1 & -1 & 1 \\ -1 & 1 & -1 \\ 1 & -1 & 1 \end{pmatrix}\]$
A <- matrix(c(1, -1, 1, -1, 1, -1, 1, -1, 1), nrow = 3, byrow = TRUE)
print(A)
## [,1] [,2] [,3]
## [1,] 1 -1 1
## [2,] -1 1 -1
## [3,] 1 -1 1
eigenvalues <- round(eigen(A)$values,1)
print(eigenvalues)
## [1] 3 0 0
eigenvectors <- round(eigen(A)$vectors)
print(eigenvectors)
## [,1] [,2] [,3]
## [1,] 1 -1 0
## [2,] -1 0 1
## [3,] 1 0 1