top of page
Landing%2520Page_edited_edited.jpg

Linear Graphs

Online Maths Courses

Quick Links

Every straight-line graph can be written as y = mx + c, where m is the gradient and c is the y-intercept, the point where the line crosses the y-axis. The gradient measures steepness: change in y divided by change in x. With the gradient and one point, substitute to find c and write the equation. Parallel lines have the same gradient.

Straight lines

  • y = mx + c: gradient m, y-intercept (0, c)
  • Gradient = change in y ÷ change in x
  • Positive gradient: uphill; negative gradient: downhill
  • Parallel lines have equal gradients
  • Rearrange to y = … before reading m and c

Reading y = mx + c

In y = mx + c, the coefficient of x is the gradient and the constant is the y-intercept. For y = −4x + 9, the gradient is −4, so the line slopes downwards, and it crosses the y-axis at (0, 9). The equation must start with y = for this to work.


Gradient from two points

The gradient is the change in y divided by the change in x between any two points on the line. From (1, 6) to (5, 8), y rises by 2 while x increases by 4, so the gradient is 2/4 = ½. Subtract in the same order on the top and the bottom, and a falling line will give a negative answer.


Finding the equation of a line

If you know the gradient m and the y-intercept c, write y = mx + c straight away. If you know the gradient and a different point, substitute that point's coordinates to find c. For gradient 3 through (2, 7): 7 = 3 × 2 + c, so c = 1 and the line is y = 3x + 1. With two points, find the gradient first, then c.


Parallel lines

Parallel lines have the same gradient, so they never meet. A line parallel to y = 4x − 1 has gradient 4. If it passes through (1, 7), then 7 = 4 + c, so c = 3, giving y = 4x + 3.


Rearranging to y = mx + c

If an equation is not in the form y = mx + c, rearrange it first. 4y − 2x = 12 becomes 4y = 2x + 12, then y = ½x + 3, so the gradient is ½ and the y-intercept is 3.

Worked examples

Example 1. Write down the gradient and y-intercept of y = −4x + 9.

  1. The coefficient of x is −4.
  2. The constant is 9.

Answer: Gradient −4; y-intercept (0, 9).


Example 2. Find the gradient of the line through (1, 6) and (5, 8).

  1. Change in y: 8 − 6 = 2. Change in x: 5 − 1 = 4.
  2. 2 ÷ 4.

Answer: ½.


Example 3. A line has gradient 3 and passes through (2, 7). Find its equation.

  1. Substitute into y = 3x + c: 7 = 6 + c.
  2. c = 1.

Answer: y = 3x + 1.


Example 4. Find the equation of the line through (−2, 8) and (4, −1).

  1. Gradient: (−1 − 8) ÷ (4 − (−2)) = −9 ÷ 6 = −1.5.
  2. Substitute (−2, 8): 8 = 3 + c, so c = 5.

Answer: y = −1.5x + 5.


Example 5. Find the equation of the line parallel to y = 4x − 1 that passes through (1, 7).

  1. Parallel, so the gradient is 4.
  2. 7 = 4 × 1 + c, so c = 3.

Answer: y = 4x + 3.


Example 6. Find the gradient of the line 4y − 2x = 12.

  1. Rearrange: 4y = 2x + 12.
  2. Divide by 4: y = ½x + 3.

Answer: Gradient ½.

Common mistakes

  • Reading m before rearranging. Write the equation as y = mx + c first.
  • Dividing x by y. Gradient is change in y over change in x.
  • Sign errors with negative coordinates. Use brackets: 4 − (−2) = 6.
  • Confusing the intercept with a point. The y-intercept c is the point (0, c).
  • Changing the gradient for a parallel line. Parallel lines keep the same gradient.

How straight-line graphs are examined

Edexcel tests straight-line graphs at Foundation and Higher for GCSE and iGCSE alike, with perpendicular lines added at Higher. Expect to:

  • state the gradient and y-intercept of a line
  • find a gradient from two points or from a graph
  • find the equation of a line through given points
  • find the equation of a parallel line, or a perpendicular one (Higher)


Gradient and equation questions are collected on the linear graphs worksheet, with answers. To keep going, the GCSE algebra revision engine makes new lines each time.


Gradients link to gradients as rates of change. At A-Level, see straight line equations.

Frequently asked questions

What does m mean in y = mx + c?

The gradient, which is how much y increases for each increase of 1 in x.


How do you find the gradient between two points?

Divide the change in y by the change in x.


What do parallel lines have in common?

They have the same gradient.

bottom of page