Projection is a shadow
The projection of a onto b is literally the “shadow” of a cast onto b—same direction as b, but scaled by how aligned they are.
Projection of a onto b: proj_b(a) = (a·b / ||b||²) b (requires b ≠ 0).
Angle: θ = arccos((a·b)/(||a||·||b||)) when both nonzero.
In 2D, the cross “product” is the scalar aₓbᵧ − aᵧbₓ; in 3D it’s a vector.
Tip: Press Enter in any field to calculate.
Shows a, b, and projb(a) in 2D mode.
a·b = Σ aᵢbᵢ. Measures alignment; negative means pointing mostly opposite.a×b perpendicular to both; magnitude ||a||||b||sin θ.a along b, proj_b(a) above; perpendicular part is a − proj_b(a).θ = arccos((a·b)/(||a||·||b||)) (when both nonzero).This calculator helps you explore three closely related operations from linear algebra and physics: the dot product, the cross product (in 3D), and the projection of a onto b. These ideas show how two vectors align, how they differ, and how to split one vector into useful components for geometry, engineering, or data analysis.
The dot product measures how much two vectors point in the same direction:
a · b = Σ aᵢ bᵢ. It connects directly to the angle θ between them:
a · b = ||a|| ||b|| cos θ. If the value is positive, the vectors are mostly aligned;
if negative, they point in largely opposite directions; if zero, they are orthogonal (perpendicular).
Our tool reports θ in radians and degrees when both vectors are non-zero, plus magnitudes
||a|| and ||b||.
The projection answers: “what part of a lies along b?”
When ||b|| ≠ 0, the projection is
projb(a) = (a·b / ||b||²) b.
Splitting a as a = a∥ + a⟂ with
a∥ = projb(a) and a⟂ = a − projb(a)
is useful for shadow length problems, resolving forces along an incline, and decomposing motion into “along” and “across” parts.
If b = 0, the projection is undefined—our calculator will still compute dot, magnitudes, and (in 3D) the cross product.
In 3D, the cross product a × b is a vector perpendicular to both
a and b. Its magnitude equals the parallelogram area spanned by
a and b: ||a × b|| = ||a|| ||b|| sin θ.
The direction follows the right-hand rule: curl your fingers from a to b;
your thumb points along a × b. In 2D, there is no full vector cross product:
the “cross” is often represented by the scalar k-component aₓ bᵧ − aᵧ bₓ, which equals the signed area of the parallelogram per unit length in the out-of-plane direction.
arccos. We clamp internally to avoid “NaN”.
You’ll see these operations in computer graphics (lighting and normals), robotics and kinematics (motion components),
physics (work = F · d), statistics and ML (similarity via cosine), navigation (bearing errors),
and structural analysis (resolving forces along beams and cables). Use the projection to isolate the useful
component along a chosen direction, the dot product to check alignment or compute work, and the cross product to
find perpendicular directions and areas in 3D.
Tip: Try small integers first to build intuition. Then scale up to real-world magnitudes—our calculator keeps full precision and shows rounded values for readability.
The projection of a onto b is literally the “shadow” of a cast onto b—same direction as b, but scaled by how aligned they are.
Physics sneak peek: pushing 1 N for 1 m straight ahead is 1 J of work. Push at a right angle and the dot product (and the work) is exactly zero.
In 3D, ||a×b|| is the area of the parallelogram spanned by a and b—so half of it is the triangle area, no trig required.
When a·b = 0, you’ve found a perfect perpendicular pair. Graphics engines use this to build camera axes that never skew.
The “cross” in 2D is just the k-component aₓbᵧ − aᵧbₓ. Its sign tells you if b is to your left or right as you face a.
The projection is undefined (division by 0). The tool will compute dot, cross (if 3D), and magnitudes, but skip projection/angle.
Calculations use full double precision and display rounded values. Copy LaTeX for exact numeric strings.
Yes—tab between fields and press Enter to compute. Use Share to copy a URL with current inputs.