1. Home
  2. Steve Brunton

Jan 18, 2020

How singular value decomposition ranks patterns in any dataset

12 min → 2:08

Overview

Steve Brunton introduces Singular Value Decomposition as a foundational tool in numerical linear algebra, explaining how to structure and decompose data matrices using examples like human faces and fluid flow snapshots.

3 things to know

Brunton says SVD splits one matrix into three multiplied matrices

Steve Brunton explains that the Singular Value Decomposition equation breaks a matrix X into the product of three matrices, written as X equals U times Sigma times V transpose.

▶ Watch at 3:06

Brunton: U matrix columns capture the main data patterns

Steve Brunton explains that the columns of the orthogonal U matrix act as ordered modes, such as eigenfaces, that capture the main patterns in the data.

▶ Watch at 5:01

Brunton says larger Sigma values mean more important patterns

Steve Brunton explains that the diagonal Sigma matrix orders its non-negative values from largest to smallest, with each value's size showing the importance of its matching mode in U and V.

More

The magnitude of each singular value corresponds to the importance of its associated mode in U and V.

▶ Watch at 0:08

Also in this episode

Brunton says V matrix columns combine patterns to rebuild X

Steve Brunton explains that the columns of the orthogonal V matrix show how to combine the main modes in U to rebuild the original columns of X, and represent each mode's behavior over time in time-series data.

More

Its columns (or the rows of Vᵀ) describe how the principal modes in U are combined to reconstruct the original columns of X. In time-series data, they represent the temporal behavior of each mode.

Brunton: A data matrix turns each image into one column

Steve Brunton explains that a data matrix X stores each high-dimensional data point as a single column by reshaping an image's pixel grid into one tall vector.

More

For an image, this involves reshaping the pixel grid into a single tall vector.

Brunton says U and V transposes equal their inverses

Steve Brunton notes that the orthogonal U and V matrices have mutually perpendicular columns of unit length, meaning their transpose is equal to their inverse.

More

The U and V matrices are orthogonal, meaning their columns are orthonormal (mutually perpendicular and have a unit length).

Quotes

“We're talking about the Singular Value Decomposition, which is one of the most useful matrix decompositions in numerical linear algebra.”

▶ Watch at 0:08

“in this face example, these would be my 'eigenfaces'.”

▶ Watch at 5:01

“we're going to have this equals U times Sigma times V transpose.”

▶ Watch at 3:06

Full summary

Episode Overview

  • The Singular Value Decomposition (SVD) is introduced as a foundational and highly useful tool in numerical linear algebra for decomposing a data matrix.
  • The episode explains how to structure a data matrix, X, by organizing individual data points (like images or time-series measurements) into column vectors.
  • Two primary examples are used to illustrate the construction of the data matrix: a library of human faces and a time series of fluid flow snapshots.
  • The core SVD equation, X = UΣVᵀ, is presented, along with a high-level overview of the properties and interpretations of the resulting U, Σ, and V matrices.

Key Concepts

  • Data Matrix (X): A matrix where each column represents a single high-dimensional data point. For an image, this involves reshaping the pixel grid into a single tall vector.
  • SVD Equation: The decomposition of a matrix X into the product of three matrices: X = UΣVᵀ.
  • U Matrix (Left Singular Vectors): An orthogonal matrix whose columns form a basis for the column space of X. These columns are hierarchical modes (e.g., "eigenfaces") that capture the primary patterns in the data.
  • Σ (Sigma) Matrix (Singular Values): A rectangular diagonal matrix containing non-negative singular values (σ) ordered from largest to smallest. The magnitude of each singular value corresponds to the importance of its associated mode in U and V.
  • V Matrix (Right Singular Vectors): An orthogonal matrix. Its columns (or the rows of Vᵀ) describe how the principal modes in U are combined to reconstruct the original columns of X. In time-series data, they represent the temporal behavior of each mode.
  • Orthogonal/Unitary Matrices: The U and V matrices are orthogonal, meaning their columns are orthonormal (mutually perpendicular and have a unit length). A key property is that their transpose is equal to their inverse (e.g., UᵀU = I).

Quotes

  • At 00:08 - "We're talking about the Singular Value Decomposition, which is one of the most useful matrix decompositions in numerical linear algebra." - The speaker emphasizes the fundamental importance of SVD from the outset.
  • At 03:06 - "we're going to have this equals U times Sigma times V transpose." - A clear and direct statement of the core SVD equation.
  • At 05:01 - "in this face example, these would be my 'eigenfaces'." - The speaker provides an intuitive name for the columns of the U matrix, highlighting their role as fundamental building blocks or patterns within the dataset.

Takeaways

  • To apply SVD, organize your dataset into a matrix X where each column is a single flattened data sample (e.g., a vectorized image or a measurement at a specific time).
  • The SVD equation X = UΣVᵀ breaks down the data matrix into three components: spatial modes (U), their importance or energy (Σ), and their temporal behavior or mixture coefficients (V).
  • The singular values in the Σ matrix are ordered by magnitude, providing a natural hierarchy of importance. This allows for data compression and approximation by keeping only the most significant modes.
  • SVD is a robust and universally applicable technique that is guaranteed to exist for any matrix and is readily available in standard numerical software like MATLAB or Python.

Watch the full episode 12 min

Read along with the audio summary

Can you take a massive library of human faces and break it down into its primary patterns? The speaker raises this possibility using the Singular Value Decomposition, or S V D, one of the most useful matrix decompositions in numerical linear algebra. In this episode from January 18, 2020, the speaker walks through how this foundational tool works.

Turn complex images into a simple table of numbers. A single picture is actually a grid of pixels, which can be reshaped into one tall column vector. By lining up a library of human faces side by side, each as its own column, you build a complete data matrix called X.

Once you have that matrix, you can break it into three distinct pieces. As the speaker explains, X equals U times Sigma times V transpose.

Find the foundational building blocks hidden in your data. The first piece, the U matrix, contains left singular vectors. These columns are hierarchical modes that capture primary patterns, which in the face example, the speaker calls eigenfaces.

Rank your patterns from most to least important. The middle piece, Sigma, is a rectangular diagonal matrix containing non negative numbers called singular values. The size of each value tells you the exact importance of its matching mode in U and V.

See how those patterns mix together. The V matrix holds right singular vectors. Its columns show how the principal modes in U combine to reconstruct the original columns of X.

Keep your math clean with perpendicular columns. Both the U and V matrices are orthogonal, meaning their columns are mutually perpendicular and have a unit length of one. Because of this property, U transpose times U equals the identity matrix.

S V D breaks any data matrix into spatial modes, their ordered importance, and their mixture coefficients. It is guaranteed to exist for any matrix and is readily available in standard numerical software like MATLAB or Python.

More from Steve Brunton

Related Episodes