1. Learn
  2. /
  3. Courses
  4. /
  5. Linear Algebra for Data Science in R

Exercise

Finding Eigenvalues in R

In the next video we will explicitly see how to find the eigenpairs for a matrix \(A\), but right now we can at least show that a pair is an eigenpair for a matrix \(A\). We can do this by showing that the difference between \(A\vec{v}\) and \(\lambda\vec{v}\) results in a vector of zeros.

The matrix A with R output:

     [,1] [,2] [,3]
[1,]   -1    2    4
[2,]    0    7   12
[3,]    0    0   -4

is loaded for you.

Instructions 1/3

undefined XP
    1
    2
    3

Show that 7 is an eigenvalue for A with the eigenvector that is the first column of the matrix with R output:

          [,1]       [,2] [,3]
[1,] 0.2425356 -0.3789810    1
[2,] 0.9701425 -0.6821657    0
[3,] 0.0000000  0.6253186    0