Eigendecomposition of a Matrix

Learn about eigendecomposition using R, Rcpp, Armadillo, and Eigen.

Eigendecomposition, also called spectral decomposition, is the factorization of a matrix into a canonical form, where the matrix 𝐴𝐴 is represented in terms of its eigenvalues and eigenvectors.

A=QΛQ1A = Q \Lambda Q^{-1}

  • The matrix 𝑄𝑄 is a 𝑛×𝑛𝑛 × 𝑛 square matrix where the ithith column is the eigenvector 𝑞𝑖𝑞_𝑖 of 𝐴𝐴.
  • The matrix Λ\Lambda is the diagonal matrix where the diagonal elements are the corresponding eigenvalues Λii=λi\Lambda_{ii} = \lambda_i.

Only diagonalizable matrices can be factorized in this way.

A (nonzero) vector 𝑣𝑣 of dimension n is an eigenvector of a square 𝑛×𝑛𝑛 \times 𝑛 matrix 𝐴𝐴 if it satisfies the linear equation:

Av=λvA v = \lambda v

  • The λ\lambda value is a scalar, termed the eigenvalue corresponding to the eigenvector vv.

Get hands-on with 1200+ tech skills courses.