Parallel and Perpendicular Lines (AA HL)

Parallel lines have equal gradients, m1=m2m_1=m_2, and perpendicular lines have gradients whose product is −1-1, m1m2=−1m_1m_2=-1. Find the gradient of each line first, rearranging to y=mx+cy=mx+c if needed, then compare. Use the conditions to find unknown constants or to write the equation of a line through a point that is parallel or perpendicular to a given line. It's part of the broader Straight Lines topic.

11 questions on this sub-topic.

Syllabus

CodeSyllabus content
SL2.1Different forms of the equation of a straight line: y=mx+cy=mx+c (gradient-intercept form), ax+by+d=0ax+by+d=0 (general form), and y−y1=m(x−x1)y-y_1=m(x-x_1) (point-gradient form). Gradient and intercepts. Parallel lines m1=m2m_1=m_2. Perpendicular lines m1m2=−1m_1m_2=-1.

Official IB source: Mathematics: analysis and approaches subject brief (PDF, ibo.org).

Skills practised on this page:

The two conditions

Perpendicular lines m1m2=−1m_1m_2=-1." Neither result is printed in the formula booklet - both are treated as things you already know.

Parallel condition

m1=m2m_1=m_2

Match the gradient of a new line to a given one to guarantee they never meet.

Perpendicular condition

m1m2=−1m_1m_2=-1

Take the negative reciprocal of a gradient, −1m-\dfrac1m, to get a line at right angles to it.

Need the full syllabus wording and formula-booklet reference table? See Straight Lines.

Key terms

How do you find the gradient of a line?

Use two points on the line: m=y2−y1x2−x1m=\dfrac{y_2-y_1}{x_2-x_1}. Subtract the coordinates in the same order in the numerator and denominator.

e.g. The line through (1,2)(1,2) and (5,10)(5,10) has gradient 10−25−1=2\dfrac{10-2}{5-1}=2.

What is a negative reciprocal?

To find the negative reciprocal of mm, turn it upside down and change its sign, giving −1m-\dfrac{1}{m}.

e.g. The negative reciprocal of 34\dfrac{3}{4} is −43-\dfrac{4}{3}, and the negative reciprocal of −5-5 is 15\dfrac{1}{5}.

How do you find the gradient from ax+by+d=0ax+by+d=0?

Rearrange to y=−abx−dby=-\dfrac{a}{b}x-\dfrac{d}{b}, so the gradient is −ab-\dfrac{a}{b}.

e.g. For 2x+3y−6=02x+3y-6=0, the gradient is −23-\dfrac{2}{3}.

What happens with horizontal and vertical lines?

A horizontal line has gradient 00 and a vertical line has no gradient, so the product rule cannot be used. A horizontal and a vertical line are always perpendicular.

e.g. The lines y=3y=3 and x=2x=2 are perpendicular.

Worked examples

1
Medium
No calc
[2 marks]

The line y=kx+1y=kx+1 is perpendicular to y=2x.y=2x. Find k.k.

Worked solution

Perpendicular ⇒k×2=−1.\Rightarrow k\times2=-1. M1
k=−12.k=-\tfrac12. A1

M1 Product =−1=-1 A1 k=−1/2k=-1/2
2
Hard
No calc
[4 marks]

The line through (1,2)(1,2) and (5,k)(5,k) is perpendicular to a line of gradient 4.

Find k.k.

Worked solution

The required gradient is −14.-\tfrac14. M1
k−25−1=−14.\dfrac{k-2}{5-1}=-\tfrac14. M1
k−2=−1.k-2=-1. A1
k=1.k=1. A1

M1 Perpendicular gradient M1 Gradient of segment A1 Solving k−24=−14\dfrac{k-2}{4}=-\tfrac14 to get k−2=−1k-2=-1 A1 k=1k=1
3
Medium
No calc
[3 marks]

Line A has gradient 23\tfrac23 and line B has gradient −32.-\tfrac32. Show that the lines are perpendicular.

Worked solution

Multiply the gradients: 23×(−32).\tfrac23\times(-\tfrac32). M1
23×(−32).=−1.\tfrac23\times(-\tfrac32). = -1. A1
Since the product is −1-1, the lines are perpendicular. R1

M1 Product of gradients A1 =−1=-1 R1 Conclude
4
Easy
No calc
[3 marks]

Find the exact distance between A(1,−2)A(1,-2) and B(6,10).B(6,10).

Worked solution

d=(6−1)2+(10−(−2))2.d=\sqrt{(6-1)^2+(10-(-2))^2}. M1
d=25+144=169.d = \sqrt{25+144}=\sqrt{169}. A1
d=13.d = 13. A1

M1 Substituting the given coordinates into the distance formula A1 Correct simplified value under the root, 169\sqrt{169} A1 Correct final exact distance 13

Common mistakes

  • Flipping the gradient without also negating it. A perpendicular gradient is the negative reciprocal, −1m-\dfrac{1}{m} - taking only the reciprocal (or only the negative) gives a line that isn't actually at right angles.
  • Mixing up which condition is which. m1=m2m_1=m_2 is parallel; m1m2=−1m_1m_2=-1 is perpendicular - under exam pressure it's easy to set up the wrong equation, especially when a question gives one gradient and asks for the other relationship.
  • Forgetting the vertical-line exception. A vertical line has no defined gradient, so it can't be checked against m1m2=−1m_1m_2=-1 directly - it's perpendicular to any horizontal line (m=0m=0) and parallel only to another vertical line.
  • Substituting coordinates into the gradient formula the wrong way round. m=y2−y1x2−x1m=\dfrac{y_2-y_1}{x_2-x_1} needs the same point first in both the numerator and the denominator - swapping only one of them flips the sign of the gradient, turning a correct perpendicular check into a wrong one even though every other step in the working was carried out correctly, which makes the mistake easy to overlook when checking back through the answer.

Quick questions

How do I find the gradient of a line perpendicular to another?

Take the negative reciprocal of the known gradient: if the given line has gradient mm, the perpendicular gradient is −1m-\tfrac1m. Multiplying the two together always gives −1-1.

How do I show that two lines are parallel?

Rearrange both equations into gradient-intercept form y=mx+cy=mx+c and compare the two mm values. If m1=m2m_1=m_2 the lines are parallel; if they also share the same cc they are actually the same line. For a quick refresher on your GDC, see Straight Lines.

How do I find the equation of a line perpendicular to y=2x+5y=2x+5 through (4,1)(4,1)?

The perpendicular gradient is −12-\dfrac{1}{2}. Then y−1=−12(x−4)y-1=-\dfrac{1}{2}(x-4), which rearranges to y=−12x+3y=-\dfrac{1}{2}x+3. Check: at x=4x=4, y=−2+3=1y=-2+3=1.

How do I check whether two lines in general form are parallel?

Find each gradient using −ab-\dfrac{a}{b} and compare. For 2x+4y=72x+4y=7 and x+2y=1x+2y=1, both gradients are −12-\dfrac{1}{2}, and the intercepts differ, so the lines are parallel and distinct.

Why is the product of perpendicular gradients −1-1?

A line of gradient mm goes 1 across and mm up. Turning that direction through a right angle gives mm back and 1 up, which has gradient −1m-\dfrac{1}{m}. For example, gradient 22 becomes gradient −12-\dfrac{1}{2}.

Ready to practise properly?

11 parallel-and-perpendicular-lines questions, marked instantly like the real exam.