Perpendicular Line Calculator
Enter a line in slope-intercept form (y = mx + b) and a point (x₀, y₀); the calculator finds the perpendicular line through that point, the foot F where the lines meet, and the shortest distance from P to the original line.
- 1
Perpendicular slope (m⊥ = −1 ÷ m)
−1 ÷ 2 = -0.5Two lines are perpendicular when their slopes multiply to −1. - 2
Y-intercept of perpendicular line
4 − (-0.5) × 3 = 5.5000
How does this calculator work?
The perpendicular to y = mx + b through point (x₀, y₀) has slope m⊥ = −1/m and passes through the given point, giving y = m⊥x + (y₀ − m⊥x₀). The foot of the perpendicular and the minimum point-to-line distance are also computed from the intersection of the two lines.
Formula
How this is calculated
Two lines are perpendicular when their slopes multiply to −1: m · m⊥ = −1, so m⊥ = −1/m (the negative reciprocal). This relationship holds for any non-zero, non-vertical slope. If the original slope is 2, the perpendicular slope is −½; if it is −⅓, the perpendicular slope is 3.
Once m⊥ is known, the perpendicular line through point P = (x₀, y₀) is written in point-slope form as y − y₀ = m⊥(x − x₀), which rearranges to slope-intercept form y = m⊥x + (y₀ − m⊥x₀). The foot of the perpendicular F is the intersection of the original line and this new line, found by solving the system simultaneously.
The shortest distance from P to the original line equals the length of the segment PF: d = √[(x₀−xF)²+(y₀−yF)²]. This is the minimum distance from the point to any point on the line, and it is identical to the closed-form formula d = |y₀ − mx₀ − b| / √(1 + m²). The calculator requires a non-zero original slope because a horizontal line (m = 0) has a vertical perpendicular x = x₀, which cannot be expressed in y = mx + b form.
Frequently asked questions
The negative reciprocal of m is −1/m. Their product is m × (−1/m) = −1, the condition for perpendicularity. For example, slope 3 pairs with slope −⅓, and slope −½ pairs with slope 2.
A horizontal line has a vertical perpendicular x = x₀, which cannot be expressed as y = mx + b (it has an undefined slope). This calculator requires a non-zero slope; for horizontal lines, the perpendicular is simply the vertical line through x₀.
The foot F is the unique point on the original line that is closest to point P. The segment PF is perpendicular to the original line and its length is the shortest possible distance from P to the line.
Also known as
TG we-Calculate Editorial Team. (2026). Perpendicular Line Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/perp-line-calculator
TG we-Calculate Editorial Team. "Perpendicular Line Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/perp-line-calculator.
TG we-Calculate Editorial Team, "Perpendicular Line Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/perp-line-calculator
@misc{wecalculate_perp_line_calculator, title = {Perpendicular Line Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/perp-line-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
