ML Foundations

Learn / ML Foundations

ML Foundations: Eigenvalues, Eigenvectors, and Quadratic Forms

Advanced quiz on characteristic polynomials, eigendecomposition, symmetric matrices, quadratic forms, and spectral intuition used in ML.

Learning path

0%

0 of 4 sections marked complete · about 31 minutes

Learning objectives

What you will be able to explain

  • What defines an eigenvector-eigenvalue pair?
  • Find the eigenvalues of a diagonal matrix
  • What is the characteristic polynomial here?
  • Compute eigenvalues of a symmetric matrix
  • Which vector is an eigenvector for the larger eigenvalue?
  • Evaluate a quadratic form

Section 01

What defines an eigenvector-eigenvalue pair? to What is the characteristic polynomial here?

01

What defines an eigenvector-eigenvalue pair?

An eigenvector is a nonzero direction that the matrix only scales, and the scaling factor is the eigenvalue. This idea underlies PCA, stability analysis, and spectral methods.

Guided checkpoint

Choose the defining relation for a square matrix AA.

02

Find the eigenvalues of a diagonal matrix

For a diagonal matrix, the diagonal entries are its eigenvalues. This makes diagonal matrices the easiest example of spectral structure.

Guided checkpoint

Let A=[2005]A = \begin{bmatrix} 2 & 0 \\ 0 & 5 \end{bmatrix}. Enter the smaller and larger eigenvalue.

03

What is the characteristic polynomial here?

Since AλI=[4λ102λ]A - \lambda I = \begin{bmatrix} 4 - \lambda & 1 \\ 0 & 2 - \lambda \end{bmatrix} is upper triangular, the determinant is the product of its diagonal entries.

Guided checkpoint

Let A=[4102]A = \begin{bmatrix} 4 & 1 \\ 0 & 2 \end{bmatrix}. Choose det(AλI)\det(A - \lambda I).

Section 02

Compute eigenvalues of a symmetric matrix to Evaluate a quadratic form

01

Compute eigenvalues of a symmetric matrix

The characteristic polynomial is (3λ)21=λ26λ+8(3 - \lambda)^2 - 1 = \lambda^2 - 6\lambda + 8, which factors as (λ2)(λ4)(\lambda - 2)(\lambda - 4). Symmetric matrices have real eigenvalues.

Guided checkpoint

Let A=[3113]A = \begin{bmatrix} 3 & 1 \\ 1 & 3 \end{bmatrix}. Enter the smaller and larger eigenvalue.

02

Which vector is an eigenvector for the larger eigenvalue?

Applying AA to (1,1)(1, 1) gives (4,4)=4(1,1)(4, 4) = 4(1, 1). The vector (1,1)(1, -1) instead corresponds to the smaller eigenvalue 22.

Guided checkpoint

Using A=[3113]A = \begin{bmatrix} 3 & 1 \\ 1 & 3 \end{bmatrix} from the previous question, choose an eigenvector for eigenvalue 44.

03

Evaluate a quadratic form

First compute Ax=(4,7)Ax = (4, 7)^\top. Then xAx=(1,2)(4,7)=4+14=18x^\top A x = (1, 2) \cdot (4, 7) = 4 + 14 = 18. Quadratic forms measure curvature and appear in least squares and second-order optimization.

Guided checkpoint

Let A=[2113]A = \begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix} and x=[12]x = \begin{bmatrix} 1 \\ 2 \end{bmatrix}. Compute xAxx^\top A x.

Section 03

What does positive semidefinite mean? to Match each spectral quantity to its role

01

What does positive semidefinite mean?

Positive semidefiniteness means the quadratic form never becomes negative. Covariance matrices and Hessians of convex quadratic objectives are standard PSD matrices in ML.

Guided checkpoint

Choose the defining condition for a symmetric matrix AA.

02

Spectral facts: true or false

The trace and determinant summarize eigenvalues globally, while symmetry gives especially nice orthogonality properties. Not every matrix has a full basis of real eigenvectors.

Guided checkpoint

Mark each statement as true or false.

03

Match each spectral quantity to its role

These quantities connect linear algebra directly to ML: trace and determinant summarize spectra, Rayleigh quotients measure direction-wise curvature, and the top covariance eigenvector defines the first principal component.

Guided checkpoint

Match the term to the correct interpretation.

Section 04

Compute a Rayleigh quotient

01

Compute a Rayleigh quotient

We already know Ax=(4,4)Ax = (4, 4)^\top. So xAx=8x^\top A x = 8 and xx=2x^\top x = 2, giving a Rayleigh quotient of 44. Because xx is an eigenvector, the quotient equals its eigenvalue.

Guided checkpoint

Let A=[3113]A = \begin{bmatrix} 3 & 1 \\ 1 & 3 \end{bmatrix} and x=[11]x = \begin{bmatrix} 1 \\ 1 \end{bmatrix}. Compute xAxxx\frac{x^\top A x}{x^\top x}.

Knowledge check

Turn understanding into recall.

The quiz now follows the same concepts in scored form. You can return to this lesson from the quiz whenever a gap appears.