Every non-vertical straight line has an equation of the form y = mx + c. Here m is the gradient and c is the y-intercept — the value of y where the line crosses the y-axis (that is, where x = 0).
Reading m and c
If a line is already in the form y = mx + c, you can read off both numbers directly. For y = 3x − 4 the gradient is 3 and the y-intercept is −4. The number attached to x is always the gradient, and the number on its own is always the y-intercept.
Key idea
y = mx + c
m = gradient (steepness)
c = y-intercept (value of y when x = 0)
Building the equation
Find the gradient first, then the y-intercept, and substitute both into y = mx + c.
Worked example
Find the equation of the line through (0, 2) and (3, 8).
m = (8 − 2)/(3 − 0) = 6/3 = 2.
The line cuts the y-axis at (0, 2), so c = 2.
Equation: y = 2x + 2.
You can also check a point lies on a line by substituting its coordinates. The point (1, 4) lies on y = 2x + 2 because 2(1) + 2 = 4, which matches the y-value. This substitution test is handy in the exam when you are asked whether a given point is on a line.
Remember
- y = mx + c: m is the gradient, c is the y-intercept.
- c is the y-value when x = 0.
- Find m first, then c.
- If the line passes through the origin, c = 0 so y = mx.