Lab: Vector Playground
One number tells you: line or plane?
What you will do
- The determinant decides independence
- A zero determinant collapses the span
- The angle between two vectors
- Projection divides by the square
Interactive pages for this course. Every number on them is computed in your browser — nothing is a recorded animation, and nothing calls out to a server.
One number tells you: line or plane?
Drag a matrix, watch the plane move
One check tells you: one, none, or infinitely many?
Which directions does a matrix leave alone?
How do you drop a vector straight down onto a subspace?
How can a stack of pure sine waves rebuild a sharp square wave?
Take a matrix apart, keep only what matters
Walk downhill on a quadratic
When does a matrix amplify the errors you feed it?
Keep the few directions your data actually uses
Three ML primitives, one arithmetic
Reduce first, then model
Drag two vectors and watch their sum, dot product, angle and projection update live; the determinant decides whether their span is a line or the whole plane.
Drag a vector and watch the basis and the determinant follow. Eigenvectors emerge as the directions that do not turn.
Set a 2×2 matrix and watch its characteristic polynomial, eigenvalues and eigenvectors compute live; rotate a unit vector and see its image land parallel to itself only along an eigen-line, while a negative discriminant means a complex pair and no real eigen-direction.
Type a 2×2 or 3×3 system A x = b and watch Gaussian elimination with partial pivoting run to row echelon form, the determinant appear as the product of the pivots, and the system classified as one solution, none, or infinitely many — with the two lines drawn for the 2×2 case.
Move a rank slider and watch an image rebuild itself one singular value at a time, with the retained energy computed at every rank.
Orthonormalize two vectors with Gram–Schmidt, project a vector onto the span with its orthogonal residual, and fit a line by least squares — every basis vector, projection, residual and coefficient computed from the normal equations, with the residual shown orthogonal to the column space.
Rebuild a periodic waveform (square, sawtooth, triangle, pulse) from its Fourier harmonics, with each coefficient computed as an inner product of the function with a sine or cosine — the series as an orthogonal projection. Watch the RMS error fall as terms are added, the orthogonality table sit at zero off the diagonal, and the ~9% Gibbs overshoot at a jump narrow but never shrink.
Set a 2×2 or 3×3 matrix and watch the numerics: the condition number κ = σmax/σmin computed by power and inverse-power iteration on AᵀA, the image ellipse whose axis ratio is κ, Jacobi and Gauss–Seidel with their convergence trace and the spectral radius that decides convergence, and how ill-conditioning amplifies a perturbation of b within the κ bound.