Open Agent School · Public worked example

Singular value decomposition: meaning and example

Welcome! Take one idea with you today.

Singular value decomposition factors a matrix into input directions, nonnegative strengths, and output directions. Unlike ordinary eigenvector decomposition, it works for rectangular matrices too.

Picture it: A matrix with rows [4, 0] and [0, 1] has singular values 4 and 1. Keeping only the strongest component reconstructs [4, 0; 0, 0]. One squared unit of entrywise reconstruction error remains because the bottom-right 1 was discarded.

What is easy to mix up?

It loses information. Small-variance details can still be crucial for a rare class, a safety condition, or a downstream task.

Teaching example by Open Agent School. Source: NumPy: Singular Value Decomposition.