➗ Mathematics

Straight Line Graphs: Gradient and y = mx + c

Plot straight lines, work out the gradient and read the equation from a graph. Covers y = mx + c (slope-intercept form), with worked examples.

  • ⏱ 3 min read
  • ✏️ 3 worked examples
  • 🎯 5 practice questions
  • 📶 Beginner
GCSEHigh School

Curriculum fit: GCSE Maths Algebra (Foundation and Higher). US: Grade 8 and Algebra I linear functions (Common Core Functions).

On this page

What Is It?

A straight line graph shows a linear relationship between x and y. Its equation can be written as y = mx + c, where m is the gradient (how steep the line is) and c is the y-intercept (where the line crosses the y-axis).

A positive gradient slopes up from left to right. A negative gradient slopes down. A gradient of zero is a horizontal line.

xyrun = 1rise = 2c = 1y = 2x + 1gradient m = 2y-intercept c = 1
In y = mx + c, m is the gradient (rise ÷ run) and c is where the line crosses the y-axis.

Key Formulas and Ideas

  • y = mx + c: m is the gradient, c is the y-intercept.
  • Gradient = change in y ÷ change in x = (y₂ − y₁) ÷ (x₂ − x₁).
  • Parallel lines have the same gradient.

Worked Examples

Example 1

Reading m and c

Question

State the gradient and y-intercept of y = −½x + 4.

  1. Compare with y = mx + c.
  2. m = −½ and c = 4.

✓ Answer Gradient −½, y-intercept 4

Example 2

Gradient From Two Points

Question

Find the gradient of the line through (1, 2) and (3, 8).

  1. Change in y: 8 − 2 = 6.
  2. Change in x: 3 − 1 = 2.
  3. Gradient = 6 ÷ 2 = 3.

✓ Answer 3

Example 3

Plotting a Line

Question

Draw y = 2x − 3 for x from 0 to 3.

  1. Work out y for each x: x = 0 gives −3, x = 1 gives −1, x = 2 gives 1, x = 3 gives 3.
  2. Plot (0, −3), (1, −1), (2, 1), (3, 3) and join them with a ruler.

✓ Answer A straight line through those four points

Common Mistakes to Avoid

  • Calculating gradient as change in x ÷ change in y.
  • Subtracting the coordinates in different orders on top and bottom.
  • Confusing the y-intercept with the x-intercept.
  • Not rearranging first: 2y = 4x + 6 has gradient 2, not 4.

Practice Questions

0 of 5 answered
Q1What is the gradient of y = 5x − 2?
Q2What is the y-intercept of y = 3x + 7?
Q3Find the gradient through (0, 1) and (4, 9).
Q4Which line is parallel to y = 2x + 1?
Q5What is the gradient of 2y = 6x + 4?

Frequently Asked Questions

What does a gradient of 3 mean?

For every 1 unit across, the line goes up 3 units.

How do I find where a line crosses the x-axis?

Set y = 0 and solve for x.

Take This Guide With You

Get a free printable PDF with the worked examples and quiz answers. Enter your email and the download starts straight away.

Sources and Review

Reviewed by StudyMorrow editorial review on 5 Nov 2026.