Gram-Schmidt Orthogonalization, Vector Projection & Cosine Angle Calculator

Decompose vector v into parallel projection proj_u(v) and orthogonal Gram-Schmidt component w.

Orthogonal Gram-Schmidt Residual ||v_⊥||
4 magnitude
Scalar Projection Length 3 ||proj||
Angle Between Vectors u and v 53.13 degrees
Inner Dot Product (u · v) 12 u·v
Inputs
⚡ Scenarios:
u_x
First vector u x-component.
u_y
First vector u y-component.
v_x
Second vector v x-component.
v_y
Second vector v y-component.
Results & Graph
Orthogonal Gram-Schmidt Residual ||v_⊥||
4 magnitude
Scalar Projection Length
3 ||proj||
Angle Between Vectors u and v
53.13 degrees
Inner Dot Product (u · v)
12 u·v

Orthogonal Gram-Schmidt Residual ||v_⊥||

Graph 1 • Gram-Schmidt & Projection • Domain Architecture & Live Telemetry Maps U Vector X, U Vector Y, V Vector X through Gram-Schmidt & Projection Formula.
Orthogonal Gram-Schmidt Residu: 4 magnitude Gram-Schmidt & Projection • Invariants & Metrics Orthogonal Gram-Schmidt Resi 4 magnitude Scalar Projection Length 3 ||proj|| Angle Between Vectors u and 53.13 degrees Inner Dot Product (u · v) 12 u·v
Graph 2 • Orthogonal Gram-Schmidt Residual ||v_⊥|| Across U Vector X Sweep (40% → 160%) Evaluates proj_u(v) = [ (u · v) / ||u||² ] × u; u_orth = v − proj_u(v); cos(θ) across 7 operating points (current input highlighted).
0 magnit 2.20 magnit 4.40 magnit 4 1.60u_x 4 2.40u_x 4 3.20u_x 4 4u_x 4 4.80u_x 4 5.60u_x 4 6.40u_x
Graph 3 • Joint Sensitivity: U Vector X × U Vector Y Compares Orthogonal Gram-Schmidt Residual ||v_⊥|| when U Vector Y is shifted +25% (solid) vs. −25% (dashed).
0 magnit 0.820 magnit 1.64 magnit --- U Vector Y @ 75% 1.10 -30% 0.724 -15% 0.371 +0% 0.0450 +15% 0.252 +30%
Summary: Projecting v=(3,4) onto u=(4,0) gives proj_u(v)=(3, 0) and orthogonal Gram-Schmidt vector w=(0, 4) with angle θ = 53.13°.
Summary: Projecting v=(3,4) onto u=(4,0) gives proj_u(v)=(3, 0) and orthogonal Gram-Schmidt vector w=(0, 4) with angle θ = 53.13°.
Interactive chart & math engine powered by CalculatorGraph

Formula & Mathematical Methodology: Gram-Schmidt & Projection Formula

proju(v) = [ (u · v) / ||u||² ] × u
uorth = v − proju(v)
cos(θ) = u · v||u||·||v||
proj_u(v) = [ (u · v) / ||u||² ] × u; u_orth = v − proj_u(v); cos(θ) = (u · v) / (||u||·||v||)
  • uVectorX: U Vector X (u_x)
  • uVectorY: U Vector Y (u_y)
  • vVectorX: V Vector X (v_x)
  • vVectorY: V Vector Y (v_y)

Rounding: Internal floating-point calculations run in 64-bit IEEE-754 double precision; display values round to 2–4 decimal places.

Worked Example: Worked Mathematical Example: Gram-Schmidt & Projection

Decompose vector v into parallel projection proj_u(v) and orthogonal Gram-Schmidt component w.

  1. Specify the function parameters, matrix entries, or confusion matrix counts.
  2. Apply the closed-form or iterative formula: proj_u(v) = [ (u · v) / ||u||² ] × u; u_orth = v − proj_u(v); cos(θ) = (u · v) / (||u||·||v||).
  3. Examine the primary result, error bounds, and 3 interactive SVG plots.
Result: Computes Gram-Schmidt & Projection via proj_u(v) = [ (u · v) / ||u||² ] × u; u_orth = v − proj_u(v); cos(θ) = (u · v) / (||u||·||v||).

Frequently Asked Questions

How does the Gram-Schmidt Orthogonalization, Vector Projection & Cosine Angle Calculator compute the solution?

It evaluates proj_u(v) = [ (u · v) / ||u||² ] × u; u_orth = v − proj_u(v); cos(θ) = (u · v) / (||u||·||v||) directly in your browser and updates three custom SVG visualizations in real time.

Can I solve backwards for an input parameter using Goal Seek?

Yes. Click "🎯 Goal Seek" in the results toolbar to solve backwards for any numeric input field.

Does this calculator run locally offline?

Yes. All calculations run 100% locally in your browser and work offline via the CalculatorGraph PWA.

Mathematics & Statistics · Linear Algebra & Vectors

Gram-Schmidt Orthogonalization, Vector Projection & Cosine Angle Calculator: inputs, method, and how to read the result

Decompose vector v into parallel projection proj_u(v) and orthogonal Gram-Schmidt component w.

Choose inputs for the case you are checking

The defaults are illustrative. Replace them with values for your case and keep the units shown beside each field.

  • U Vector X: First vector u x-component.
  • U Vector Y: First vector u y-component.
  • V Vector X: Second vector v x-component.
  • V Vector Y: Second vector v y-component.

What the calculation includes

With the default values shown, Orthogonal Gram-Schmidt Residual ||v_⊥|| is 4 magnitude. The calculation follows Gram-Schmidt & Projection Formula; the formula and variable definitions above show how the inputs combine.

One-input check: With the other defaults held constant, changing U Vector Y from 0 u_y to 1 u_y changes Orthogonal Gram-Schmidt Residual ||v_⊥|| from 4 magnitude to 3.153 magnitude. This is a comparison inside the calculator's stated model, not a prediction.

Where to use caution

  • Uses exact analytical or standard numerical analysis formulations from NIST DLMF.
  • Double-precision floating-point arithmetic has ~15–17 significant decimal digits of precision.

Scope: Global Mathematical & Statistical Standard Check the assumptions and limitations against your situation before relying on the estimate.

More in Mathematics & Statistics: Scientific Calculator, Statistics & Standard Deviation Calculator, Permutations, Combinations, Probability, Sample Size & P-Value Calculator.