← All notes
mathsGrade 9-102 min read

Straight-line graphs: everything from y = mx + c

One equation describes every straight line. Learn to read the gradient and intercept off it — and to find the equation of a line from two points — and the whole topic opens up.

Every straight line in the plane can be written as

y=mx+c,y = mx + c,

and the entire topic is reading meaning into those two letters: mm and cc. Get what each one does and you can sketch any line, or find its equation, in seconds.

What m and c tell you

m=change in ychange in x=y2y1x2x1m = \frac{\text{change in } y}{\text{change in } x} = \frac{y_2 - y_1}{x_2 - x_1}

A positive mm slopes uphill; a negative mm slopes down; a bigger number is steeper.

Finding the equation from two points

Given two points, say (1,3)(1, 3) and (3,9)(3, 9):

  1. Gradient first: m=9331=62=3m = \dfrac{9 - 3}{3 - 1} = \dfrac{6}{2} = 3.
  2. Then the intercept: sub one point into y=3x+cy = 3x + c. Using (1,3)(1,3): 3=3(1)+cc=03 = 3(1) + c \Rightarrow c = 0.
  3. Write it out: y=3xy = 3x.

Parallel and perpendicular

RelationshipGradient rule
Parallel linesSame gradient mm
Perpendicular linesGradients multiply to 1-1 (negative reciprocals)

So a line perpendicular to y=2x+1y = 2x + 1 has gradient 12-\tfrac{1}{2} — flip it and change the sign.

Gradient before intercept, always. Find mm from the two points first, then substitute a point to get cc. Trying to eyeball cc from a sketch is where the marks leak away.

Last revised 15 May 2025.