Visual walkthrough — Explained variance and choosing components
This page rebuilds the central result of Explained variance and choosing components from absolute zero, one picture at a time. By the end you will see why one number — an eigenvalue — is the same thing as "spread along a direction", and why adding those numbers up tells you how many directions to keep.
We assume nothing. If a symbol appears, it was drawn first.
Step 1 — Draw the data as a centered cloud
WHAT. We start with a table of measurements. Every row is one data point (say, one person); every column is one feature (height, weight). Two columns means every point is a dot on a flat plane. We call this table and give it rows and columns.
WHY. Before we can talk about "spread", every quantity must be measured from the middle of the cloud, not from an arbitrary zero. So we center: subtract each column's average so the cloud sits centered on the origin. Centering is what lets a single squared distance stand for "how far from typical".
PICTURE. The blue dots are the raw cloud; the pink dots are the same cloud slid so its center of mass lands on the crossing of the axes.

Step 2 — Measure spread along the axes (variance)
WHAT. Pick one column . Take each point's value, square it, average the squares. That average of squared distances-from-center is the variance of that column.
WHY squared, why not just distance? Squaring does two jobs at once: it kills the sign (left and right both count as spread), and it punishes far-out points more, so variance genuinely tracks width. The turns a sum into a per-point average so bigger datasets don't automatically look "more spread".
PICTURE. Each dashed segment is one point's distance from center along the horizontal axis; the shaded bar area is the average of the squares of those segments.

Step 3 — Spread depends on which direction you look
WHAT. Variance was measured along the given axes. But nothing forces us to look along the original axes. Choose any direction — call it a unit-length arrow — and slide every dot onto that arrow (its shadow / projection). Those shadows have their own variance.
WHY. The original axes are an accident of how the data was recorded. The cloud is often widest along a tilted line. If we want the directions that carry the most spread, we must be free to rotate our "measuring stick" .
PICTURE. The same cloud measured two ways: along a poor direction (thin shadow spread, small variance) and along the cloud's long diagonal (fat shadow spread, large variance).

Step 4 — The variance of a shadow is
WHAT. We compute the variance of the shadow list . Because shadows are already centered (centered cloud → centered shadows), variance is average of squared shadow-positions:
WHY. is "sum of squared shadows" written compactly (a dot product of the shadow list with itself). Factoring out from both sides reveals a single object in the middle that does not depend on — the covariance matrix . This is the whole reason exists: it is the "spread machine" that, sandwiched between any direction , returns the spread along that direction.
PICTURE. A box labelled with going in one side and the spread number coming out the other; turning the input arrow rotates the shadow and changes the output.

Step 5 — Eigenvectors are the special directions, eigenvalues ARE their spread
WHAT. Among all directions , the special ones are the eigenvectors: directions the spread-machine does not rotate. Feeding an eigenvector into gives back the same direction, only stretched by a number :
Plug this into Step 4's formula:
WHY this is the punchline. The spread along an eigenvector is exactly its eigenvalue — no extra computation. The last "" uses that eigenvectors are unit length. So the abstract number that pops out of linear algebra is a concrete physical thing: the variance the data has along principal component . (These same are the squared singular values you meet in Singular Value Decomposition (SVD).)
PICTURE. Two eigenvector arrows on the cloud; each labelled with its own eigenvalue, the arrow's length drawn proportional to so the long axis literally is the big eigenvalue.

Recall Why does
? Because principal components are chosen to be unit-length arrows (length one). Dotting a unit arrow with itself gives its squared length . If we forgot to normalize, the "" would become the arrow's squared length and the neat result would be scaled — that is exactly the bug to avoid.
Step 6 — Total spread = sum of ALL eigenvalues
WHAT. Add every column's variance (the diagonal of ) — that is the total spread from Step 2. A linear-algebra identity says the diagonal-sum (trace) equals the eigenvalue-sum:
WHY. Rotating your measuring axes to the eigenvector directions does not create or destroy spread — it only re-labels it. So the total is the same whether you sum along the original axes or along the eigenvectors. This gives us the one missing piece: a denominator.
PICTURE. A single bar of total length split into slices, one per eigenvalue — the whole bar is the total variance, each slice one .

Step 7 — Divide: explained-variance ratio and its cumulative sum
WHAT. Now the definition writes itself. The fraction of spread carried by component is its slice over the whole bar:
WHY division and not subtraction? A ratio is scale-free: it answers "what fraction of the information do I keep?" regardless of the data's units. climbs from near toward as you add components; picking is reading off where that climb crosses your target line (say ). This is the same curve you plot in a Scree Plot.
PICTURE. The staircase: eigenvalue slices on the left, the cumulative curve on the right climbing to a horizontal threshold, with the crossing marked.

Step 8 — Edge and degenerate cases
Every scenario must be covered, or the reader hits a wall you didn't build.
Case A — a zero eigenvalue (). Some direction has no spread; every point has the same shadow there. That component contributes and can be dropped with zero loss. This is exactly a redundant / perfectly-correlated feature.
Case B — all eigenvalues equal (). The cloud is a perfectly round ball. No direction is special, for all , and the cumulative curve is a straight diagonal line. Here PCA gives you nothing — you must keep almost all components to hit . That flatness is the warning sign.
Case C — one dominant eigenvalue. The cloud is a thin needle. is near , the curve jumps to the top in one step, and a single component suffices.
PICTURE. Three little clouds (flat needle / round ball / general) each with its cumulative curve underneath — steep jump, straight diagonal, moderate knee.

The one-picture summary

This single figure chains the whole argument: centered cloud → measure spread along a rotating arrow → the spread-machine → its no-rotate directions carry spread for free → stack the into a total → divide to get the cumulative curve → read off at your threshold. That is Dimensionality Reduction made into one honest number.
Recall Feynman retelling — say it like you'd tell a friend
Toss a handful of dots on a table. They make a blob that's fatter one way than another. "Variance" is just: pick a direction, look at how spread out the dots are along it — square the distances so left and right both count, average them. Now here's the trick: there's a little machine (the covariance matrix) where you push in a direction-arrow and it hands you back the spread along that arrow. Most arrows get twisted by the machine, but a few special arrows come back pointing the exact same way, only longer — those are the principal directions, and the amount they got stretched (the eigenvalue) is the spread along them. Add up all those stretch-numbers and you've got the total spread. So each direction's share is its stretch-number divided by the total. Line them up biggest-first, keep adding shares until you've collected 95% of the total, and stop — the number of arrows you grabbed is how many dimensions you keep. Flat blob? Almost every arrow matters, keep lots. Needle blob? One arrow has it all, keep one.
Recall Rebuild the chain from memory
equals? ::: Var along eigenvector equals? ::: Total variance equals? ::: When is the cumulative curve a straight diagonal? ::: all eigenvalues equal (a round cloud) A zero eigenvalue means? ::: a direction with no spread — drop it for free