Straight lines: what m and c actually do
What this lesson covers
- For a specific straight line, the gradient, m, and y-intercept, c, are fixed, and x varies with y according to the rule y = mx + c.
- The y-intercept touches the y-axis and has coordinates (0,c).
- In the equation of a line y = mx + c, m and c represent constants (they are unchanging), y and x can vary, and all the values of x and y that satisfy the equation create an infinite number of points that form the line.
- The gradient is a ratio that can be interpreted as the ‘steepness’ of a linear graph. A positive gradient slopes upwards when the graph is read from left to right. A negative gradient slopes downwards when the graph is read from left to right. A horizontal line has a gradient equal to zero. Its equation will be y = c.
One line, four different-looking things
- A rule, a table of numbers, a graph, and a growing pattern.
- Those can all be the same straight line.
- And two numbers control all four of them.
Four letters, and only two of them move
- In y = mx + c, m and c are fixed once you pick a line.
- x and y are the ones that vary.
- Sorting that out first makes everything else readable.
| Letter | What it is | Fixed or varying |
|---|---|---|
| m | the gradient | fixed for a given line |
| c | the y-intercept | fixed for a given line |
| x | the input | varies |
| y | the output | varies with x |
Build a table by substituting
- Take y = 2x + 1 and feed it x values, negatives included.
- At x = −2, that is minus four plus one, so y is −3.
- Nothing here is new. It is substitution from last lesson.
| x | Working | y |
|---|---|---|
| −2 | 2(−2) + 1 | −3 |
| −1 | 2(−1) + 1 | −1 |
| 0 | 2(0) + 1 | 1 |
| 1 | 2(1) + 1 | 3 |
| 2 | 2(2) + 1 | 5 |
| 3 | 2(3) + 1 | 7 |
Plot them, and they line up
- Each row of the table is a point on the plane.
- Six points, and every one lands on the same straight line.
- And there are infinitely many more between them.

Both numbers are visible in the table
- The y values go up by 2 every time. That step is m.
- When x is 0, y is 1. That value is c.
- So you can write the rule without seeing the graph at all.
| What to look at | What you see | What it tells you |
|---|---|---|
| The y values | −3, −1, 1, 3, 5, 7 | |
| Step between them | always up 2 | so m = 2 |
| Value when x is 0 | 1 | so c = 1 |
| The rule | y = 2x + 1 |
The gradient is a ratio, not a mood
- Pick two points on the line. Go across, then up.
- From (1, 3) to (3, 7): across 2, up 4.
- Four over two is two. Rise over run.
| Step | Detail | Value |
|---|---|---|
| From (1, 3) to (3, 7) | ||
| Across | 1 to 3 | run of 2 |
| Up | 3 to 7 | rise of 4 |
| Gradient | rise over run | 4/2 = 2 |
Try it: change m and c
What the sign of m looks like
- Positive m goes uphill as you read left to right.
- Negative m goes downhill.
- And m of zero is flat, which makes the rule just y equals c.
| Gradient | On the graph | Example |
|---|---|---|
| m is positive | uphill, left to right | y = 2x + 1 |
| m is negative | downhill, left to right | y = −3x + 5 |
| m is zero | flat | y = 4 |
When the table does not start at zero
- y is 10, 7, 4, 1 for x of 1, 2, 3, 4. The step is down 3.
- So is c ten? No. Ten is y when x is one, not zero.
- Step back one more: add 3. c is 13.
| Step | Reasoning | Note |
|---|---|---|
| x = 1, 2, 3, 4 | y = 10, 7, 4, 1 | |
| Step | down 3 each time | so m = −3 |
| Is c = 10? | no, that is y at x = 1 | |
| Step back to x = 0 | 10 + 3 | c = 13 |
| The rule | y = −3x + 13 | check at x = 4: 1 |
That catches people constantly
- Reading c as the first number in the table usually works.
- It works only because tables often happen to start at zero.
- c is always the value at x equals zero. Nothing else.
The line is every point that fits the rule
- A table gives you six points. The line has infinitely many.
- Any x and y that make the equation true is on it.
- So to test a point, just substitute and see.
Now a pattern, which looks like a different topic
- A shape made of matches: 4, then 7, then 10, then 13.
- Three more each time. Every single step.
- A constant increase. You have seen that before.
| Position | Matches | Change |
|---|---|---|
| Position 1 | 4 matches | |
| Position 2 | 7 matches | up 3 |
| Position 3 | 10 matches | up 3 |
| Position 4 | 13 matches | up 3 |
So find m and c, exactly as before
- The constant increase is 3, so m is 3.
- At position zero it would be 1, so c is 1.
- The rule is 3n + 1. Check position 4: thirteen. Correct.
| Step | Working | Result |
|---|---|---|
| Constant increase | 3 each step | so m = 3 |
| At position 0 | 4 − 3 | so c = 1 |
| The rule | 3n + 1 | |
| Check position 4 | 3(4) + 1 | 13, correct |
| Predict position 10 | 3(10) + 1 | 31 |
And this is what the rule buys you
- Position 10 needs 31 matches. You did not count them.
- Position 100 would need 301. Still no counting.
- That is the entire reason for finding a rule.
Try it: find m and c
The same two numbers, in all four places
- This is the idea the lesson has been building.
- A rule, a table, a graph, a pattern.
- m and c are in every one of them, wearing different clothes.
| Representation | Where m and c are | Example |
|---|---|---|
| In the rule | written down | y = 3n + 1 |
| In a table | m is the step | c is y at 0 |
| On a graph | m is the slope | c is the crossing |
| In a pattern | m is what is added | c is the start |
Graphing calculator
What to take away
- Six things, and this is the lesson everything later leans on.
| m and c | are fixed for a line. x and y vary |
| c | is where the line crosses the y-axis, at (0, c) |
| m | is rise over run, and its sign is the direction |
| A flat line | has gradient zero and the rule y = c |
| From a table | m is the step, and c is y when x is 0 |
| A growing pattern | is a straight line wearing a disguise |
Common mistakes
- In y = 3 − 2x the gradient is 3.The gradient is the number multiplying x, so m = −2 and c = 3; the line slopes down.
- The table starts x = 2, y = 7, so c = 7.c is the y value when x = 0; if y goes up 2 per step, step back twice from 7 to get c = 3.
- From (1, 3) to (3, 7) the gradient is 2 ÷ 4 = 0.5.Gradient is rise over run: (7 − 3) ÷ (3 − 1) = 4 ÷ 2 = 2.
Your turn
- Try all eight.
For y = 4x − 3, state the gradient and the y-intercept.
y = 5, 8, 11, 14 for x = 0, 1, 2, 3. The rule?
Does the line y = 2x + 1 pass through (4, 9)?
A pattern goes 5, 9, 13, 17. Find a rule for position n.
What is the equation of the horizontal line through the point (3, −2)?
A line passes through (−1, 4) and (3, −4). What is its gradient?
A Rotorua taxi fare is C = 2.5d + 4 dollars for d km. What does the 4 tell you?
A tile pattern goes 50, 46, 42, 38. How many tiles are at position 10?
Show answer
1. Gradient 4, y-intercept −3. They are simply the two numbers in the rule. 2. y = 3x + 5. The step is 3, so m is 3, and y is 5 when x is 0, so c is 5. 3. Yes. Substituting x = 4 gives 2 times 4 plus 1, which is 9, and that is the y value asked about. 4. 4n + 1. It goes up 4 each time, and at position 0 it would be 1. Check position 3: 4 times 3 plus 1 is 13. 5. y = −2. A horizontal line has gradient 0, so every point on it has the same y value, −2. 6. −2. Across from −1 to 3 is a run of 4, and down from 4 to −4 is a rise of −8. −8/4 = −2. 7. It is a $4 charge at 0 km: when d is 0, C = 4. The 2.5 is the cost for each km. 8. 14 tiles. It goes down 4 each step and would be 54 at position 0, so the rule is 54 − 4n, and 54 − 4 × 10 = 14.
The answers
- They are the two numbers in the rule.
- The step is 3, and y is 5 when x is 0.
- Substitute 4: two fours plus one is nine.
| Answer | |
|---|---|
| 1 | m = 4, c = −3 |
| 2 | y = 3x + 5 |
| 3 | Yes |
| 4 | 4n + 1 |
Graphing Slope-Intercept

Full screen · PhET Interactive Simulations, University of Colorado Boulder, CC BY 4.0
Challenge
A straight line y = mx + c passes through the point (3, 2), and its gradient and y-intercept add up to 10, so m + c = 10. Find m and c, and find where the line crosses the x-axis.
Hint
Substitute x = 1 into y = mx + c. What does m + c = 10 tell you about a second point on the line?
Answer
m = −4 and c = 14, so the line is y = −4x + 14. It crosses the x-axis at (3.5, 0), that is x = 72.
Step by step
- At x = 1, the rule gives y = m + c, so m + c = 10 means the point (1, 10) is on the line.
- From (1, 10) to (3, 2): across 2, down 8. The gradient is −8 ÷ 2 = −4.
- Then c = 10 − m = 10 − (−4) = 14.
- On the x-axis y = 0, so −4x + 14 = 0, giving x = 14 ÷ 4 = 3.5.
- Check (3, 2): −4 × 3 + 14 = 2. It works.
Full working
- x = 1: y = m + c = 10so (1, 10) is on the line
- m = (2 − 10) ÷ (3 − 1) = −8 ÷ 2 = −4rise over run
- c = 10 − (−4) = 14from m + c = 10
- y = −4x + 14the rule
- −4x + 14 = 0, so x = 144 = 72crosses the x-axis where y = 0
- check: −4 × 3 + 14 = 2(3, 2) is on the line
- m = −4, c = 14, crosses the x-axis at (3.5, 0)
Tama makes a table from a straight-line rule y = mx + c, using x = 1, 2, 3, 4 and 5. The five y values add up to 80, and the last y value is exactly 3 times the first. Find m and c, and write out the table.
Hint
In a straight-line table the y values go up by the same step each time, so they are evenly spread. What does that make the middle value, compared with the mean of all five?
Answer
m = 4 and c = 4, so y = 4x + 4. The table is x = 1, 2, 3, 4, 5 and y = 8, 12, 16, 20, 24.
Step by step
- The five y values go up by the same step m, so they are evenly spread around the middle one, which is the value at x = 3.
- So the middle value equals their mean: 80 ÷ 5 = 16. That gives 3m + c = 16.
- The first value is m + c and the last is 5m + c. Last = 3 × first gives 5m + c = 3m + 3c, so 2m = 2c and m = c.
- Put c = m into 3m + c = 16: 4m = 16, so m = 4 and c = 4.
- Check: 8 + 12 + 16 + 20 + 24 = 80, and 24 = 3 × 8.
Full working
- y values: m + c, 2m + c, 3m + c, 4m + c, 5m + csubstitute x = 1 to 5
- sum = 15m + 5c = 5(3m + c) = 80the sum is 5 times the middle value
- 3m + c = 16divide by 5
- 5m + c = 3(m + c), so 2m = 2c, m = clast is 3 times the first
- 4m = 16, so m = 4, c = 4substitute c = m
- y = 8, 12, 16, 20, 24the table
- check: 8 + 12 + 16 + 20 + 24 = 80, 24 = 3 × 8it works
- y = 4x + 4; table 8, 12, 16, 20, 24
The line y = (34)x − 11 is drawn from where it crosses the y-axis to the point (40, 19). (a) Check that (40, 19) is on the line. (b) How many points on this piece of line have both coordinates integers (count both ends)? (c) How many of those points are below the x-axis? (d) Where exactly does the line cross the x-axis, and why is that point not one of your answers to (b)?
Hint
The gradient 34 means: across 4, up 3. Start at the y-intercept, which is a point with integer coordinates, and step along. Could a point between two of these steps have integer coordinates?
Answer
(a) 34 × 40 − 11 = 30 − 11 = 19. (b) 11 points, at x = 0, 4, 8, ..., 40. (c) 4 points: (0, −11), (4, −8), (8, −5), (12, −2). (d) At x = 443, that is (14 23, 0). 443 is not a whole number (it is not a multiple of 4), so the crossing falls between the integer points (12, −2) and (16, 1).
Step by step
- The line starts at (0, −11). Every 4 across it goes up 3, so (4, −8), (8, −5), and so on are all integer points.
- For y to be an integer, (34)x must be an integer, which needs x to be a multiple of 4 (3 and 4 share no factor).
- From 0 to 40 the multiples of 4 are 0, 4, 8, ..., 40: that is 40 ÷ 4 + 1 = 11 points.
- The y values are −11, −8, −5, −2, 1, 4, ... The first four are negative.
- Setting y = 0: (34)x = 11, so x = 443. That is between 12 and 16, and is not even a whole number, so it is not an integer point.
Full working
- (34) × 40 − 11 = 30 − 11 = 19(a) (40, 19) is on the line
- y-intercept (0, −11), then across 4, up 3gradient 34
- x must be a multiple of 4: x = 0, 4, 8, ..., 40for (34)x to be an integer
- 40 ÷ 4 + 1 = 11(b) count both ends
- y = −11, −8, −5, −2, 1, ...going up 3 each step
- 4 points below the x-axis(c) the first four
- (34)x = 11, so x = 443 = 14 23(d) where y = 0
- (b) 11 points; (c) 4 below the axis; (d) crosses at (443, 0), which is not an integer point


