Who the Colors Listen To
After Aligning to the Legend, the Figures Went Dull¶
While revising the grid diagrams for SVD in Mathematics for AI Chapter 8, I first did the thing that looked correct: push every fill toward the front-matter legend.
A became pink.
U and Vᵀ became purple—orthogonal matrices are purple in the legend.
The diagonal of Σ became light green—diagonal matrices are light green there.
Alignment done. The figures suddenly went dull.
The Legend Names Types¶
The legend answers a clean question:
What kind of matrix is this?
Pink: a general rectangular matrix.
Purple: orthogonal.
Green diagonal band: diagonal.
Orange: permutation.
Dark-red gradient: symmetric.
Those colors are book-wide contracts. The decomposition blocks (decomp_*) follow them so a reader does not get lost.
The Grid Figures Still Need Another Layer¶
The four Full / Thin / Compact / Truncated panels do more than report types.
They also need to show:
- the columns of U as left singular vectors
- the rows of Vᵀ as right singular vectors
- the stars on the diagonal of Σ as singular values of different weight
- after truncation, which columns, rows, and diagonal entries disappear
A solid purple block gets the type right and loses the structure story.
Like printing the cover correctly and tearing out the table of contents.
The Compromise¶
The rule that stayed:
| Place | Color | Why |
|---|---|---|
| A | Pink family, cells slightly varied | Still the legend’s “general matrix”; variation so nobody reads every entry as equal |
| U | Purple family, shaded by column | Near legend orthogonal, still readable as column vectors |
| Vᵀ | Purple family, shaded by row | After transpose, right singular vectors lie as rows |
| Σ diagonal | Green family, dark to light | Near legend diagonal, still distinct singular values |
| Σ off-diagonal | White with 0 | Explicit zeros |
I hesitated over random pinks for A.
Uniform pink matches the legend cleanest; once you draw a grid, a flat fill invites the misreading that every value is the same.
So the pinks are scrambled deterministically—varied, but not by row or column, lest A pretend to have U’s or Vᵀ’s structure.
One Principle¶
The legend owns type; within-type shade owns structure.
Block diagrams can listen only to the legend.
Schematics that must teach what moves and what gets cut cannot dunk every same-type block in one bucket of paint.
Aligning colors first is discipline.
Stepping half a step back afterward is so the figure can still speak.