Perpendicular lines meet at right angles; their slopes multiply to −1. They give the shortest distance from a point to a line, the altitudes of triangles and right-angled street layouts.
How to use the Perpendicular Line Calculator
- First line: slope m
- First line: intercept r
- Point – x₀
- Point – y₀
Results update as you type, and everything is calculated in your browser.
How it works
The slope is the negative reciprocal of the original slope. The intercept makes the line pass through the point, and solving the two equations gives the foot of the perpendicular.
Inputs explained
| Field | What to enter |
|---|---|
| First line: slope m | A number |
| First line: intercept r | A number |
| Point – x₀ | A number |
| Point – y₀ | A number |
What each result means
- Perpendicular slope a = -1÷[First line: slope m]
- Perpendicular intercept b = [Point – y₀] + [Point – x₀]÷[First line: slope m]
- Intersection – x = ([Point – y₀] + [Point – x₀]÷[First line: slope m] – [First line: intercept r])÷([First line: slope m] + 1÷[First line: slope m])
- Intersection – y = [First line: slope m]×([Point – y₀] + [Point – x₀]÷[First line: slope m] – [First line: intercept r])÷([First line: slope m] + 1÷[First line: slope m]) + [First line: intercept r]
- Distance from the point to the first line = abs([First line: slope m]×[Point – x₀] – [Point – y₀] + [First line: intercept r])÷sqrt([First line: slope m]^2 + 1)
Example values
How the main result changes when First line: slope m changes and everything else stays at the example values above:
| First line: slope m | Perpendicular slope a |
|---|---|
| 1 | -1 |
| 1.5 | -0.6667 |
| 2 | -0.5 |
| 2.5 | -0.4 |
| 3 | -0.3333 |
| 4 | -0.25 |
Formula
Perpendicular slope a = −1/m, b = y₀ + x₀/m
Intersection: solve mx + r = ax + b
Worked example
Inputs — First line: slope m: 2; First line: intercept r: 1; Point – x₀: 3; Point – y₀: -2.
Results — Perpendicular slope a = -0.5; Perpendicular intercept b = -0.5; Intersection – x = -0.6; Intersection – y = -0.2; Distance from the point to the first line = 4.02492236.
Key terms
- Perpendicular
- Meeting at a right angle.
Frequently asked questions
What is the slope of a line perpendicular to y = 2x + 1?
−1/2.
Why do perpendicular slopes multiply to −1?
Rotating a direction (1, m) by 90° gives (−m, 1), whose slope is −1/m.
What is perpendicular to a horizontal line?
A vertical line, which has no slope.
What is the intersection point called?
The foot of the perpendicular.