Orthonormal Basis Coordinate Finder
Run the Orthonormal Basis Coordinate Finder Fullscreen
Edit the MicroSim in the p5.js Editor
About This MicroSim
This visualization demonstrates the remarkable simplicity of finding coordinates when using an orthonormal basis. Instead of solving a system of equations, coordinates are simply inner products!
Learning Objective: Demonstrate how orthonormal bases simplify finding coordinates via inner products: \(c_i = \langle v, q_i \rangle\)
Key Features
- Draggable Vector: Move the target vector v to see coordinates update instantly
- Adjustable Basis: Rotate the orthonormal basis to any angle
- Projection Visualization: See how projections give the coordinates
- Parseval's Identity: Verify that energy (norm squared) is preserved
- Standard Basis Comparison: Toggle to compare with standard coordinates
The Mathematics
Coordinates as Inner Products
For an orthonormal basis \(\{q_1, q_2\}\), the coordinates of any vector \(v\) are:
This works because: \(\(v = c_1 q_1 + c_2 q_2\)\)
Taking the inner product with \(q_1\): \(\(\langle v, q_1 \rangle = c_1 \langle q_1, q_1 \rangle + c_2 \langle q_2, q_1 \rangle = c_1 \cdot 1 + c_2 \cdot 0 = c_1\)\)
Parseval's Identity
For orthonormal bases, the norm is preserved: \(\(\|v\|^2 = c_1^2 + c_2^2\)\)
This means the "energy" of the vector equals the sum of squared coordinates.
Computational Advantage
| Method | For Orthonormal Basis | For General Basis |
|---|---|---|
| Find coordinates | 2 dot products | Solve 2x2 system |
| Complexity | O(n) | O(n^2) to O(n^3) |
| Numerical stability | Excellent | Depends on condition |
How to Use
- Drag the vector v (green) to change the target vector
- Drag the q1 endpoint (red) to rotate the orthonormal basis
- Use the angle slider for precise basis angles
- Toggle Show Projections to see projection lines
- Toggle Compare to Standard Basis to see both coordinate systems
Visual Elements
| Element | Color | Meaning |
|---|---|---|
| q1, q2 | Red, Blue | Orthonormal basis vectors |
| v | Green | Target vector |
| Projection lines | Orange (dashed) | Perpendicular projections |
| c1, c2 labels | Orange | Coordinate values |
| e1, e2 | Gray (dashed) | Standard basis (when enabled) |
Learning Activities
Activity 1: Verify the Formula (5 minutes)
- Set v = (3, 2) and basis angle = 45 degrees
- Manually calculate: \(c_1 = 3 \cdot \cos(45) + 2 \cdot \sin(45)\)
- Compare with the displayed c1 value
- Verify the reconstruction: \(c_1 q_1 + c_2 q_2 = v\)
Activity 2: Explore Parseval's Identity (5 minutes)
- Note that \(\|v\|^2 = v_x^2 + v_y^2\) in standard coordinates
- Rotate the basis to different angles
- Observe that \(c_1^2 + c_2^2\) always equals \(\|v\|^2\)
- This works because orthonormal bases preserve length!
Activity 3: Compare with Standard Basis (5 minutes)
- Enable "Compare to Standard Basis"
- At 0 degrees: orthonormal and standard bases align
- Notice coordinates match when bases align
- At other angles: different coordinates, same vector!
Activity 4: Special Angles (10 minutes)
Find vectors where coordinates become nice numbers:
- At 45 degrees, find a vector with c1 = c2
- Find a vector where c2 = 0 (lies along q1)
- Find a vector where c1 = 0 (lies along q2)
Discussion Questions
- Why does the formula \(c_i = \langle v, q_i \rangle\) only work for orthonormal bases?
- What would happen if we tried this formula with a non-orthonormal basis?
- Why is computational efficiency important for high-dimensional spaces?
- How does this relate to Fourier analysis (representing signals as sums of sines and cosines)?
Connection to Other Topics
- Fourier Transform: Sines and cosines form an orthonormal basis for functions
- Principal Component Analysis: Uses orthonormal eigenvectors
- Quantum Mechanics: States expressed in orthonormal bases of observables
- Signal Processing: Orthogonal wavelets for compression
Prerequisites
- Understanding of basis and coordinates
- Inner product (dot product)
- Projection of vectors
References
- Chapter 8: Vector Spaces and Inner Products - Orthonormal Bases section
- Chapter 7: Matrix Decompositions - QR Decomposition
- 3Blue1Brown: Change of basis
- Strang, G. (2016). Introduction to Linear Algebra (5th ed.). Section 4.4.