/calculus-geometry-algebra:math-inner-products-svd-and-numerical-realityfrom calculus-geometry-algebra
Covers numerical linear algebra: inner products, orthogonality, Gram-Schmidt, spectral theorem, SVD, matrix factorizations (LU, QR, Cholesky, eigendecomposition), and conditioning — why textbook algorithms differ from library implementations.
Ships in calculus-geometry-algebra. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Part 2 of 6 of the Calculus, Geometry and Algebra reference (plugin
calculus-geometry-algebra), covering §5–§8. Sibling skills:math-linear-algebra-foundations(§0–§4),math-calculus-and-vector-calculus(§9–§13),math-forms-optimization-and-differential-equations(§14–§16),math-geometry-manifolds-tensors-and-lie-groups(§17–§21),math-reference(§22–§26). Section numbers are shared across the set; a reference written as §N →skillpoints into that sibling skill.Currency: Permanently settled — Newton and Leibniz in the 1670s, Gauss and Cauchy in the 1820s, Grassmann 1844, Riemann 1854, Ricci-Curbastro in the 1890s, Cartan 1899, Eckart-Young 1936.
How to read this. Three connected parts: linear algebra (§1–§8 →
math-linear-algebra-foundations), calculus (§9–§16 →math-calculus-and-vector-calculus,math-forms-optimization-and-differential-equations), geometry and tensors (§17–§21 →math-geometry-manifolds-tensors-and-lie-groups). ⚠️ They are far more connected than standard curricula suggest, and the connections are where the understanding is.⚠️ GOTCHA boxes mark places where standard teaching creates a misconception.
The three unifying ideas:
- ⚠️ The derivative is the best linear approximation. Not a slope, not a limit of quotients — those are how you compute it in one dimension. Once you see it as a linear map, the multivariable chain rule, the Jacobian, and manifolds all become obvious (§9.2 →
math-calculus-and-vector-calculus).- ⚠️ Linear algebra is about maps, not arrays. A matrix is a representation of a linear map in a chosen basis. Eigenvectors, determinants, and SVD are all basis-independent facts about the map that the array happens to encode (§2 →
math-linear-algebra-foundations).- ⚠️ Green's, Stokes', and the divergence theorem are one theorem. They're the generalized Stokes theorem
∫_∂M ω = ∫_M dωin different dimensions. Learning them as three unrelated formulas is the single biggest missed opportunity in the standard sequence (§14 →math-forms-optimization-and-differential-equations).
Inner product ⟨u,v⟩ — gives length ‖v‖ = √⟨v,v⟩ and angle cos θ = ⟨u,v⟩/(‖u‖‖v‖).
⚠️ Geometry enters linear algebra here and not before. A vector space has no notion of
length or angle until you choose an inner product.
Orthonormal bases are the good ones: ⚠️ coefficients are just inner products,
v = Σ⟨v,eᵢ⟩eᵢ, with no linear system to solve.
Gram-Schmidt constructs them — ⚠️ and classical Gram-Schmidt is numerically unstable;
use modified Gram-Schmidt or Householder (§7).
Projection onto a subspace: P = A(AᵀA)⁻¹Aᵀ.
⚠️ Least squares is projection. Ax = b with no solution → project b onto C(A):
Normal equations: AᵀAx̂ = Aᵀb
⚠️ But do not solve the normal equations numerically — forming AᵀA squares the
condition number (§8). Use QR or SVD.
⚠️ The residual is orthogonal to the column space, and that's the entire geometric
content of least squares.
Orthogonal matrices QᵀQ = I — ⚠️ preserve lengths and angles, det = ±1, and are
perfectly conditioned. This is why numerical algorithms are built from them.
⚠️ Spectral theorem: a real symmetric matrix has real eigenvalues and an
orthonormal eigenbasis — A = QΛQᵀ. (Hermitian in the complex case.)
⚠️ This is why symmetric matrices are so much better behaved, and why covariance
matrices, Hessians, and Laplacians — all symmetric — are tractable.
Positive definite: all eigenvalues > 0. ⚠️ Equivalently xᵀAx > 0 for all x ≠ 0,
equivalently it has a Cholesky factorization (§7).
A = UΣVᵀ U (m×m) orthogonal, Σ (m×n) diagonal ≥0, V (n×n) orthogonal
⚠️ GOTCHA — SVD exists for EVERY matrix. ⚠️ Any shape, any rank, real or complex, no symmetry or invertibility required. Eigendecomposition needs square and often fails; SVD never does. If you learned eigendecomposition as the fundamental factorization, that's backwards — SVD is.
⚠️ What it says geometrically: every linear map is a rotation, then an axis-aligned scaling, then another rotation. That's all any linear map does.
What it gives you:
Rank ⚠️ number of nonzero singular values — the RELIABLE rank test
Four subspaces ⚠️ orthonormal bases for all of §2, directly
Condition number κ = σ_max/σ_min (§8)
Pseudoinverse A⁺ = VΣ⁺Uᵀ ⚠️ solves least squares even for rank-deficient A
‖A‖₂ = σ_max ‖A‖_F = √(Σσᵢ²)
Best rank-k approximation ⚠️ Eckart-Young: truncate to the top k singular values.
OPTIMAL in both the 2-norm and Frobenius norm
⚠️ Eckart-Young is the theorem behind an enormous amount of practice: PCA (⚠️ SVD of centred data), low-rank approximation, image compression, latent semantic analysis, recommender systems, and model compression. "Take the top k components" is always this theorem.
⚠️ Relation to eigendecomposition: singular values of A are square roots of
eigenvalues of AᵀA; V holds its eigenvectors. ⚠️ But computing SVD that way
squares the condition number — real algorithms (Golub-Kahan) never form AᵀA.
| Factorization | Form | ⚠️ Use |
|---|---|---|
| LU (with pivoting) | PA = LU | ⚠️ Solving Ax=b; the workhorse. O(n³/3) |
| Cholesky | A = LLᵀ | ⚠️ Symmetric positive definite; twice as fast as LU |
| QR | A = QR | ⚠️ Least squares, stably. Householder or Givens |
| Eigendecomposition | A = PDP⁻¹ | Dynamics, powers; ⚠️ may not exist |
| Schur | A = QTQ* | ⚠️ Always exists, numerically stable — the practical alternative to Jordan |
| SVD | A = UΣVᵀ | ⚠️ Always exists; everything in §6.1 |
| Jordan | A = PJP⁻¹ | ⚠️ Theory only — numerically unstable |
Iterative methods for large sparse systems: Conjugate Gradient (⚠️ SPD only, and Krylov-subspace based), GMRES, BiCGSTAB; Lanczos and Arnoldi for eigenvalues; ⚠️ preconditioning is usually what determines whether these converge in practice, and it matters more than the choice of solver. Randomized SVD — ⚠️ for very large low-rank problems, and it works remarkably well.
Condition number κ(A) = σ_max/σ_min — ⚠️ how much relative input error is
amplified.
κ ≈ 1 well conditioned
κ ≈ 10ᵏ ⚠️ expect to lose about k digits of accuracy
κ = ∞ singular
⚠️ Double precision gives ~16 digits, so κ > 10¹⁶ means no correct digits remain.
⚠️ GOTCHA — conditioning is a property of the PROBLEM; stability is a property of the ALGORITHM. ⚠️ A backward-stable algorithm on an ill-conditioned problem still gives a bad answer, and that is not the algorithm's fault. You cannot fix ill-conditioning with better code — you must reformulate the problem.
⚠️ The specific things not to do, all of which follow from the above:
AᵀA (§5) — ⚠️ it squares κ. Use QR or SVD.Ax = b — ⚠️ solve the system. Inversion is slower
and less accurate.det = 0 for singularity (§3 → math-linear-algebra-foundations) — use σ_min or κ.What SKILL.md sets; muted values are Claude Code's defaults
6 skills in this plugin
/math-calculus-and-vector-calculusUse when doing calculus rather than reading it: limits and continuity and what the derivative actually is as a linear approximation, integration and its several distinct meanings, series and Taylor approximation with convergence and truncation error, multivariable calculus including gradients, Jacobians and Hessians, and vector calculus with divergence, curl and the integral theorems./math-forms-optimization-and-differential-equationsUse when the problem needs the more structural tools: differential forms and the exterior derivative as the framework that unifies the vector calculus integral theorems, constrained optimization with Lagrange multipliers and the KKT conditions, and differential equations — the solution methods, classification, and what makes a system stiff or stable.Other plugins' skills for the same job
/math-geometry-manifolds-tensors-and-lie-groupsUse when working in curved or structured spaces: geometry including projective and affine settings, manifolds and charts, tensors done properly rather than as multidimensional arrays, Riemannian geometry with metrics, connections, geodesics and curvature, and Lie groups and Lie algebras including the rotation groups that show up in robotics, graphics and physics.npx claudepluginhub the-vibey-project/vibey --plugin calculus-geometry-algebra