Linear Algebra — Interactive Explainers

Fundamentals of AI/ML · Prof. Parikshit Pareek & Prof. Jitin Singla · IIT Roorkee
P-squared Lab logo
Integral Lab logo

Six standalone, fully offline visualizers accompanying the Linear Algebra module. Each opens in any browser with a double-click — no internet, no installation. Drag, click, and slide; every number on screen is computed live from the same formulas derived in lecture.

Explainer 1

p Unit Balls

Slide p and watch the unit ball morph from diamond (ℓ₁) through circle (ℓ₂) to square (ℓ∞). See why ℓ₁ corners produce sparsity, and what breaks when p < 1.

NormsLASSO vs Ridge
Open →
Explainer 2

Cosine Similarity

Drag two vectors and read xᵀy, the angle, and cos θ live. Presets for aligned, orthogonal, and opposite pairs — the geometry behind embeddings and retrieval.

Inner productsCauchy–Schwarz
Open →
Explainer 3

Least Squares Line Fitting

Click to add points; the OLS line, residuals, and the live XᵀX, Xᵀy, β̂ panels update instantly. Presets show the R² trap and how one outlier swings the fit.

ProjectionNormal equations
Open →
Explainer 4

Eigenvectors as Fixed Directions

Drag v and watch Av. On the eigen-lines, Av stays put — off them, it rotates away. Edit the matrix, try shear and rotation, and run power iteration to find the dominant eigenvector.

EigenvaluesPower iteration
Open →
Explainer 5

Rotate · Scale · Rotate

Animate A = UΛUᵀ step by step: the unit circle rotates into the eigen-frame, stretches along the axes, and rotates back into a tilted ellipse. The spectral theorem, in motion.

DiagonalizationSpectral theorem
Open →
Explainer 6

PCA Playground

Click to build a dataset; the covariance matrix, eigenvalues, principal components, and explained-variance bars react live. Toggle projections and reconstruction to see what 1-D keeps and loses.

CovariancePCA & EVR
Open →
Using these in class or at home: keep the relevant explainer open beside your notes; every quantity shown (covariance entries, eigenvalues, cos θ, β̂) matches the notation used in the lecture notes, so you can verify the worked examples by clicking the matching preset buttons.