Skip to content
Saha Hesap

Projection Calculator: Parallel and Perpendicular Components

Scalar and vector projection of one vector onto another, parallel and perpendicular parts, and the distance and foot of the perpendicular from a point to a line. 2D and 3D.

What is a projection?

The projection of one vector onto another is its shadow along that direction. With light falling at right angles to b, the shadow of a on b is the projection. This splits a into two parts: a parallel part along b and a perpendicular part at right angles to it.

Scalar and vector projection

The scalar projection is a number, the length of the shadow: (a · b) / |b|. The vector projection carries that length along b: ((a · b) / |b|²) × b. The perpendicular part is a minus the projection vector.

Example

For a = (1, 2) and b = (3, 4), the dot product is 1 × 3 + 2 × 4 = 11 and the length of b is 5. The scalar projection is 11 / 5 = 2.2. The projection vector is (11 / 25) × (3, 4) = (1.32, 1.76) and the perpendicular part is (1, 2) − (1.32, 1.76) = (−0.32, 0.24).

Distance from a point to a line and the foot of the perpendicular

The foot of the perpendicular is where the perpendicular dropped from the point meets the line. For a line through A and B, first find t = (AP · AB) / |AB|², then the foot is F = A + t × AB. The distance from the point to the line is the distance from P to F.

Example: the point P(1, 1) is 1 unit from the line through A(4, 0) and B(0, 3), and the foot is (1.6, 1.8).

Where is it used?

The components of a force along and normal to an inclined plane, the offset of a point from a grid line, the closest point of a pipe or beam to another member, and the component of wind along the direction of travel are all found by projection.

Limits

The vector you project onto cannot be zero. The two points defining the line must differ. The foot may fall outside the segment, which the calculator reports separately.

Related calculators

Found a mistake or something missing?

If a value looks wrong, a size is missing or you need a feature, write to us and we will fix it.

Send an email