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
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.