Skip to content
Learn Netverks

Lesson

Step 20/36 56% through track

eigen-decomposition

Eigen decomposition

Last reviewed Jun 1, 2026 Content v20260601
Track mode
server_script
Means
Server runner
Reading
~1 min
Level
intermediate

This lesson

This lesson teaches Eigen decomposition: SciPy scientific routines on NumPy arrays—statistics, optimization, linear algebra, and numerical methods.

Teams apply Eigen decomposition in every serious SciPy project—skipping it leaves blind spots in analysis and reviews.

You will apply Eigen decomposition in contexts like: Research code, engineering simulations, and specialized analytics.

Read the narrative, run NumPy + SciPy snippets in the playground (install scipy and numpy with pip if needed), inspect outputs and convergence, and complete MCQs.

When you can explain the previous lesson's ideas in your own words.

linalg.eig finds eigenvalues and eigenvectors for general matrices; linalg.eigh for symmetric/Hermitian problems with real eigenvalues—common in PCA and physics.

Definition intuition

For Av = λv, v is an eigenvector and λ the eigenvalue. Symmetric matrices have orthogonal eigenvectors—foundation of spectral methods.

Example

import numpy as np
from scipy import linalg

A = np.array([[4., 1.], [1., 3.]])
vals, vecs = linalg.eigh(A)
print('eigenvalues:', vals)
print('first eigenvector:', vecs[:, 0])

Applications

  • Principal Component Analysis (covariance eigenvectors)
  • Stability of dynamical systems (largest |λ|)
  • Graph spectra via adjacency matrix eigenvalues

Important interview questions and answers

  1. Q: eig vs eigh?
    A: eigh assumes symmetry—faster and returns real eigenvalues for real symmetric A.
  2. Q: Largest eigenvalue?
    A: Often controls long-term behavior in Markov chains and power iteration.

Self-check

  1. What equation defines an eigenpair?
  2. When prefer eigh over eig?

Tip: Use eigh for symmetric matrices—real eigenvalues and orthogonal eigenvectors.

Interview prep

eigh?

Symmetric/Hermitian—real eigenvalues, orthogonal eigenvectors.

PCA link?

Covariance eigenvectors are principal components.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs on the configured server runner (dev: npm run runner with LEARNING_RUNNER_ENABLED=true). Output appears below the editor.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • eig vs eigh?
  • Symmetric case?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump