Parallel and Perpendicular Line Calculator
This parallel and perpendicular line calculator does two jobs. Give it two lines and it says whether they are parallel, perpendicular, coincident or neither. Give it one line and a point and it writes both new lines for you.
It also draws them, because the angle between two lines is quicker to see than to argue about.
The Rules You Were Taught
Two lines are parallel when they point the same way, and perpendicular when they meet at a right angle. Written with slopes:
| Parallel | m₁ = m₂ | y = 2x + 1 and y = 2x − 3 |
| Perpendicular | m₁ × m₂ = −1 | y = 2x + 1 and y = −½x |
The perpendicular slope is the negative reciprocal: turn the fraction over and change the sign. A slope of 2/3 gives −3/2; a slope of −5 gives 1/5.
Where That Rule Quietly Fails
Take y = 3 and x = 5. Anyone can see they cross at a right angle — one runs flat, the other straight up. They are perpendicular.
Now apply the rule. The first has slope 0. The second has no slope at all — not infinity, not a very large number, none, because a vertical line rises without ever running. So there is nothing to multiply, and m₁ × m₂ = −1 cannot be applied. The rule does not say these lines are not perpendicular; it says nothing whatsoever.
This is worth being clear about, because textbooks state that rule as though it settled every case. It does not. It is a consequence of perpendicularity for lines that happen to have slopes, not the meaning of the word.
The Test That Never Fails
Write each line as Ax + By = C and both questions become subtraction and addition:
same direction: A₁B₂ − A₂B₁ = 0
right angle: A₁A₂ + B₁B₂ = 0
On the awkward pair: y = 3 is 0x + 1y = 3, and x = 5 is 1x + 0y = 5. So A₁A₂ + B₁B₂ = 0×1 + 1×0 = 0. Perpendicular, with no exception and no special case.
These are the tests this calculator actually uses. The slope rules are shown alongside whenever both lines have a slope — and they always agree, because they are the same statement written in a form that happens to break on vertical lines.
You do not need to know why they work to use them, but the reason is short. A and B together point straight out of the line, at right angles to it. Two lines point the same way exactly when those two arrows do, which is what the first expression measures; and they meet square exactly when the arrows do, which is the second. Everything the slope can tell you is in those four numbers already, and unlike the slope they exist for every line ever written.
The same gap sits under the parallel rule, and it is mentioned even less often. Two vertical lines are obviously parallel, and neither of them has a slope, so "equal slopes" has nothing to compare.
Coincident Is Not Parallel
If two equations describe the same line, they point the same way — but they are not parallel. Parallel lines never meet, and a line meets itself at every point on it. The word for this is coincident, and this calculator names it separately.
It matters in a proof. Showing that two lines are parallel usually means showing they are also distinct, and a question that hands you y = 2x + 1 twice in different disguises is often checking exactly that.
The disguise is usually a scaling. 2x − y = −1 and 4x − 2y = −2 look like two different equations and are one line, because the second is the first doubled all the way through. Comparing them as they stand invites the wrong answer; putting both into the same tidy form first makes it obvious, which is what a standard form of a line calculator is for.
Finding the Line Through a Point
Given a line and a point, there is exactly one parallel line and exactly one perpendicular line through it. A direction on its own describes infinitely many; the point picks out one.
For y = 2x + 5 through (3, −1):
Parallel keeps the slope: 2. Then −1 = 2×3 + b gives b = −7, so y = 2x − 7.
Perpendicular takes the negative reciprocal: −½. Then −1 = −½×3 + b gives b = ½, so y = −½x + ½.
The special lines fall out without any extra thought. Perpendicular to a horizontal line is a vertical one: off y = 7 through (4, 9) you get y = 9 and x = 4. Perpendicular to a vertical line is horizontal. Neither needs a rule of its own here, because nothing is ever divided.
How to Use the Two Tabs
| Compare two lines | Give each as a slope and intercept, or as the x it sits at if it is vertical |
| Through a point | One line and a point; both new lines come back |
Switching tabs clears the boxes, so nothing from the last question survives into this one. Fractions like 2/3 and decimals both work, and the answer stays exact.
Open the working and you get the picture, both lines in coefficient form, both tests with your own numbers in them, and — where they apply — the slope rules beside them for comparison.
Parallel and Perpendicular Lines FAQ
How do you tell if two lines are parallel or perpendicular?
Are a horizontal and a vertical line perpendicular?
What is the perpendicular slope?
Is a line parallel to itself?
How do you find a line perpendicular to another through a point?
Why does the calculator need a point?
Same direction, or a right angle — and a test that does not mind whether a line has a slope.