Skip to content
Brainlag

Theme

Colour

Straight-line graphs: y = mx + c

GCSE Maths Updated Wed 7 Oct 2026

Every straight line (except a vertical one) has an equation y = mx + c. Once you can read m and c, you can sketch a line, find its equation from two points, and spot lines that are parallel.

Part 1 of 3: Learn it

In short

  1. In y = mx + c, m is the gradient and c is where the line crosses the y-axis.
  2. The gradient is the change in y divided by the change in x.
  3. Parallel lines have the same gradient; perpendicular gradients multiply to −1 (Higher).

Where this is in your specification

Spec points: DfE A8, A9 and A10 (perpendicular gradients are Higher tier)

BoardTopic: Straight-line graphs
DfE contentA8, A9, A10, A17, R14
AQA 8300Algebra
Edexcel 1MA1Algebra
OCR J5607 Graphs of equations and functions
Eduqas C300HA8 to HA10
Cambridge IGCSE 0580E3.1 to E3.7
National 5 C847 75Algebraic skills: the equation of a straight line

Gradient and intercept

y = mx + c
gradient m = (y₂ − y₁) ÷ (x₂ − x₁)

A positive gradient slopes up from left to right, a negative one slopes down. The bigger the number, the steeper the line. The y-intercept is the point (0, c).

Rearrange first if needed: 2y − 6x = 8 becomes 2y = 6x + 8, then y = 3x + 4, so m = 3 and c = 4.

Plotting a line

Make a table of values: pick three x values, work out y for each, plot the points and join them with a ruler. Three points rather than two will show you if one is wrong. Horizontal lines are y = a number; vertical lines are x = a number.

Finding the equation of a line

  • Work out m from two points on the line.
  • Put m and one point into y = mx + c and solve for c.
  • Write the equation with your values of m and c.

Parallel, perpendicular and midpoints

Parallel lines share the same m. For a perpendicular line (Higher), flip the gradient and change its sign: a line perpendicular to gradient 2/3 has gradient −3/2.

The midpoint of two points is the mean of the x values and the mean of the y values: the midpoint of (2, −3) and (8, 5) is (5, 1).

Quick check

What are the gradient and y-intercept of y = 5 − 4x?

Show the answer

Gradient −4, y-intercept (0, 5).

Part 2 of 3: See it worked

Worked examples

Example 1

Find the equation of the line through (1, 4) and (5, 16).

  1. m = (16 − 4) ÷ (5 − 1) = 12 ÷ 4 = 3
  2. Use (1, 4): 4 = 3 × 1 + c, so c = 1
  3. Check with (5, 16): 3 × 5 + 1 = 16

Answer: y = 3x + 1.

Example 2

Find the equation of the line parallel to y = −2x + 7 that passes through (3, 5).

  1. Parallel, so m = −2
  2. 5 = −2 × 3 + c, so 5 = −6 + c
  3. c = 11

Answer: y = −2x + 11.

Common mistakes

  • Dividing the change in x by the change in y.
  • Taking the y values in one order and the x values in the other, which flips the sign of the gradient.
  • Reading c from an equation that has not been rearranged into y = mx + c first.
  • Using the reciprocal without changing the sign for a perpendicular gradient.
Quick check

Find the gradient of the line through (−2, 3) and (4, 0).

Show the answer

(0 − 3) ÷ (4 − (−2)) = −3 ÷ 6 = −1/2.

Part 3 of 3: Test yourself

Check yourself

Answer each one in your head or on paper first, then open it to check.

What are the gradient and y-intercept of y = 5 − 4x?

Gradient −4, y-intercept (0, 5).

Find the gradient of the line through (−2, 3) and (4, 0).

(0 − 3) ÷ (4 − (−2)) = −3 ÷ 6 = −1/2.

Write the equation of the line through the origin perpendicular to y = 2x − 1.

Gradient −1/2 and c = 0, so y = −½x.

Jobs that use this

Each link opens the job profile on the National Careers Service (England). In the rest of the UK: My World of Work (Scotland), Careers Wales, nidirect careers (Northern Ireland).

Full lessons and marked practice for this course are coming soon to Brainlag Learn. See courses