← ~/visualizations

basis-and-dimension

Two-panel visualization: in R^2 it animates from a single-vector span (a line) to two dependent vectors (still a line) to two independent vectors (fills the plane), emphasizing that a basis is a minimal spanning set. In R^3 it shows that two vectors span only a plane while three independent vectors fill space, reinforcing that dim(V) is the number of vectors in any basis. Pointer movement changes the coefficients in p = a·u (+ b·v) to make span(S) feel interactive.

canvasclick to interact
t=0s

practical uses

  • 01.Choosing a minimal set of features/components (basis) to represent all data in a subspace (e.g., PCA)
  • 02.Understanding why you need exactly n independent directions to describe R^n (coordinates, graphics, robotics)
  • 03.Detecting redundancy: dependent vectors don’t add span, so they don’t increase dimension

technical notes

Pure Canvas 2D with a blocky snapped grid (4–8px). Animation cycles through spanning/basis cases in ~4.2s using the provided ease(). A small pointer listener (bound once on the canvas) maps cursor position to coefficients (a,b) to show linear combinations. R^3 is sketched via simple isometric projection and sampled point fills to suggest plane vs volume span.