Every straight line has a constant steepness called its gradient. Once you know the gradient and one point on the line, you can write its equation in three different forms โ and each form is useful in different situations.
๐
What you need to know
How to find the gradient between two points using the formula
The three forms of a straight line equation: y = mx + c, the point-gradient form, and the general form
How to find the equation of a line given a gradient and a point, or two points
How to read the x-intercept and y-intercept from each form
How to rearrange between forms โ especially clearing fractions for the form ax + by + d = 0
Finding the Gradient
The gradient tells you how steep the line is. To find it, pick any two points on the line โ call them (x1, y1) and (x2, y2).
m = y2 โ y1x2 โ x1
(given in the formula booklet)
Gradient = rise รท run
The line goes up by yโ โ yโ across a horizontal distance of xโ โ xโ
What the gradient tells you
The number you get from the formula tells you how the line behaves:
Positive
m > 0 โ going up
Negative
m < 0 โ going down
Zero
m = 0 โ horizontal
Undefined
vertical line
Quick read: a gradient of 1 means up 1, right 1. A gradient of โ2 means down 2, right 1. The bigger the absolute value, the steeper the line.
The Three Forms of a Straight Line
A straight line can be written in three equivalent forms. Each one is best for a different situation.
Gradient-Intercept
y = mx + c
Best when you can read the gradientm and the y-intercept(0, c) directly.
Point-Gradient
y โ y1 = m(x โ x1)
Best when you have a gradient and a known point(x1, y1).
General Form
ax + by + d = 0
Used when answers must be in integer form. Both intercepts are easy to find.
From the general form, the x-intercept is โda and the y-intercept is โdb. Set the other variable to 0 and solve.
Finding the Equation of a Line
Whatever information you’re given, follow this strategy:
If you have two points, find the gradient first using the formula.
Plug the gradient and any one point into the point-gradient form: y โ y1 = m(x โ x1).
Rearrange into the form the question asks for โ usually y = mx + c or ax + by + d = 0.
For general form, multiply through to clear fractions and ensure a, b, d are integers.
GDC shortcut: on Paper 2, enter both points in statistics mode and run a linear regression. The calculator gives you y = ax + b directly.
Worked Examples
โ
Example 1 โ Find the gradient between two points
Find the gradient of the line passing through the points (1, โ3) and (5, 9).
Answer:
Step 1: label the points and apply the formula.(xโ, yโ) = (1, โ3), (xโ, yโ) = (5, 9)m = (9 โ (โ3)) / (5 โ 1)m = 12 / 4m = 3Positive gradient โ the line goes up from left to right.
โ
Example 2 โ Find the equation given gradient and a point
A line has gradient 4 and passes through the point (2, โ3). Find its equation in the form y = mx + c.
Find the equation of the line passing through (โ1, 4) and (3, 12). Give your answer in the form y = mx + c.
Answer:
Step 1: find the gradient.m = (12 โ 4) / (3 โ (โ1))m = 8 / 4 = 2Step 2: use point-gradient form with (โ1, 4).y โ 4 = 2(x โ (โ1))y โ 4 = 2(x + 1)y โ 4 = 2x + 2y = 2x + 6Check: at x = 3, y = 2(3) + 6 = 12 โ
โ
Example 4 โ Equation in general form (integer coefficients)
The line l passes through the points (โ2, 5) and (6, โ7). Find the equation of l in the form ax + by + d = 0, where a, b, and d are integers.
Answer:
Step 1: find the gradient.m = (โ7 โ 5) / (6 โ (โ2))m = โ12 / 8 = โ3/2Step 2: use point-gradient form with (โ2, 5).y โ 5 = โ3/2 (x โ (โ2))y โ 5 = โ3/2 (x + 2)Step 3: multiply both sides by 2 to clear the fraction.2(y โ 5) = โ3(x + 2)2y โ 10 = โ3x โ 6Step 4: rearrange so right side is 0.3x + 2y โ 10 + 6 = 03x + 2y โ 4 = 0a = 3, b = 2, d = โ4 โ all integers โ
โ
Example 5 โ Find the x-intercept and y-intercept
The line l has equation 3x + 4y โ 12 = 0. Find the coordinates of the x-intercept and the y-intercept.
Answer:
Step 1: x-intercept โ set y = 0.3x + 4(0) โ 12 = 03x = 12 โ x = 4x-intercept: (4, 0)Step 2: y-intercept โ set x = 0.3(0) + 4y โ 12 = 04y = 12 โ y = 3y-intercept: (0, 3)
๐ก
Tips
Always start with point-gradient form. It works for every situation โ just plug in and rearrange.
Pick the easier point. If you have two points, pick the one with smaller or simpler numbers to avoid sign errors.
Check your answer: plug a known point back into your final equation. Both sides should match.
For general form, if your gradient has a denominator, multiply both sides by it to clear the fraction.
On Paper 2, use your GDC’s linear regression mode for instant equations from two points.
โ
Common mistakes
Mixing up the order in the gradient formula. The y-difference goes on TOP, the x-difference on the bottom. yโ โ yโxโ โ xโ โ never the other way around.
Sign errors with negative coordinates. Subtracting a negative becomes adding: y โ (โ3) = y + 3, not y โ 3.
Wrong order of subtraction. Keep the same order on top and bottom โ if you do (y2 โ y1) on top, it must be (x2 โ x1) on the bottom โ same direction.
Forgetting to clear fractions when the question asks for integer form ax + by + d = 0. If your gradient is a fraction, you must multiply through.
Stopping too early. If the question wants y = mx + c, you must finish the rearrangement โ don’t leave it as y โ 5 = 2(x + 1).
Confusing the y-intercept with the gradient. In y = 3x + 7, the gradient is 3 and the y-intercept is (0, 7) โ not the other way round.
Final word: Master the gradient formula and the point-gradient form, and you can answer any straight-line question. Everything else is just rearranging.
Need help with Linear Functions?
Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.