AI Grounds
Open AI Grounds on a desktop
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
AI Grounds
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
Guided discovery
Rotate an axis; see what one component keeps.
Four fixed 2D points. Rotate a unit direction to keep one signed component per point; reconstructing from it drops perpendicular information. Original points stay fixed. Equal scales preserve the geometry.
● Original p□ Reconstructed q┄ Perpendicular residual p−q→ Unit direction u
Rotate the unit direction 0..180° in five-degree steps. Use the slider or exact number editor; arrows move one step, Home/End reach the bounds. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
Horizontal spread · Angle 0° · u = (1.000000, 0.000000) · Mean Error² 1.000000
Component t = Xux + Yuy (one number). Reconstruction q = tu (two coordinates on the line). Error² = (X−qx)² + (Y−qy)².
| Case | Original (X,Y) | Component t | Reconstructed (X,Y) | Error² |
|---|---|---|---|---|
| P1 | (-4, -1) | -4.000000 | (-4.000000, 0.000000) | 1.000000 |
| P2 | (-2, 1) | -2.000000 | (-2.000000, 0.000000) | 1.000000 |
| P3 | (2, -1) | 2.000000 | (2.000000, 0.000000) | 1.000000 |
| P4 | (4, 1) | 4.000000 | (4.000000, 0.000000) | 1.000000 |
Per-point means: Error² 1.000000 + retained squared length 10.000000 = original squared length 11.000000 (up to floating arithmetic). Divisor: 4 points.
Squared perpendicular reconstruction loss, averaged per point.
1.000
Σ ||p−q||² / 4
Geometric loss; not prediction error or task accuracy.
Squared reconstructed length, averaged per point.
10.000
Σ ||q||² / 4
Depends on the chosen line; not a learned best axis.
Squared original length, averaged per point.
11.000
Σ ||p||² / 4
Fixed when rotating the axis for the same dataset.
The axis is an infinite line through the origin with nonzero unit direction u=(cosθ,sinθ). Its drawn arrow segment indicates orientation, not a finite-segment constraint. Projection uses t=p·u and q=tu; p−q is perpendicular to u. Scalar t and 2D reconstructed q are different objects. Reversing u reverses t and preserves q.
All four originals stay fixed within each named cloud. Per-point mean Error² divides the sum of squared Euclidean residuals by 4, not by 8 coordinates. The orthogonal decomposition gives original squared length = retained squared length + squared residual. Special angles use algebraically equivalent exact outer-product matrix entries; other angles use floating trigonometry. Rounded displays do not define coincidences or zero errors.
One component exactly reconstructs points lying on its origin line; off-line points lose perpendicular information. Coincident reconstructions keep all original IDs in separate table rows. Choosing a line manually is not PCA fitting, centering, eigenvector computation, learned compression or a task-accuracy guarantee. This lesson has no translated line, original-point editor or multiple-component representation. Scenario changes preserve angle; numeric/scenario edits clear stale answers. Prediction changes and Reset restore the current step.
Georgia Tech · Orthogonal projections and residuals