What you need to know
Every straight line can be written as y = mx + c. The number m is the gradient: how steep the line is, measured as rise ÷ run (how far up for each step across). The number c is the y-intercept: where the line crosses the y-axis, which is the value of y when x = 0.
To find the gradient from two points, subtract the y-values and divide by the difference in the x-values, in the same order: m = (y₂ − y₁) ÷ (x₂ − x₁). A positive gradient rises from left to right, a negative gradient falls, a zero gradient is a horizontal line, and a vertical line has no defined gradient.
Find the gradient of the line through (1, 3) and (4, 9)
- Rise: 9 − 3 = 6.
- Run: 4 − 1 = 3.
- m = 6 ÷ 3 = 2. For every 1 step right, the line goes up 2.
State the gradient and y-intercept of y = −3x + 5, then of 2y = 6x − 8
- y = −3x + 5 is already in the form y = mx + c: m = −3, c = 5.
- 2y = 6x − 8 is not. Divide every term by 2 to make y the subject: y = 3x − 4.
- Now read off: m = 3, c = −4.
Find the equation of the line with gradient 3 that passes through (2, 7)
- Start with y = 3x + c.
- Substitute the point: 7 = 3 × 2 + c, so 7 = 6 + c and c = 1.
- Equation: y = 3x + 1. Check: when x = 2, y = 6 + 1 = 7.
From two points. Find the gradient first, then substitute one of the points to find c. For the line through (0, −2) and (4, 6): m = (6 − (−2)) ÷ (4 − 0) = 8 ÷ 4 = 2. The point (0, −2) is on the y-axis, so c = −2 straight away, and the equation is y = 2x − 2. Check with (4, 6): 2 × 4 − 2 = 6.
Sketch y = 12x − 1
- Plot the y-intercept: (0, −1).
- Use the gradient 12 as rise 1, run 2: from (0, −1) move 2 right and 1 up to (2, 0). Plot it.
- Rule a straight line through both points and extend it in both directions.
- Check with the x-intercept: set y = 0, so 0 = 12x − 1, giving x = 2. The line crosses the x-axis at (2, 0), which matches.
| Gradient | What the line looks like | Example |
|---|
| Positive | Rises from left to right | y = 2x + 1 |
| Negative | Falls from left to right | y = −x + 4 |
| Zero | Horizontal | y = 3 |
| Undefined | Vertical | x = −2 |
Common mistake: reading m and c from an equation that is not in the form y = mx + c. In 2y = 6x − 8 the gradient is 3, not 6, and in y = 5 − 2x the gradient is −2, not 5. Rearrange first, then read the number in front of x.
Common mistake: subtracting the coordinates in different orders on the top and bottom. For (2, 5) and (6, 3), m = (3 − 5) ÷ (6 − 2) = −2 ÷ 4 = −12. Whichever point you put first on the top must also be first on the bottom.
Check yourself
- State the gradient and y-intercept of y = 4x − 7.
- Find the gradient of the line through (0, 2) and (3, 11).
- Find the gradient of the line through (2, 5) and (6, 3).
- Rearrange 3y = 9x + 6 into the form y = mx + c and state m and c.
- Find the equation of the line with gradient −2 passing through (0, 4).
- Find the x-intercept of y = 2x − 8.
Answers: 1. m = 4, c = −7 2. 3 3. −12 4. y = 3x + 2, so m = 3, c = 2 5. y = −2x + 4 6. x = 4 (set y = 0)