IB Maths AI HL Linear Functions & Graphs Paper 1 & 2 Gradient relationships ~7 min read

Parallel & Perpendicular Lines

Two straight lines are parallel when their gradients match and perpendicular when their gradients multiply to −1. Both relationships read off directly from the y = mx + c form — rearrange first, compare coefficients, done.

📘 What you need to know

Parallel lines

Two lines are parallel exactly when they have the same gradient. Geometrically they keep the same distance apart and never meet. To test if two lines are parallel, rearrange both into y = mx + c form and compare the coefficients of x; if they match, the lines are parallel.

Perpendicular lines

Two lines are perpendicular when their gradients are negative reciprocals: m1 × m2 = −1, or equivalently m2 = −1/m1. Flip the fraction, change the sign — that’s the new gradient. Test the same way: rearrange to y = mx + c, multiply gradients, check for −1.

Parallel and perpendicular — both read off from the gradient PARALLEL — same gradient x y y = x + 2 y = x − 2 m1 = m2 = 1 same gradient ⇒ parallel PERPENDICULAR — negative reciprocals x y y = 2x y = −x/2 m1 × m2 = 2 × (−½) = −1 product −1 ⇒ perpendicular
Same gradient on the left — the lines stay equidistant. Negative-reciprocal gradients on the right — the lines cross at a right angle.
Gradient relationships parallel:   m1 = m2 perpendicular:   m1 × m2 = −1,   equivalently   m2 = −1m1

Finding parallel and perpendicular line equations

Given a line and a point, finding the parallel or perpendicular line through that point is a two-step job: (1) work out the required gradient, and (2) drop into point-gradient form with the given point and gradient. Rearrange to the form the question asks for.

Quick reference: parallel to y = 2x + 3 means gradient 2; perpendicular to y = 2x + 3 means gradient −1/2. Always rearrange the given line into y = mx + c form first so the gradient is on display.

🧭 Recipe — line through a point, parallel or perpendicular to a given line

  1. Rearrange the given line into y = mx + c form and read off its gradient m1.
  2. Get the new gradient: parallel ⇒ m = m1; perpendicular ⇒ m = −1/m1.
  3. Drop into point-gradient form with the given point: yy1 = m(xx1).
  4. Rearrange into the required form.
  5. Sanity-check: the new line should pass through the given point.

Worked examples

WE 1

Determine if two lines are parallel

Are the lines y = 3x − 2 and 6x − 2y + 9 = 0 parallel?

first line: gradient on display m₁ = 3 rearrange 6x − 2y + 9 = 0 to y = mx + c 2y = 6x + 9 ⇒ y = 3x + 9/2 m₂ = 3 m₁ = m₂ = 3 ⇒ parallel always isolate y before comparing the coefficients of x.
WE 2

Determine if two lines are perpendicular

Are 4x + 6y = 12 and 3x − 2y = 5 perpendicular?

rearrange both 4x + 6y = 12 ⇒ y = −(2/3)x + 2;   m₁ = −2/3 3x − 2y = 5 ⇒ y = (3/2)x − 5/2;   m₂ = 3/2 multiply the gradients m₁ · m₂ = (−2/3) · (3/2) = −1 product = −1 ⇒ perpendicular negative reciprocals always multiply to −1.
WE 3

Parallel line through a point

Find the equation of the line through (−1, 5) parallel to 3x + 2y = 8. Give your answer as y = mx + c.

gradient of given line 3x + 2y = 8 ⇒ y = −(3/2)x + 4 m₁ = −3/2 parallel ⇒ same gradient m = −3/2 point-gradient with (−1, 5) y − 5 = (−3/2)(x + 1) y = −(3/2)x − 3/2 + 5 y = −(3/2)x + 7/2 check at x = −1: y = 3/2 + 7/2 = 5 ✓
WE 4

Perpendicular line through a point

Find the equation of the line through (3, 1) perpendicular to y = 2x + 5. Give your answer as y = mx + c.

m₁ = 2; perpendicular gradient is −1/m₁ m = −1/2 point-gradient with (3, 1) y − 1 = (−1/2)(x − 3) y = −x/2 + 3/2 + 1 y = −x/2 + 5/2 flip the fraction, change the sign — that’s the perpendicular gradient.
WE 5

Classify three lines

For the lines l1: y = 2x + 3, l2: 4x − 2y = 5 and l3: x + 2y = 7, state which pairs are parallel and which are perpendicular.

find each gradient l₁: m₁ = 2 l₂: 4x − 2y = 5 ⇒ y = 2x − 5/2 ⇒ m₂ = 2 l₃: x + 2y = 7 ⇒ y = −x/2 + 7/2 ⇒ m₃ = −1/2 compare pairs m₁ = m₂ ⇒ l₁ ∥ l₂ m₁ · m₃ = 2 · (−1/2) = −1 ⇒ l₁ ⊥ l₃ m₂ · m₃ = −1 ⇒ l₂ ⊥ l₃ l₁ ∥ l₂ · l₃ ⊥ both l₁ and l₂ a single line can be perpendicular to a whole family of parallel lines at once.
WE 6

Perpendicular through a point, then intersect

Line l1 has equation y = x + 2. Point P has coordinates (3, −1). (a) Find the equation of the line l2 through P perpendicular to l1. (b) Find the intersection of l1 and l2.

(a) m₁ = 1; perpendicular gradient m₂ = −1 y − (−1) = −1(x − 3) y + 1 = −x + 3 y = −x + 2 (b) intersection: set y-values equal x + 2 = −x + 2 ⇒ 2x = 0 ⇒ x = 0 y = 0 + 2 = 2 (a) l₂: y = −x + 2 · (b) (0, 2) (0, 2) is the foot of the perpendicular from P onto l₁.

💡 Top tips

âš  Common mistakes

That completes Linear Functions & Graphs. From writing down a line through two points to deciding whether two lines are parallel or perpendicular, you now have everything needed for the linear part of AI HL Paper 1 & 2.

Need help with AI HL Linear Functions?

Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.

Book Free Session →