Last updated: July 31, 2026
Gram-Schmidt Calculator
Creators
Dharmendra SinghReviewers

Creators
Dharmendra SinghReviewers
Creators
Dharmendra SinghReviewers

Creators
Dharmendra SinghReviewers
Formula
u₁ = v₁/||v₁||; w₂ = v₂ − proj_u₁(v₂); u₂ = w₂/||w₂||
Where:
- v1x=v1 x
- v1y=v1 y
- v1z=v1 z
- v2x=v2 x
- v2y=v2 y
- v2z=v2 z
Worked Examples
Simple independent vectors
Orthogonalize v1=(1,1,0), v2=(1,0,1).
- 1Normalize v1 to get u1
- 2Subtract projection of v2 on u1
- 3Normalize remaining component for u2
Axis-aligned input
Use v1=(2,0,0), v2=(1,3,0).
- 1u1 points along x-axis
- 2Remove x projection from v2
- 3Normalize to get u2 along y direction
General 3D case
Use v1=(3,1,2), v2=(2,2,1).
- 1Compute vector norms
- 2Project and subtract
- 3Normalize resulting basis vectors
Introduction
Gram-Schmidt converts linearly independent vectors into an orthonormal basis. This calculator takes two 3D vectors and returns normalized orthogonal vectors.
Formula Overview
Gram-Schmidt Calculator uses a deterministic math model based on the calculator logic in calculation.ts.
u₁ = v₁/||v₁||; w₂ = v₂ − proj_u₁(v₂); u₂ = w₂/||w₂||
Inputs are validated before computation
Outputs are rounded consistently for readable results
Invalid values return safe fallback outputs
Input Guide
Use each input key exactly as defined below to match calculator wiring and test coverage.
- 1
v1x: v1 x
- 2
v1y: v1 y
- 3
v1z: v1 z
- 4
v2x: v2 x
- 5
v2y: v2 y
- 6
v2z: v2 z
Output Guide
These output IDs map directly to the return object keys in calculation.ts.
- 1
u1x: x-component of first orthonormal vector
- 2
u1y: y-component of first orthonormal vector
- 3
u1z: z-component of first orthonormal vector
- 4
u2x: x-component of second orthonormal vector
- 5
u2y: y-component of second orthonormal vector
- 6
u2z: z-component of second orthonormal vector
Validation Rules
The calculator checks for finite numeric values and applies domain constraints before solving.
Required fields must be present
Domain limits are enforced (for example positive lengths or valid operators)
Invalid or non-finite entries resolve to safe defaults
Use examples to verify expected behavior quickly
How to Use
Enter inputs, run calculation, and interpret the primary output first before reviewing supporting values.
Provide all required inputs
Click calculate
Read primary output first
Use secondary outputs for deeper analysis
Practical Uses
This calculator supports classroom work, engineering checks, and fast verification tasks.
Homework and exam preparation
Design and geometry validation
Spreadsheet cross-checking
Quick scenario analysis
FAQs
What does the Gram-Schmidt Calculator compute?
It computes u1 x, u1 y, u1 z from validated input values.
Which inputs are required?
Required inputs are: v1 x, v1 y, v1 z, v2 x, v2 y, v2 z.
How are invalid values handled?
If inputs are invalid or out of domain, the calculator returns safe default outputs instead of invalid math.
Are results rounded?
Yes. Numeric values are rounded in calculation.ts (typically to six decimal places).
Can I use negative or decimal values?
Decimals are accepted where mathematically valid; sign/domain constraints are enforced by the calculator logic.
How can I verify results?
Use the worked examples and compare each output key with manual calculations or trusted references.