Parallel and Perpendicular Line Calculator
Find the equation of the line parallel or perpendicular to Ax + By = C through a given point, in slope-intercept, point-slope and standard form, plus the distance from the point to the line.
How it works
Given Ax + By = C (slope m = −A/B) · parallel through (x₁, y₁): Ax + By = Ax₁ + By₁ (same slope m) · perpendicular: Bx − Ay = Bx₁ − Ay₁ (slope −1/m) · distance = |Ax₁ + By₁ − C| / √(A² + B²)
Parallel lines have equal slopes; perpendicular lines have slopes that are negative reciprocals, so their product is −1 (a slope of 2 pairs with −1/2). Writing the given line in the general form Ax + By = C handles every case, including vertical lines: a parallel line keeps the same A and B, and a perpendicular line swaps them and changes one sign. The constant is fixed by substituting the point. Results are exact fractions in slope-intercept (y = mx + b), point-slope (y − y₁ = m(x − x₁)) and integer standard form.
Worked example
The line 2x − y = 3 is y = 2x − 3 with slope 2. Through the point (4, 1), the perpendicular line has slope −1/2: y − 1 = −(1/2)(x − 4), i.e. y = −(1/2)x + 3, or x + 2y = 6 in standard form. The parallel line through the same point is y = 2x − 7, and the point lies 4/√5 ≈ 1.788854 units from the given line.
Sources: Parallel and perpendicular lines — Math is Fun · Distance from a point to a line — Wikipedia
Frequently asked questions
How do I find the slope of a perpendicular line?
Take the negative reciprocal of the original slope: flip the fraction and change its sign. 3/4 becomes −4/3, and −5 becomes 1/5. Horizontal and vertical lines are perpendicular to each other.
My line is in the form y = mx + b — what do I enter?
Rewrite it as mx − y = −b. For y = 3x + 2 enter A = 3, B = −1, C = −2.
What happens with vertical lines?
A vertical line x = k has B = 0 and an undefined slope. Any parallel line is also vertical (x = x₁) and any perpendicular line is horizontal (y = y₁); the calculator shows these directly.
How can I check two lines are perpendicular?
Multiply their slopes: the product must be −1. In standard form, A₁A₂ + B₁B₂ = 0 is the test, which also works for vertical lines.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.