On this page
In coordinate geometry, the condition for two lines to be perpendicular is written as m₁ × m₂ = −1. According to the Class 11 Mathematics textbook from NCERT, two non-vertical lines are perpendicular if and only if the product of their slopes is −1. If you know the slope of one line, you can find the other by taking the negative reciprocal.
But why does this work? There are two common ways to prove it: one using trigonometry, and another by visualising a rotation.
Why does tan(θ + 90°) prove they are perpendicular?
Before jumping into the proofs, it helps to remember why slope and angles are connected. The slope measures how steep a line is, which is the ratio of vertical change to horizontal change. In a right-angled triangle, the tangent of the angle θ (the angle the line makes with the positive x-axis) is the opposite side (rise) divided by the adjacent side (run). This is why m = tan θ is the starting point for understanding perpendicularity.
If a second line is perpendicular to the first, its angle with the x-axis will be exactly 90° greater, making its angle θ + 90°. Its slope is then m₂ = tan(θ + 90°).
Using trigonometric identities, tan(θ + 90°) = −cot θ. Since cot θ = 1 / tan θ, we can rewrite this as: m₂ = −1 / tan θ m₂ = −1 / m₁
Multiplying both sides by m₁ gives the familiar rule: m₁ × m₂ = −1.
How does a 90° rotation swap the rise and run?
The slope of a line is defined as the "rise" over the "run", or Δy / Δx.
Imagine drawing a right-angled triangle under your first line, with a horizontal width of Δx and a vertical height of Δy. Now, rotate that entire triangle by 90° around the origin to match the perpendicular line.
The original horizontal run (Δx) flips upright, becoming the new vertical rise. The original vertical rise (Δy) falls flat to become the new horizontal run, but it now points in the negative direction.
So, the new slope m₂ is Δx / −Δy. When you multiply the two slopes together: (Δy / Δx) × (−Δx / Δy) = −1
Let us put some real numbers to this rotation. Suppose your first line goes through the origin (0, 0) and the point (2, 1). Its run is 2 and its rise is 1, giving a slope of 1/2.
If you take the point (2, 1) and rotate it 90° counter-clockwise around the origin, the x and y coordinates swap, and the new x-coordinate becomes negative. The point (2, 1) moves to (−1, 2).
For this new line, the run is −1 and the rise is 2. Its slope is 2 / −1, which simplifies to −2. When you multiply the original slope (1/2) by the new perpendicular slope (−2), the result is exactly −1. This transformation works for any line, proving that the negative reciprocal relationship is universal.
If you have gaps in your understanding of coordinate geometry, the Fermi Concept Library has a lesson for every concept in mathematics, each with its place in the map to help you connect slope and trigonometry.
What happens when one line is vertical?
The mathematical rule specifically states that the product of slopes of two non-vertical perpendicular lines is −1. Why is there an exception?
A horizontal line has a slope of 0. Its perpendicular counterpart is a vertical line. However, the slope of a vertical line is undefined, because its "run" is zero, and you cannot divide by zero in mathematics.
Since you cannot multiply 0 by an undefined value to get −1, the formula breaks down. This is the only case where two lines are perpendicular but their slopes do not multiply to −1.
This exception is not just a mathematical technicality; it matters when you are solving problems in exams like JEE Main. If a question asks you to find a line perpendicular to x = 5, you should immediately recognise that the given line is vertical. You do not need to use the m₁ × m₂ = −1 formula at all. The perpendicular line must be horizontal, meaning its equation will simply be in the form y = c.
How do you check if two lines are perpendicular?
Let us say you are given two lines: Line A: 2x + 3y = 6 Line B: 3x − 2y = 4
First, convert both equations into the slope-intercept form (y = mx + c) to find their slopes.
For Line A: 3y = −2x + 6 y = (−2/3)x + 2 So, the slope m₁ = −2/3.
For Line B: 2y = 3x − 4 y = (3/2)x − 2 So, the slope m₂ = 3/2.
Now, multiply them together: m₁ × m₂ = (−2/3) × (3/2) = −1
Since the product is exactly −1, you can confidently say that Line A and Line B are perpendicular to each other.
Related reading:



