A page for seeing where the entries of a matrix product come from. Type a product such as B^T Sigma B, click an entry of the result, and it expands into the products of entries that add up to it, which you can also play back one term at a time.
Open the visualizer →
Six views go with the product:
- Trace: tr(BᵀΣB) as one quadratic form per column of B, and the chain tr(BᵀΣB) ≤ κmax·tr(BᵀB) = κmax·r, with how close each column comes to its bound.
- Identities: which of BᵀB = I, tr(BᵀB) = r and BBᵀ·BBᵀ = BBᵀ still hold as B switches between orthonormal, unit-length and fully random columns.
- Quadratic form: drag a unit vector v and watch vᵀΣv move between the smallest and largest eigenvalues of Σ, as a weighted average of them.
- Order of averaging: averaging ‖Bᵀφ(s)‖² over s with B fixed tends to tr(BᵀΣB), while choosing the worst B for each s tends to tr(Σ).
- Operator norm: the singular values of any matrix on the page next to its eigenvalues and the stretch ‖Mx‖ of random unit vectors. For a 2×2 matrix, drag x around the unit circle and watch Mx trace the ellipse whose axes are σ₁ and σ₂; a shear shows how far the operator norm can exceed every |λ|.
- TD learning: the matrix A = Φᵀ D (I − γP) Φ of TD(0) on a random sparse chain, swept over the number of features d. With isotropic features (ΦᵀDΦ = I), ‖A‖₂ ≤ 1 + γ and every singular value is at least 1 − γ for every d, while a single sample φ(s)(φ(s) − γφ(s′))ᵀ grows like d; with correlated features ‖A‖₂ grows with d.
Matrices can be created as transition matrices, covariance matrices, orthonormal columns or probability vectors; edited, resized, symmetrized, orthonormalized, scaled to unit-length rows or columns or to rows that sum to 1; or pasted in. The whole state is kept in the URL, so a link reopens the same view. Everything runs in the browser; a self-test at the bottom of the page rechecks the expansions, the QR, eigenvalue and singular value decompositions, the TD bounds, and the color contrast after every change.