Skip to main content

Straight-line graphs for Year 8 — a complete summary with examples

MathsUK · 10 July 2026 · 9 min read

A linear function is any function whose graph is a straight line, and it is written in the form y = mx + c. m is the gradient — a number telling you how many units y changes for every unit of x — and c is the y-intercept, that is the value of y when x = 0. This summary goes over everything you need to know for a Year 8 test: what the parameters mean, how to read a graph, and three fully worked examples.

The short answer
A linear function is a function of the form y = mx + c, whose graph on a coordinate grid is always a straight line. m is the gradient — it decides how much y goes up or down for every unit of x — and c is the y-intercept, the value of y when x = 0. Those are the only two numbers that define the whole line, and it is enough to find them (or two points on the line) to write the equation or draw the graph.

What is a linear function?

A linear function (also called a straight-line function) is any function that can be written in the form y = mx + c, where m and c are fixed numbers. The name 'linear' comes from the fact that its graph, when you draw it on a set of axes, is always a straight line — no bends, no jumps. It is taught in Year 8 as a direct continuation of solving equations in Year 7, and turns them into something graphical: instead of a single solution, you look at the infinitely many pairs (x, y) that satisfy the relationship.

In the formula y = mx + c, each letter stands for something different: x is the independent variable (the one you choose), y is the dependent variable (the one you get out), m is the gradient, and c is the y-intercept. Some textbooks write y = ax + b instead of y = mx + c — it is exactly the same thing, just a different letter for the same job. GCSE papers use y = mx + c.

What is the gradient (m) and what does it mean?

The gradient m describes the rate of change of the line — how much y changes every time x increases by 1. It is the most important idea to understand in linear functions, because it is what decides how the line 'behaves'.

Value of the gradient mWhat happens to the lineExample
m positive (m > 0)The line goes up from left to righty = 2x + 1
m negative (m < 0)The line goes down from left to righty = −3x + 5
m = 0The line is completely horizontal, neither up nor downy = 4
m large (for example 5)The line is steep — goes up fasty = 5x
m small (for example 0.2)The line is gentle — goes up slowlyy = 0.2x

The y-intercept, which is c, is simply the value of y when you substitute x = 0. Geometrically — it is the point where the line 'touches' the vertical axis. It is easy to spot both on the graph (where the line crosses the y-axis) and in the equation (the constant term, with no x).

3 worked examples

Example 1: finding y for a given x

You are given the function y = 3x − 2. What is the value of y when x = 4? Substitute x = 4 into the formula: y = 3 × 4 − 2 = 12 − 2 = 10. So the point (4, 10) lies on the graph of the function.

Example 2: finding the equation from a gradient and a point

You know the gradient of the function is m = 2, and it passes through the point (3, 7). Find c. Substitute into the formula y = mx + c: 7 = 2 × 3 + c, that is 7 = 6 + c, so c = 1. The full equation: y = 2x + 1. Check: 2 × 3 + 1 = 7 — it works.

Example 3: finding the equation from two points

You are given the two points (1, 4) and (3, 10). First work out the gradient: m = (y₂ − y₁)/(x₂ − x₁) = (10 − 4)/(3 − 1) = 6/2 = 3. Then substitute m = 3 and one of the points, for example (1, 4): 4 = 3 × 1 + c, so c = 1. The equation: y = 3x + 1. Check with the second point: 3 × 3 + 1 = 10 — exactly right.

How do you read the graph of a linear function?

To read a graph properly, you look at two things: where the line crosses the y-axis (that is c), and how fast it goes up or down (that is m). To read m from the graph itself, choose two clear points on the line, count how many squares you go up vertically and how many you move horizontally between them, and divide: gradient = rise ÷ run. For example, if between two points you go up 6 squares and move 2 to the right, the gradient is 6/2 = 3.

To draw a graph from an equation, the safest way is to find two points (for example substitute x = 0 and x = 1) and join them with a straight line — three points is even better, because the third acts as a check. You can check the graph with an interactive function grapher that draws the function the moment you type in the equation.

Common mistakes

  • Mixing up m and c — remember that m always sits next to x (it affects the gradient), and c is always on its own (the starting value).
  • Forgetting a minus sign — in an equation like y = −2x + 5, substituting x = 3 must give y = −2 × 3 + 5 = −1, not 11.
  • Working out the gradient upside down — the formula is (y₂ − y₁)/(x₂ − x₁), the difference in y divided by the difference in x, not the other way round.
  • Confusing a gradient of 0 with an undefined gradient — y = 4 is a horizontal line with gradient 0, whereas x = 4 is a vertical line that is not a function at all.
  • Forgetting to check the answer — after finding an equation from two points, you must substitute both of them and make sure they fit.
💡 A tip for the test
Before you build an equation from two points, write the two pieces of data down at the side first: (x₁, y₁) and (x₂, y₂). That prevents sign mix-ups when substituting into the gradient formula, which is the most common mistake in tests.

Exercises and worksheets

Once the principles are clear, the next stage is practice on a variety of questions — finding y from x, finding the equation from a gradient and a point, finding the equation from two points, and reading graphs. You can practise on the Year 8 algebra page with interactive exercises, work through a structured lesson on the lesson page, or download a printable worksheet with graded exercises and full solutions.

Frequently asked questions

What is a linear function in Year 8?

A linear function is a function of the form y = mx + c whose graph is a straight line. m is the gradient (the rate of change) and c is the y-intercept. It is taught in Year 8 as the continuation of equations from Year 7, with a move to graphical thinking.

Where can I find a summary of straight-line graphs for Year 8?

The full summary covers: the definition of y = mx + c, the meaning of the gradient m and the intercept c, how to read a graph, and how to find an equation from a gradient and a point or from two given points — all of it set out in this guide with worked examples.

Where are there exercises on straight-line graphs for Year 8?

You can practise on the MathsUK Year 8 algebra page, which includes interactive exercises graded by difficulty with instant feedback on every answer.

Are there printable worksheets on straight-line graphs for Year 8?

Yes — the Year 8 algebra worksheet includes exercises graded from easy to hard, including finding y from x, finding an equation from a gradient and a point, and finding an equation from two points, with full solutions to print.

Interactive exercises for Year 8 with instant feedback — exactly what appears in the summary.

Practise straight-line graphs now

Links that might help

Algebra for Year 8Algebra lesson for Year 8Printable algebra worksheet — Year 8Interactive function grapherLinear functions for Year 8 — an explanation with a graph

← Back to all articles

We keep your progress and preferences in your browser only (local storage), and use analytics cookies to improve the site. Read the privacy notice.

More information