IB Maths AI HLLinear Functions & GraphsPaper 1 & 2Gradient 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: m1 = m2. The lines never meet.
Perpendicular: m1 × m2 = −1. The gradients are negative reciprocals: m2 = −1/m1.
To test: rearrange both lines to y = mx + c, then compare gradients.
Finding a parallel/perpendicular line through a given point: get the required gradient first, then use the point-gradient form y − y1 = m(x − x1).
Horizontal vs vertical: x = p and y = q are perpendicular (the negative-reciprocal rule breaks down because one gradient is undefined).
A product of gradients equal to +1 is not perpendicular: m1 = 5 and m2 = 1/5 are reciprocals but not negative ones.
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.
Same gradient on the left — the lines stay equidistant. Negative-reciprocal gradients on the right — the lines cross at a right angle.
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
Rearrange the given line into y = mx + c form and read off its gradient m1.
Get the new gradient: parallel ⇒ m = m1; perpendicular ⇒ m = −1/m1.
Drop into point-gradient form with the given point: y − y1 = m(x − x1).
Rearrange into the required form.
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 displaym₁ = 3rearrange 6x − 2y + 9 = 0 to y = mx + c2y = 6x + 9 ⇒ y = 3x + 9/2m₂ = 3m₁ = m₂ = 3 ⇒ parallelalways isolate y before comparing the coefficients of x.
Find the equation of the line through (−1, 5) parallel to 3x + 2y = 8. Give your answer as y = mx + c.
gradient of given line3x + 2y = 8 ⇒ y = −(3/2)x + 4m₁ = −3/2parallel ⇒ same gradientm = −3/2point-gradient with (−1, 5)y − 5 = (−3/2)(x + 1)y = −(3/2)x − 3/2 + 5y = −(3/2)x + 7/2check 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/2point-gradient with (3, 1)y − 1 = (−1/2)(x − 3)y = −x/2 + 3/2 + 1y = −x/2 + 5/2flip 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 gradientl₁: m₁ = 2l₂: 4x − 2y = 5 ⇒ y = 2x − 5/2 ⇒ m₂ = 2l₃: x + 2y = 7 ⇒ y = −x/2 + 7/2 ⇒ m₃ = −1/2compare pairsm₁ = 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₂ = −1y − (−1) = −1(x − 3)y + 1 = −x + 3y = −x + 2(b) intersection: set y-values equalx + 2 = −x + 2 ⇒ 2x = 0 ⇒ x = 0y = 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
Rearrange to y = mx + c first — the gradient is always the coefficient of x.
For perpendicular, the gradient is flip the fraction, change the sign: 3/4 → −4/3.
Use the GDC to verify: plot both lines and inspect whether they look parallel or meet at right angles.
For horizontal & vertical lines (y = q and x = p) the gradient rule fails — treat as a special case: always perpendicular.
One perpendicular line works for an entire family of parallel lines — if l ⊥ l1, then l ⊥ every line parallel to l1.
âš Common mistakes
Forgetting the negative sign in the perpendicular gradient — 3 and 1/3 are reciprocals but not perpendicular.
Comparing gradients without rearranging — you can’t read the gradient straight off ax + by + d = 0.
Using the wrong point when substituting into point-gradient form — the line must pass through the given point.
Sign slips with y − (−y1) and similar — brackets keep you safe.
Claiming horizontal and vertical lines are not perpendicular — they are, even though the gradient rule breaks down.
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.