Sitemap
Mathcube

Mathcube

Blogging about math, physics, and programming.

Member-only story

SVD: How a Photo Hides Inside 20 Patterns

The singular value decomposition — the workhorse behind image compression and recommenders — read off a single face.

11 min readJul 6, 2026

--

Press enter or click to view image in full size

A photograph of a face, stored at a modest one thousand pixels on a side, is a million numbers. Each number is the brightness of a single point of light, and to a computer the picture is nothing more than that — a featureless grid of intensities, a million of them, in no particular order. Yet show a person a deliberately impoverished version of that photo, built from only a handful of broad recurring patterns instead of the full million pixels, and something strange happens long before the picture is complete. The face is still a smudge; the eyes are barely suggested. And the brain says: oh, it’s a cat. Or a man in glasses. Or whoever it is. The tool that finds those patterns is the singular value decomposition — SVD for short — and image compression is its most vivid demonstration.

Press enter or click to view image in full size
Portrait throughout: Rear Admiral Grace M. Hopper, U.S. Navy. Public domain (U.S. Naval History and Heritage Command), via matplotlib’s sample data.

The threshold is remarkably low. In typical demonstrations a few dozen patterns are often enough — sometimes as few as twenty, depending on the image and the eye reading it — for the picture to cross from…

--

--

Mathcube
Mathcube

Written by Mathcube

Blogging about math, physics, and programming.