Orthogonal Projection Calculator

Estimate orthogonal projection using vector components and basis.

%

Quick Facts

Basis
Direction
Basis sets projection direction
Length
Magnitude
Length is projection magnitude
Error
Residual
Residual shows mismatch
Decision Metric
Projection
Projection vector

Your Results

Calculated
Projection Length
-
Projection length
Projection Vector
-
Projected vector
Orthogonal Error
-
Error magnitude
Basis Magnitude
-
Basis magnitude

Projection Plan

Your defaults produce a clean projection.

What it is and when to use it

This calculator finds the orthogonal (perpendicular) projection of one 2D vector onto another. In plain terms, it answers: "how much of vector v points in the same direction as basis vector b?" The result is a new vector, lying exactly along b, that is the closest possible point on b's line to the tip of v — the shadow v would cast if a light shone straight down onto the line through b.

Use it in linear algebra coursework, physics problems involving force or velocity components along a direction, computer graphics (finding how much of a movement vector aligns with a surface or axis), or any situation where you need to decompose a vector into a component along a chosen direction and a leftover perpendicular component. The scale factor lets you test how projection changes if the vector being projected is scaled up or down, and the tolerance setting flags how much of the original vector is "lost" to the perpendicular (orthogonal) error.

projbv = (v·b / b·b) b
v·b (dot product): vxbx + vyby, a single number measuring how much v and b point the same way.
b·b: the squared magnitude of the basis vector, bx² + by².
Scalar (v·b / b·b): how many multiples of b are needed to reach the projection.
Orthogonal error: v − projbv, the leftover component perpendicular to b.

Worked example

Project v = (6, 4) onto basis b = (3, 1), with scale factor 1. Dot product v·b = (6×3) + (4×1) = 18 + 4 = 22. b·b = 3² + 1² = 10. Scalar = 22/10 = 2.2. Projection vector = 2.2 × (3, 1) = (6.60, 2.20), with length √(6.6²+2.2²) = √48.4 ≈ 6.96 — matching the calculator's default output. The orthogonal error is v − proj = (6−6.6, 4−2.2) = (−0.6, 1.8), with magnitude √3.6 ≈ 1.90. Since v's own length is √52 ≈ 7.21, the error is about 26.3% of v — well above the default 5% tolerance, which is why the calculator flags this pairing as "Large Error — Weak Alignment."

Common mistakes and how to interpret the result

  • Entering a zero basis vector. Projection onto (0, 0) is mathematically undefined since b·b would be zero, causing division by zero — the calculator blocks this and asks for a non-zero basis.
  • Confusing the projection vector with the projection length. The projection vector (like (6.60, 2.20)) is a point in the same 2D space as v and b; the projection length (6.96) is just its magnitude, a single scalar distance.
  • Expecting a small orthogonal error just because the vectors look similar in size. Alignment depends on direction, not magnitude — a long vector nearly perpendicular to the basis will still have a large orthogonal error relative to its own length.
  • Forgetting that the scale factor only scales v, not the basis b. Scaling v scales the projection proportionally but does not change the direction of the projection or the error ratio, since both the projection and the error scale by the same factor.

Frequently Asked Questions

What does it mean when the orthogonal error is large?
A large orthogonal error means the original vector points in a direction quite different from the basis vector, so only a small share of it actually lies along the basis. In the default example, about 26% of the vector's length is "left over" in the perpendicular direction, indicating weak alignment between v and b.
Why is the basis vector's own magnitude shown as a separate result?
The basis magnitude (√(b·b)) tells you the length of the direction vector you are projecting onto. It does not affect the projection's direction, since the formula already normalizes for basis length through the b·b term, but it is useful context for judging whether the basis vector itself is unusually short or long.
Does the scale factor change the direction of the projection?
No. The scale factor multiplies the vector v before projecting, which changes the projection's length proportionally but leaves its direction unchanged, since the projection always lies along the basis vector b regardless of v's magnitude.
How is this different from a dot product calculation?
The dot product v·b is a single number used as an intermediate step inside the projection formula. Orthogonal projection goes further, using that dot product (divided by b·b) to scale the basis vector itself, producing a full vector result rather than a single scalar.

Related calculators