Orthonormal Basis Calculator

Build an orthonormal basis using structured Gram-Schmidt steps. Inspect normalized vectors, coefficients, and span rank. Download clean reports and verify every derived basis vector.

Calculator Input
Example for dimension 3: 1, 1, 0
Example data table
Example Dimension Input vectors Method Expected rank Purpose
Set A 3 (1,1,0), (1,0,1), (0,1,1) Modified Gram-Schmidt 3 Creates a full orthonormal basis for ℝ³.
Set B 3 (1,2,3), (2,4,6), (1,0,1) Classical Gram-Schmidt 2 Shows how dependent vectors are discarded.
Set C 4 (1,0,0,1), (0,1,1,0), (1,1,0,0) Modified Gram-Schmidt 3 Builds an orthonormal spanning set in ℝ⁴.
Formula used
Step 1: Start with the first nonzero vector as u₁ = v₁, then normalize it as e₁ = u₁ / ||u₁||.
Step 2: For each later vector, remove projections onto earlier basis vectors:
uk = vk − Σ ⟨vk, ej⟩ ej
Step 3: Normalize the remaining orthogonal component:
ek = uk / ||uk||
Inner product and norm:
⟨a, b⟩ = Σ aibi,   ||a|| = √⟨a, a⟩

If the orthogonal component norm falls below the tolerance, the vector is treated as dependent and excluded from the orthonormal basis.

How to use this calculator
  1. Select the vector dimension that matches every entry you will provide.
  2. Paste one vector per line in the vectors field, using commas or spaces.
  3. Choose classical or modified Gram-Schmidt, depending on your preferred workflow.
  4. Set decimal precision and a tolerance for dependence detection.
  5. Submit the form to generate the orthonormal basis and diagnostics.
  6. Review the status of each vector, basis vectors, Q matrix, and orthogonality check.
  7. Download the result as CSV or PDF when you need a shareable record.
FAQs

1. What does an orthonormal basis mean?

An orthonormal basis is a set of basis vectors that are mutually perpendicular and each have unit length. It simplifies projections, coordinate changes, least squares work, and many matrix factorizations.

2. Why can a vector be discarded?

A vector is discarded when its orthogonal component becomes zero, or nearly zero, after removing projections onto earlier basis vectors. That means it does not add a new independent direction.

3. What is the difference between classical and modified Gram-Schmidt?

Classical Gram-Schmidt subtracts the full combined projection at once. Modified Gram-Schmidt updates the working vector after each projection subtraction, which is often numerically more stable for close or ill-conditioned vectors.

4. Why does tolerance matter?

Tolerance decides when a very small orthogonal component is treated as zero. Larger tolerances discard near-dependent vectors sooner, while smaller tolerances keep more vectors but may preserve numerical noise.

5. What does the QᵀQ table show?

The QᵀQ table checks whether the computed basis is truly orthonormal. Ideally, diagonal values are one, off-diagonal values are zero, and the maximum deviation from identity stays very small.

6. Can this calculator handle dependent inputs?

Yes. Dependent vectors are identified automatically. The tool keeps only the independent directions, so the final orthonormal basis spans the same subspace as the valid input vectors.

7. How many vectors can I enter?

This page accepts up to ten vectors and dimensions between two and ten. Those limits keep the layout readable while still supporting many practical linear algebra and teaching examples.

8. When should I export CSV or PDF?

Use CSV when you want spreadsheet-friendly data. Use PDF when you need a fixed report for printing, sharing, study notes, or attaching a clean summary to coursework.

Related Calculators

vector normalization calculatorl2 norm calculatorvector triangle lawvector distance calculatorscalar projection calculatorvector subtraction calculatorvector angle cosinevector projection lengthvector from pointsvector scaling calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.