Linear algebra II

Lecture 23

Dr. Greg Chism

University of Arizona
INFO 511 - Fall 2024

Eigenvalues + Eigenvectors

Eigenvalues and Eigenvectors

  • Eigenvalues and eigenvectors decompose a matrix into its fundamental components.
  • Eigenvalue equation: Av=λv

Calculating Eigenvalues and Eigenvectors

We will be using Python for this…

import numpy as np
from numpy.linalg import eig
A = np.array([[1, 2], [4, 5]])
eigenvals, eigenvecs = eig(A)
print("EIGENVALUES:", eigenvals)
print("EIGENVECTORS:", eigenvecs)
EIGENVALUES: [-0.46410162  6.46410162]
EIGENVECTORS: [[-0.80689822 -0.34372377]
 [ 0.59069049 -0.9390708 ]]

Eigen decomposition

  • Decomposition formula: A=QLQ−1

  • Q is the matrix of eigenvectors, L is the diagonal matrix of eigenvalues, and Q−1 is the inverse of Q

Recomposing matrices

from numpy import diag
from numpy.linalg import inv
Q = eigenvecs
L = diag(eigenvals)
R = inv(Q)
B = Q @ L @ R
print(B)
[[1. 2.]
 [4. 5.]]

Applications in Data Science and Machine Learning

  • Principal Component Analysis (PCA): Reduces dimensionality while preserving variance.

  • Eigenvalues in system stability: Determine stability in control systems and differential equations.

Special Types of Matrices

Identity Matrix: Diagonal of 1s, other elements are 0s.

I=[100010001]

Diagonal Matrix: Non-zero elements only on the diagonal.

D=[400050006]

Triangular Matrix: Triangular shape of non-zero elements (upper U, lower L).

U=[123045006]L=[100230456]

ae-16-pca

Principal Component Analysis

🔗 datasciaz.netlify.app

1 / 9
Linear algebra II Lecture 23 Dr. Greg Chism University of Arizona INFO 511 - Fall 2024

  1. Slides

  2. Tools

  3. Close
  • Linear algebra II
  • Eigenvalues + Eigenvectors
  • Eigenvalues and Eigenvectors
  • Calculating Eigenvalues and Eigenvectors
  • Eigen decomposition
  • Recomposing matrices
  • Applications in Data Science and Machine Learning
  • Special Types of Matrices
  • ae-16-pca
  • f Fullscreen
  • s Speaker View
  • o Slide Overview
  • e PDF Export Mode
  • b Toggle Chalkboard
  • c Toggle Notes Canvas
  • d Download Drawings
  • ? Keyboard Help