Orthogonality
Orthogonal projections, bases, and distances
Orthogonalization
Projections & Decompositions
Distance Geometry
💡 Need Help?
- • Enter fractions like
1/2 - • Use decimals like
0.5 - • Click "Load Example" to try a preset
- • Click any step to copy LaTeX
Orthonormal Basis Calculator
An orthonormal basis consists of unit vectors that are mutually perpendicular. This solver uses the Gram-Schmidt process to convert any set of linearly independent vectors into an orthonormal basis that spans the same subspace.
📑 Quick Navigation
What is an Orthonormal Basis?
An orthonormal basis is a set of vectors that is both:
1. Orthogonal
Every pair of distinct vectors is perpendicular:
2. Normalized (Unit Length)
Each vector has length exactly 1:
💡 Key Insight: An orthonormal basis is like a "perfect coordinate system" where axes are perpendicular and unit length—just like the standard x, y, z axes!
Example: Standard Basis in ℝ³
Check: e₁·e₂ = 0, ‖e₁‖ = 1, etc. ✓ This is an orthonormal basis!
Why Orthonormal Basis Matters
✅ Makes Computation Simple
In an orthonormal basis, coordinates are found using dot products:
No need to solve linear systems!
✅ Preserves Length and Angles
When using an orthonormal basis, dot products (and therefore lengths and angles) are computed the same way as in standard coordinates.
✅ Orthogonal Matrices
If you arrange orthonormal vectors as columns of a matrix Q, then:
This means Q⁻¹ = Qᵀ — incredibly useful!
✅ Simplifies Projections
Projecting onto a subspace with orthonormal basis is just:
🎯 Bottom Line: Orthonormal bases are the "gold standard" for linear algebra computations—they make everything easier, more stable, and more intuitive!
How to Find an Orthonormal Basis
The Two-Step Process
Step 1: Orthogonalize
Use the Gram-Schmidt process to convert the original vectors into an orthogonal set.
Step 2: Normalize
Divide each orthogonal vector by its length to make it unit length.
The resulting vectors {e₁, e₂, ..., eₖ} form an orthonormal basis for the same subspace!
📐 Important: The number of vectors in the orthonormal basis equals the dimension of the subspace spanned by the original vectors. If the original vectors are linearly dependent, the basis will have fewer vectors.
The Gram-Schmidt Process (Detailed)
The Gram-Schmidt process is the standard algorithm for finding an orthonormal basis. Here's how it works step by step:
Given vectors v₁, v₂, v₃:
Step 1: Start with the first vector
Step 2: Subtract the projection of v₂ onto u₁
Step 3: Subtract projections of v₃ onto u₁ and u₂
Step 4: Normalize each uᵢ to get eᵢ
💡 Modified Gram-Schmidt: For better numerical stability, you can subtract projections immediately after computing each uᵢ. Our calculator uses this approach!
Verifying Orthonormality
Once you have a candidate basis, check these two conditions:
✓ Orthogonality Check
For all i ≠ j:
This ensures all axes are perpendicular.
✓ Normalization Check
For all i:
This ensures each vector has unit length.
Matrix Verification
If you form a matrix Q with orthonormal columns:
This is the defining property of orthogonal matrices!
🔍 Our calculator automatically verifies orthonormality and shows you:
- All pairwise dot products (should be zero)
- All vector norms (should be 1)
- Whether QᵀQ = I (for square matrices)
Step-by-Step Examples
Example 1: Orthonormal Basis in ℝ²
Vectors: v₁ = (1, 0), v₂ = (1, 1)
Step 1: Orthogonalize
Step 2: Normalize
Result: e₁ = (1, 0), e₂ = (0, 1) → The standard orthonormal basis!
Example 2: Orthonormal Basis in ℝ³
Vectors: v₁ = (1, 1, 0), v₂ = (1, 0, 1), v₃ = (0, 1, 1)
Step 1: Orthogonalize
Step 2: Normalize
Result: Three orthonormal vectors that span ℝ³. Check: e₁·e₂ = 0, e₁·e₃ = 0, e₂·e₃ = 0, and all have length 1.
Example 3: Dependent Vectors (Dimension Reduction)
Vectors: v₁ = (1, 2), v₂ = (2, 4) (v₂ = 2·v₁)
Process:
Result: Only one orthonormal vector: e₁ = (1/√5, 2/√5). The subspace is 1-dimensional (a line).
This shows that orthonormal basis reflects the true dimension of your vector set!
Special Cases
| Case | What Happens | Basis Size |
|---|---|---|
| Already orthonormal | Vectors remain unchanged (just normalized if needed) | Same as input |
| Linearly dependent | Zero vectors appear and are discarded | Rank of the original set |
| Zero vector included | Zero vector produces no contribution, automatically removed | Reduced by 1 |
| Orthogonal but not normalized | Only normalization needed (no projection steps required) | Same as input |
⚠️ Important: Starting with orthogonal vectors makes the process much faster! The calculator detects this and skips unnecessary projection steps.
Real-World Applications
📐 QR Decomposition
Any matrix A can be factored as A = QR where Q has orthonormal columns and R is upper triangular. Used in:
- Least squares problems
- Eigenvalue algorithms
- Solving linear systems
🎯 Principal Component Analysis (PCA)
PCA finds orthonormal basis vectors (principal components) that maximize variance. Used in:
- Dimensionality reduction
- Data visualization
- Feature extraction
🔬 Quantum Mechanics
Orthonormal basis vectors represent quantum states. Properties:
⟨ψᵢ|ψⱼ⟩ = δᵢⱼ(Kronecker delta)- Any state is combination of basis states
- Probabilities from squared coefficients
📡 Signal Processing
Orthonormal bases (wavelets, Fourier) allow:
- Signal compression (JPEG, MP3)
- Noise removal
- Feature detection
🤖 Machine Learning
- Kernel methods use orthonormal features
- Support Vector Machines (SVMs)
- Gaussian processes
📊 Statistics
- Principal components are orthonormal
- Canonical correlation analysis
- Factor analysis
Frequently Asked Questions
Q: What's the difference between orthogonal and orthonormal?
A: Orthogonal vectors are perpendicular (dot product = 0). Orthonormal vectors are orthogonal AND have unit length (norm = 1). So orthonormal = orthogonal + normalized.
Q: Does every subspace have an orthonormal basis?
A: Yes! Every subspace of ℝⁿ has an orthonormal basis. Apply Gram-Schmidt to any basis of the subspace.
Q: Is the orthonormal basis unique?
A: No! Any rotation (orthogonal transformation) of an orthonormal basis gives another orthonormal basis. For example, in ℝ², any rotated version of {(1,0), (0,1)} is also orthonormal.
Q: Why do we need to normalize? Can't we just use orthogonal vectors?
A: Orthogonal vectors are great, but normalized vectors make computations simpler. With orthonormal vectors, coefficients are just dot products (no division by norms needed). This is why orthonormal is the gold standard!
Q: What happens if my vectors are already orthogonal?
A: Then the Gram-Schmidt process only needs to normalize them. Our calculator detects this and skips the projection steps!
Q: Can orthonormal vectors be linearly dependent?
A: No! Orthonormal vectors are always linearly independent. If they were dependent, one would be a combination of others, preventing orthogonality.
Q: What's the relationship to orthogonal matrices?
A: If you put orthonormal vectors as columns of a square matrix Q, then Q is orthogonal: Q⁻¹ = Qᵀ. These matrices represent rotations and reflections.
Practice Problems
Beginner
-
Find an orthonormal basis for the subspace spanned by
v₁ = (1, 2). -
Check if these vectors form an orthonormal basis in ℝ²:
e₁ = (1/√2, 1/√2),e₂ = (-1/√2, 1/√2). -
Normalize the orthogonal vectors
u₁ = (2, 0),u₂ = (0, 3)to get an orthonormal basis.
Intermediate
-
Apply Gram-Schmidt to
v₁ = (1, 1, 0),v₂ = (1, 0, 1)to find an orthonormal basis for their span. -
Find an orthonormal basis for ℝ³ starting from
v₁ = (1, 1, 1),v₂ = (1, -1, 0),v₃ = (1, 1, -2). -
What happens when you apply Gram-Schmidt to linearly dependent vectors? Why?
Click to reveal solutions
1. e₁ = (1/√5, 2/√5) (only one vector needed)
2. Yes! e₁·e₂ = 0, ‖e₁‖ = 1, ‖e₂‖ = 1 ✓
3. e₁ = (1, 0), e₂ = (0, 1)
4. e₁ = (1/√2, 1/√2, 0), e₂ = (1/√6, -1/√6, 2/√6)
5. e₁ = (1/√3, 1/√3, 1/√3), e₂ = (1/√2, -1/√2, 0), e₃ = (1/√6, 1/√6, -2/√6)
6. You get a zero vector during orthogonalization, which is discarded. The basis size equals the rank (dimension of span).
Summary
🎯 Key Takeaways
- Orthonormal basis: Orthogonal vectors + unit length √(v·v) = 1
- Gram-Schmidt: Algorithm to find orthonormal basis from any basis
- Properties: QᵀQ = I, Q⁻¹ = Qᵀ (for square matrices)
- Coordinates: In orthonormal basis, coordinates are dot products
- Applications: QR decomposition, PCA, quantum mechanics, signal processing
- Verification: Check vᵢ·vⱼ = 0 (i≠j) and ‖vᵢ‖ = 1
💡 Quick Test: Form a matrix Q with vectors as columns. Compute QᵀQ. If you get the identity matrix → orthonormal basis!
Try It Yourself!
Use the calculator above to find orthonormal bases:
- Enter your vectors as rows or columns
- Choose whether to normalize (usually yes for orthonormal)
- Click "Calculate" to see:
- Orthogonal basis (Gram-Schmidt)
- Orthonormal basis (normalized)
- Complete step-by-step process for each vector
- Verification of orthonormality
📐 Test these examples:
- ℝ² example: (1, 0), (1, 1) → Standard orthonormal basis
- ℝ³ example: (1,1,0), (1,0,1), (0,1,1) → Three orthonormal vectors
- Dependent vectors: (1,2), (2,4) → One orthonormal vector (dimension reduction)
- Already orthogonal: (1,0), (0,2) → Only needs normalization
🔬 Pro Tip: Orthonormal bases are essential for PCA, QR decomposition, and quantum computing. Mastering them opens doors to advanced topics!