Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

Two-Vector Gram–Schmidt in 2D

Create an orthonormal 2D basis from two independent input vectors.

Math workspace● Runs in your browser
01 Your input
02 Your result
View or copy raw result data
FormulaU1X = ax/hypot(ax,ay); U1Y = ay/hypot(ax,ay); Projection = (ax*bx+ay*by)/hypot(ax,ay); Perpendicular Length = abs(ax*by-ay*bx)/hypot(ax,ay); Second Unit Vector X = -ay*sign(ax*by-ay*bx)/hypot(ax,ay); Second Unit Vector Y = ax*sign(ax*by-ay*bx)/hypot(ax,ay)
Sources and model references

Made for real tasks

  • Create an orthonormal 2D basis from two independent input vectors.
Explore step-by-step workflows →

Worked example

Inputs

First vector x
3 number
First vector y
4 number
Second vector x
1 number
Second vector y
0 number

Expected results

U1X
0.6 number
U1Y
0.8 number
Projection
0.6 number
Perpendicular Length
0.8 number
Second Unit Vector X
0.8 dimensionless
Second Unit Vector Y
-0.6 dimensionless

Load the example in the workspace to reproduce these results. Display rounding does not change the underlying calculation.

How to use this tool

  1. Enter first vector x, first vector y, second vector x, second vector y.
  2. Use the displayed units and confirm the model assumptions.
  3. Calculate and compare the outputs against your input scenario.

Try this example

{
  "ax": 3,
  "ay": 4,
  "bx": 1,
  "by": 0
}

Accuracy and scope

Returns a complete orthonormal 2D basis and the projection of the second vector onto the first. Not a general matrix QR solver.

Is my data uploaded?

This tool runs locally in your browser. Input and output are not sent to a processing server. Copy or download your result before leaving the page.