Guide
Gradient and y-intercept: what m and c mean
In y = mx + c the gradient m says how far the line goes up for every 1 along, and c says where it crosses the y-axis. Here is how to read both off a graph and out of a taxi fare.
In the equation of a straight line, , there are two values we don't know to begin with: and . This guide shows what each of them means, how to read them off a graph, and how to find them in a real situation like a taxi fare. The usual hurdle is the second half: a meaning like "crossing with the y-axis" can feel odd until you have seen it as a start fee.
When do I use this?
Every time you meet a linear function. If you are given a graph, you read and off it. If you are given a situation in words, you pick and out of the information and write the equation yourself. And whenever a question asks what the gradient means in context, the answer is always the same shape: how much grows for every 1 step in .
The gradient m
is the gradient of the line. The gradient of a straight line is defined as how far we go up the y-axis when we go 1 along the x-axis. In the picture you can see the definition of what the gradient is.
If the function went 4 up the y-axis when it goes 1 along the x-axis, would be 4. As you might guess, that means the bigger is, the steeper the straight line. The gradient tells us something about how much the function slopes.
Negative gradients
We can easily have gradients that are negative. If we had a gradient of , the graph would look roughly like this:
Notice how the graph now slopes downwards, because is negative. In this example, every time we go 1 along the x-axis, we go 2 down the y-axis.
The y-intercept c
is rather simpler. It describes where the function crosses the y-axis.
If the function hits the y-axis at 2, then is 2.
How do we know that describes the crossing with the y-axis? All the points on the y-axis have one thing in common: their -values are all 0. That is what it means to be on the y-axis. So if we want to find the place where the function is on the y-axis, we just put 0 in 's place in the equation of the line:
We can see that the term with disappears completely, because it is multiplied by 0, and so we only have left:
We have now shown that the crossing point between the y-axis and our straight line is what describes.
Setting up a linear function from a description
Let's take an example with both and . Say a function goes 5 up the y-axis when it goes 1 along the x-axis. The function also crosses the y-axis at 3. We can now set up the function:
is 5 because the function goes 5 up the y-axis when it goes 1 along the x-axis. is 3 because the function crosses the y-axis at 3.
m and c in real life: the taxi
When we work with linear functions in real life, a meaning like "crossing with the y-axis" can seem odd, so let's look at an example that helps with the understanding.
As we know, shows how much we go up the y-axis when we go 1 along the x-axis. Say we order a taxi, and we would like to set up a function for the price, so we can work out exactly what it will cost for every km we drive. We are told that it costs £2 per km, and that there is also a start fee of £4.
We can start by seeing which variables we need on the x-axis and the y-axis. Here it looks like the price depends on how far we drive, so we put km on the x-axis and the price on the y-axis. That is what makes the most sense.
We know a linear function comes in the form , so we just need to find and . We are told that when we have driven 1 km, we pay £2. That is exactly what is: how much we go up the y-axis when we go 1 along the x-axis. So we have a gradient of 2.
But we also see that there is a start fee of £4, so when we get into the taxi, we start at £4. That matches our , the crossing with the y-axis. We pay £4 even though we have driven 0 km. So we have to remember that the function starts at 4 on the y-axis, and then grows by £2 per km.
We have now made the equation of the straight line:
At GCSE the gradient is also called a rate of change, and here you can see why: it is simply the £ per km. For 3 km the price is , so £10.
We have to remember that describes the growth on the y-axis when we go 1 along the x-axis. If we were told £6 for 3 km, the gradient is not 6, because then we are told that we go 6 up when we go 3 along. We have to rewrite the information so it shows how much we go up the y-axis when we go only 1 along, not 2, or 5, or something else. £6 for 3 km is pounds per km, so is still 2.
When we solve problems where we have to set up a function or find and , we should always look for these two types of information: how much we go up the y-axis when we go 1 along the x-axis, and any start value.
Common mistakes
- "m is just the number in front of x." It is that, but it is also something you can see. is how far the line rises (or falls) every time you move 1 to the right. Use the picture: a small step of 1 along, and read how far up you went.
- "c is the value at the start of the story, so it is part of the growth." No. is where the line crosses the y-axis, the value when . The £4 start fee is paid whether you drive 1 km or 20 km. It never grows.
- "£6 for 3 km means m = 6." The gradient is the growth for exactly 1 step along the x-axis. Rewrite the information first: £6 for 3 km is £2 per km, so .
Related
- Back to the pillar: linear functions and straight-line graphs.
- When you are given two points instead of the gradient: finding the equation of a straight line from two points.
- When you are given lots of points from data: scatter graphs and the line of best fit.
Frequently asked questions
Read next
Want to get good at maths?
Mathara explains every topic step by step with videos, exercises and personal feedback.
👉 Get started for free