Solving Eigenvalue/Eigenvector Problems

Linear Algebra for Data Science in R

Eric Eager

Data Scientist at Pro Football Focus

Properties of Solutions to Eigenvalue/Eigenvector Problems

  • An $n$ by $n$ matrix $A$ has, up to multiplicity, $n$ eigenvalues.
  • Even if $A$ is a matrix consisting entirely of real numbers, some (or all) of its eigenvalues could be complex numbers.
  • All complex eigenvalues must come in conjugate pairs, though, like $1 + 2i$ and $1 - 2i$.
Linear Algebra for Data Science in R
print(A)
     [,1] [,2] [,3]
[1,]   -1    2    4
[2,]    0    7   12
[3,]    0    0   -4
eigen(A)
eigen() decomposition
$`values`
[1]  7 -4 -1

$vectors
          [,1]       [,2] [,3]
[1,] 0.2425356 -0.3789810    1
[2,] 0.9701425 -0.6821657    0
[3,] 0.0000000  0.6253186    0
Linear Algebra for Data Science in R
print(A)
     [,1] [,2] [,3]
[1,]   -1    2    4
[2,]    0    7   12
[3,]    0    0   -4

Extracting eigenvalue and eigenvector information:

E <- eigen(A)
E$values[1]

E$vectors[, 1]
7

0.2425356 0.9701425 0.0000000
Linear Algebra for Data Science in R
print(A)
     [,1] [,2]
[1,]    1    2
[2,]   -2   -1
eigen(A)
eigen() decomposition
$`values`
[1] 0+1.732051i 0-1.732051i

$vectors
                      [,1]                  [,2]
[1,]  0.3535534+0.6123724i  0.3535534-0.6123724i
[2,] -0.7071068+0.0000000i -0.7071068+0.0000000i

 

 

 

 

 

 

eigen(A)$values[1]*eigen(A)$values[2]
3+0i
Linear Algebra for Data Science in R

Let's practice

Linear Algebra for Data Science in R

Preparing Video For Download...