Advanced maths

Perpendicular line and projection calculator

Find perpendicular and parallel lines through a point, plus its perpendicular foot and distance.

Your numbers

An integer, decimal with up to 6 places, or fraction such as -2/3. Within ±1,000,000; no expressions or scientific notation.
An integer, decimal with up to 6 places, or fraction such as -2/3. Within ±1,000,000; no expressions or scientific notation.
An integer, decimal with up to 6 places, or fraction such as -2/3. Within ±1,000,000; no expressions or scientific notation.
Two rational coordinates separated by a space or comma, without brackets. The original line is Ax + By + C = 0.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Try it, understand it

Explore the result

Compare an oblique line with vertical and horizontal cases. Normals avoid dividing by a zero slope.

Worked example comparison
ExampleOutputWhat to notice
An oblique original linePerpendicular line through the pointx + 2y − 9 = 0For 2x − y + 3 = 0 and (1,4), the perpendicular is x + 2y − 9 = 0.
A vertical original linePerpendicular line through the pointy − 4 = 0The original is x = 2. Its perpendicular through (3,4) is the horizontal line y = 4.
A horizontal original linePerpendicular line through the pointx − 3 = 0The original is y = 2. Its perpendicular through (3,4) is the vertical line x = 3.

Check your understanding

Before checking: must the original line’s slope exist?

No. A nonzero normal defines the line even when it is vertical. The normal-vector construction handles both orientations.

Where does the perpendicular foot lie?

On the original line. The displacement from the entered point to that foot is normal to the original line.

Behind the numbers

How this calculation works

Represent the original line by a nonzero normal (A,B). Rotate that normal to find a perpendicular line through the supplied point, or retain it for the parallel line. Subtract the normal projection to locate the perpendicular foot.

THE FORMULAPerpendicular normal = (B,−A); foot = P − [(Ax₀+By₀+C)/(A²+B²)](A,B)

A worked example

For 2x − y + 3 = 0 and point (1,4), the perpendicular line is x + 2y − 9 = 0, the parallel line is 2x − y + 2 = 0 and the foot is (3/5,21/5).

Good to know

Bounded exact rational inputs within ±1,000,000, up to 6 decimal places or integer fraction denominators up to 1,000,000. Large intermediate fractions have a size limit. No arbitrary expression evaluation, multiple variables or general computer-algebra system. Approximate lengths and quadratic square roots are labeled separately.

Normal vectors handle vertical lines without exceptions to slope arithmetic

The polynomial tangent calculator first differentiates a curve to obtain a tangent, then constructs its perpendicular normal at the chosen point.

The equation Ax + By + C = 0 has a normal vector (A,B). A perpendicular line can use the rotated normal (B,−A), while a parallel line retains the original normal. Its constant term is chosen to make the entered point satisfy the equation.

For 2x − y + 3 = 0 and point (1,4), the perpendicular equation is x + 2y − 9 = 0. Substituting the point gives zero, and the two line directions meet at a right angle. The parallel line through that point is 2x − y + 2 = 0.

An equation of a line found from two points supplies another representation of the same geometry. This page instead starts with a line equation and one point, so it does not need you to invent a second point on the desired perpendicular.

A foot is a point on the original line

The perpendicular foot is where the perpendicular through the supplied point meets the original line. Here it is (3/5,21/5). It satisfies 2x − y + 3 = 0, and its displacement from (1,4) is parallel to the normal (2,−1).

The dot product explains why this is a projection: the residual displacement is perpendicular to the line direction. Exact rational values are retained for the foot, while the length of the displacement is reported as an approximate distance.

A vertical original line produces a horizontal perpendicular, and vice versa. If the point already lies on the original line, the foot is that point, distance is zero and the parallel-through-point line coincides with the original. Coefficient normalization changes only notation, not geometry.

A few questions, answered

Can A and B both be zero?

No. That expression describes either no points or the whole plane, not a unique line.

Why is my equation scaled differently?

Equivalent nonzero multiples describe the same line. The tool uses primitive integer coefficients with its first nonzero coefficient positive.

Are latitude and longitude supported?

No. This is flat Cartesian geometry with matching coordinate units.

Find your calculator

Start typing to explore the library.