Orthogonal Projection Interactive Visualizer
Run the Orthogonal Projection Visualizer Fullscreen
Edit the MicroSim with the p5.js editor
About This MicroSim
This visualization demonstrates orthogonal projection of vectors onto lines:
- Projection formula: proj_û(v) = (v·û)û where û is the unit direction vector
- Error vector: The component perpendicular to the line (v - proj(v))
- Orthogonality: The error vector is always perpendicular to the projection line
How to Use
- Drag the vector v (blue) to change its position
- Adjust the line angle to rotate the projection line
- Toggle checkboxes to show/hide error vector, right angle indicator, and formulas
- Click Animate to see the vector oscillate between original and projected positions
Key Concepts
The projection of v onto unit vector û is:
\[\text{proj}_{\hat{\mathbf{u}}}(\mathbf{v}) = (\mathbf{v} \cdot \hat{\mathbf{u}}) \hat{\mathbf{u}}\]
Properties:
- The error vector is perpendicular to the projection line
- Projection is idempotent: projecting twice gives the same result
- The error vector has minimum length among all vectors from v to the line
Embedding
1 | |
Lesson Plan
Learning Objectives
Students will be able to:
- Calculate the projection of a vector onto a line using the dot product formula
- Identify the error vector and verify its orthogonality
- Explain why projection minimizes distance to the subspace
Suggested Activities
- Verify orthogonality: Check that error · projection = 0 for various vectors
- Minimize distance: Show that the projection gives the closest point on the line
- Special cases: What happens when v is parallel or perpendicular to the line?
Assessment Questions
- If v = (4, 3) and the line is the x-axis, what is proj(v)?
- When is the error vector zero?
- How does the projection change as the line rotates?
References
- Chapter 4: Linear Transformations - Projection section
- Chapter 8: Orthogonality (upcoming)