Coordinates and straight-line graphs
A pair of coordinates pins a point on a grid, and an equation like y = 2x + 1 draws a straight line. Learn to plot points and lines, to read the gradient and where a line crosses the y-axis, and to write the equation of a line from its graph.
Where you will use this: the fall on a waste pipe, a wheelchair ramp, a plumber’s quote against hours, and the speed on a distance-time graph.
Reading and writing coordinates
Always write (x, y): along first, then up or down.
Right and up are positive. Left and down are negative.
The origin is (0, 0), where the two axes cross.
In an equation, y = mx + c: m is the gradient and c is the y-intercept, where the line crosses the y-axis.
Warm-up: what do you already know?
Quick warm-up. No marks. A wrong answer shows you where to look.
Work out 2x + 1 when x = −3.
- Replace x with −3. Brackets help: 2 × (−3) + 1.
- Do the multiplication first.
- That looks like taking 1 away. The sum adds 1.
- That looks like losing the minus sign. 2 times −3 is negative.
2 × (−3) = −6, then −6 + 1 = −5.
Work out 7 − (−3).
- Taking away a negative number does the opposite of taking away.
- Change it to a plus.
- That looks like 7 − 3. Taking away a negative number adds.
7 − (−3) = 7 + 3 = 10.
Quick recap of the layer below (skip if you are happy)
Work out 3x − 2 when x = 4.
- Replace x with 4.
- 3x means 3 times x.
- That looks like 3 and 4 side by side (34) and then taking away 2. 3x means 3 times x.
- That looks like 3 × 4 + 2. The sum takes 2 away.
3 × 4 = 12, then 12 − 2 = 10.
Work out (−2 + 6) ÷ 2.
- Brackets first.
- Then divide the answer by 2.
- That looks like dividing only the 6. The bracket comes first, so add before you divide.
−2 + 6 = 4, then 4 ÷ 2 = 2.
1. Coordinates
A pair of Coordinates tells you exactly where a point is on a grid. The grid has two axes: the x-axis goes across and the y-axis goes up and down. They cross at the Origin, which is (0, 0).
Write a point as (x, y). The x-coordinate comes first and says how far along: right is positive, left is negative. The y-coordinate comes second and says how far up or down: up is positive, down is negative. A way to remember: along the corridor, then up the stairs.
The axes split the grid into four quadrants. They are numbered 1 to 4 going anticlockwise from the top right. In quadrant 1 both x and y are positive. In quadrant 2 (top left) x is negative and y is positive. In quadrant 3 (bottom left) both are negative. In quadrant 4 (bottom right) x is positive and y is negative.
Key idea: (x, y) means along first, then up or down. If a point is left of the y-axis, its x-coordinate is negative. If it is below the x-axis, its y-coordinate is negative.
Try it: which quadrant is the point (−4, −1) in? (Left and down.)
Worked example
Write the coordinates of point B on the grid above.
- Start at the origin. B is to the left, so x is negative. It is 4 units left: x = −4.
- B is above the x-axis, 3 units up: y = 3.
- B is (−4, 3). It is in quadrant 2.
Now you finish it
Write the coordinates of point C on the grid above.
- C is ___ units to the left, so x = ___.
- C is ___ units down, so y = ___.
- C is (___, ___).
Check my answer
C is 2 units to the left and 4 units down, so C is (−2, −4). It is in quadrant 3.
Check your knowledge: coordinates
Write the coordinates of point P. Type them like (2, 5).
Text version of the picture, for people who cannot see it (it may give away the answer): a coordinate grid from -5 to 5 on both axes with four points, one in each quarter of the grid: P at (3, 4), Q at (-2, 3), R at (-4, -1) and S at (1, -4).
- Start at the origin, where the axes cross. How far along is P, to the right or left?
- Then how far up or down?
- That looks like (y, x). The x-coordinate, the number along, comes first.
P is 3 along to the right and 4 up, so P is (3, 4).
Write the coordinates of point Q. Type them like (2, 5).
Text version of the picture, for people who cannot see it (it may give away the answer): a coordinate grid from -5 to 5 on both axes with four points, one in each quarter of the grid: P at (3, 4), Q at (-2, 3), R at (-4, -1) and S at (1, -4).
- Is Q to the left or right of the y-axis? How far?
- Then how far up or down?
- Q is to the left of the y-axis, so its x-coordinate is negative.
- That looks like (y, x). The x-coordinate, the number along, comes first.
Q is 2 to the left, so x = −2. It is 3 up, so y = 3. Q is (−2, 3).
Write the coordinates of point S. Type them like (2, 5).
Text version of the picture, for people who cannot see it (it may give away the answer): a coordinate grid from -5 to 5 on both axes with four points, one in each quarter of the grid: P at (3, 4), Q at (-2, 3), R at (-4, -1) and S at (1, -4).
- Is S above or below the x-axis?
- A point below the x-axis has a negative y-coordinate.
- That looks like (y, x). The x-coordinate, the number along, comes first.
- S is below the x-axis, so its y-coordinate is negative.
S is 1 to the right and 4 down, so S is (1, −4).
A point is 5 units to the left of the y-axis and 2 units below the x-axis. Write its coordinates, like (2, 5).
- Left is negative for x. Below is negative for y.
- Write x first, then y.
- That has the right size but the wrong signs. Left and down are both negative.
- That looks like (y, x). The x-coordinate, the number along, comes first.
5 to the left is x = −5. 2 below is y = −2. The point is (−5, −2).
In which quadrant is the point (−3, 6)?
- Is x positive or negative? Is y positive or negative?
- Quadrants are numbered anticlockwise, starting at the top right.
x = −3 is to the left and y = 6 is above, so the point is top left: quadrant 2.
2. The midpoint of a line
The Midpoint of a line is the point exactly halfway along it. To find it, take the average of the x-coordinates and the average of the y-coordinates: add them, then halve.
midpoint = ((x1 + x2) ÷ 2, (y1 + y2) ÷ 2)
Key idea: the midpoint’s x-coordinate is the mean of the two x-coordinates, and its y-coordinate is the mean of the two y-coordinates. Work on the x-coordinates and the y-coordinates one at a time. Take care with negative numbers when you add.
Try it: what is halfway between 2 and 10 on a number line? Use the same idea for x and for y.
Worked example
Find the midpoint of (−4, 2) and (6, −8).
- x: (−4 + 6) ÷ 2 = 2 ÷ 2 = 1.
- y: (2 + (−8)) ÷ 2 = −6 ÷ 2 = −3.
- The midpoint is (1, −3).
Now you finish it
Find the midpoint of (−3, −1) and (5, 7).
- x: (−3 + 5) ÷ 2 = ___ ÷ 2 = ___.
- y: (−1 + 7) ÷ 2 = ___ ÷ 2 = ___.
- The midpoint is (___, ___).
Check my answer
x: 2 ÷ 2 = 1. y: 6 ÷ 2 = 3. The midpoint is (1, 3).
Check your knowledge: midpoints
Find the midpoint of (2, 4) and (8, 10). Type it like (2, 5).
- The midpoint is halfway. Find the middle of the x-coordinates.
- Do the same for the y-coordinates.
- That looks like adding the coordinates but not halving.
- That looks like the gaps between the points (8 − 2 and 10 − 4), not the midpoint.
(2 + 8) ÷ 2 = 5 and (4 + 10) ÷ 2 = 7, so the midpoint is (5, 7).
Find the midpoint of (−6, 3) and (2, −5). Type it like (2, 5).
- Add the x-coordinates first, taking care with the minus sign.
- Halve each total.
- That looks like adding the coordinates but not halving.
- Check the y-coordinate: 3 + (−5) = −2, and half of −2 is −1.
(−6 + 2) ÷ 2 = −4 ÷ 2 = −2. (3 + (−5)) ÷ 2 = −2 ÷ 2 = −1. The midpoint is (−2, −1).
M is the midpoint of AB. A is (1, −2) and M is (4, 1). Find B. Type it like (2, 5).
- M is exactly halfway from A to B.
- So B is the same step again from M. How far along and up is the step from A to M?
- That is the midpoint of A and M. M is the midpoint of A and B, so go the same distance again.
- That is the step from A to M. Make the same step again from M.
From A to M: 4 − 1 = 3 along and 1 − (−2) = 3 up. Do the same step again from M: (4 + 3, 1 + 3) = (7, 4). Check: the midpoint of (1, −2) and (7, 4) is (4, 1). ✓
On a plan (in metres) a joist (a wooden beam under a floor) runs from (1, 2) to (9, 6). A support goes at its midpoint. Write the coordinates of the support, like (2, 5).
- A support at the midpoint is halfway along the joist.
- Find the middle of the x-values and the middle of the y-values.
- That looks like adding the coordinates but not halving.
- That looks like the gaps (9 − 1 and 6 − 2), not the midpoint.
(1 + 9) ÷ 2 = 5 and (2 + 6) ÷ 2 = 4. The support is at (5, 4).
3. Plotting a line from its equation
An equation like y = 2x − 1 is a rule. Choose any value for x, put it into the rule, and the rule gives you y. Each pair (x, y) is a point, and all the points lie on one straight line.
- Draw a table of values. Choose x-values that include negative numbers, zero and positive numbers, such as −2 to 2.
- Work out y for each x.
- Plot each point (x, y).
- Join the points with a ruler and extend the line across the grid.
| x | −2 | −1 | 0 | 1 | 2 |
|---|---|---|---|---|---|
| y | −5 | −3 | −1 | 1 | 3 |
Key idea: a rule that only multiplies x by a number and then adds or subtracts a number (no x²) makes a straight line. As x goes up in equal steps, the y-values should go up (or down) in equal steps too. If one point is out of line, check its arithmetic.
You can also test whether a point is on a line: put its x-coordinate into the equation. If you get its y-coordinate, it is on the line. (3, 5) is on y = 2x − 1 because 2 × 3 − 1 = 5.
Try it: is (4, 7) on the line y = 2x − 1? (Work out 2 × 4 − 1.)
Worked example
Complete a table of values for y = 3x + 2, with x from −2 to 2.
| x | −2 | −1 | 0 | 1 | 2 |
|---|---|---|---|---|---|
| 3x + 2 | 3 × (−2) + 2 = −4 | −1 | 2 | 5 | 8 |
- x = −2: 3 × (−2) + 2 = −6 + 2 = −4.
- x = −1: −3 + 2 = −1. x = 0: 0 + 2 = 2.
- x = 1: 3 + 2 = 5. x = 2: 6 + 2 = 8.
Now you finish it
Complete the table for y = x − 3.
| x | −2 | −1 | 0 | 1 | 2 |
|---|---|---|---|---|---|
| y | ___ | ___ | ___ | ___ | ___ |
Check my answer
x = −2: −2 − 3 = −5. x = −1: −4. x = 0: −3. x = 1: −2. x = 2: −1. The y-values go up by 1 each time.
Check your knowledge: tables of values
A table of values is made for y = 2x + 3. What is y when x = −2?
- Replace x with −2. Brackets help: 2 × (−2) + 3.
- Multiply first, then add 3.
- That looks like 4 − 3. 2 times −2 is −4, and then you add 3.
- That looks like using x = 2. Here x is −2.
- That looks like −4 − 3. The rule adds 3.
2 × (−2) = −4, then −4 + 3 = −1.
A table of values is made for y = 4 − 2x. What is y when x = −3?
- Work out 2x first. What is 2 × (−3)?
- Then take your answer away from 4. Taking away a negative adds.
- That looks like 4 + (−6). The rule takes 2x away, and 2x is −6, so you are taking away a negative.
2x = 2 × (−3) = −6. Then y = 4 − (−6) = 4 + 6 = 10.
Which point lies on the line y = 3x − 1?
- Put the x-coordinate of each point into 3x − 1.
- Does the answer match the y-coordinate?
For (2, 5): 3 × 2 − 1 = 5, which matches. The other two points do not fit the rule.
The line y = 2x + 1 passes through the point (4, k). Find k.
- The point has x = 4. Put that into the equation.
- The answer is the y-coordinate, k.
- That looks like 2 + 4. 2x means 2 times x.
- That looks like using x = 3. Here x is 4.
Put x = 4 into y = 2x + 1: y = 2 × 4 + 1 = 9. So k = 9.
4. Gradient and y-intercept
The Gradient of a line says how steep it is. You find it with a right-angled triangle under the line.
gradient = rise ÷ run
The run is how far you go along. The rise is how far you go up in that same step. Between two points (x1, y1) and (x2, y2), the gradient is (y2 − y1) ÷ (x2 − x1).
Read the line from left to right. If it climbs, the gradient is positive. If it falls, the gradient is negative, because the rise is a fall.
The y-intercept is the value of y where the line crosses the y-axis. At that point x = 0.
Key idea: gradient = rise ÷ run, in that order, reading left to right. Up is positive and down is negative. Check the sign against the picture.
Try it: a line goes up 6 while going along 3. What is its gradient? (Rise ÷ run.)
Worked example: between two points
Find the gradient of the line through (1, 2) and (4, 11).
- Rise: 11 − 2 = 9.
- Run: 4 − 1 = 3.
- Gradient = 9 ÷ 3 = 3.
Worked example: a line that falls
Find the gradient of the line through (−1, 5) and (3, −3).
- Rise: −3 − 5 = −8 (a fall of 8).
- Run: 3 − (−1) = 4.
- Gradient = −8 ÷ 4 = −2.
Now you finish it
Find the gradient of the line through (2, 1) and (6, 9).
- Rise: 9 − 1 = ___.
- Run: 6 − 2 = ___.
- Gradient = ___ ÷ ___ = ___.
Check my answer
Rise 8, run 4, gradient = 8 ÷ 4 = 2.
Check your knowledge: gradient and y-intercept
The line goes through A and B, marked on the graph. What is its gradient?
Text version of the picture, for people who cannot see it (it may give away the answer): a coordinate grid with a straight line sloping up to the right. Point A is at (1, 1) and point B is at (3, 7), and the line goes through both.
- Gradient is rise ÷ run. How far up does the line go from A to B?
- How far along does it go in the same step?
- That looks like run ÷ rise. Gradient is rise ÷ run.
- That looks like the rise only. Divide it by the run.
From A to B the line rises 7 − 1 = 6 and runs 3 − 1 = 2. Gradient = 6 ÷ 2 = 3.
The line goes through C and D, marked on the graph. What is its gradient? Give it as a decimal or fraction, like −2 or −3/4.
Text version of the picture, for people who cannot see it (it may give away the answer): a coordinate grid with a straight line sloping down to the right. Point C is at (-2, 5) and point D is at (2, -1), and the line goes through both.
- Does the line go up or down as you move right? That decides the sign.
- Find the rise (a fall is negative) and the run from C to D, then divide.
- The line goes down as you move right, so the gradient is negative.
- That looks like run ÷ rise. Gradient is rise ÷ run.
From C to D the height changes by −1 − 5 = −6 (a fall of 6) and the run is 2 − (−2) = 4. Gradient = −6 ÷ 4 = −1.5.
The line is drawn on the grid. At what value of y does it cross the y-axis?
Text version of the picture, for people who cannot see it (it may give away the answer): a coordinate grid from -5 to 5 on both axes with a straight line sloping up to the right. The line goes through (-4, -5) and (1, 5), so it crosses the vertical axis at (0, 3).
- The y-axis is the vertical axis. Look at where the line meets it.
- Read the y-value at that point.
- That looks like the gradient. The y-intercept is where the line crosses the y-axis.
- That is where the line crosses the x-axis. Look at the y-axis instead.
The line meets the y-axis where x = 0. On the graph that is at y = 3.
A ramp rises 0.4 m over a horizontal distance of 4.8 m. What is its gradient? Give it as a fraction in its simplest form, like 1/20.
- Gradient = rise ÷ run. Which number is the rise?
- Write rise over run, then multiply the numerator and denominator by 10 to get whole numbers, and simplify.
- That looks like run ÷ rise. Gradient is rise ÷ run.
Gradient = rise ÷ run = 0.4 ÷ 4.8. Multiply the numerator and denominator by 10: 4/48. Divide the numerator and denominator by 4: 1/12.
Find the gradient of the line through (1, 9) and (4, 0).
- Gradient = change in y ÷ change in x. Go from the first point to the second.
- Work out 0 − 9 for the change in y and 4 − 1 for the change in x.
- The line goes down as you move right, so the gradient is negative.
- That looks like run ÷ rise. Gradient is rise ÷ run.
(0 − 9) ÷ (4 − 1) = −9 ÷ 3 = −3.
5. Reading the equation y = mx + c
Every straight line that is not vertical has an equation of the form y = mx + c.
- m is the gradient: the number multiplying x.
- c is the y-intercept: the number on its own.
So y = 3x + 2 has gradient 3 and crosses the y-axis at 2. If x stands alone, as in y = x + 4, it is 1x, so the gradient is 1. If the equation is not in this form, rearrange it first: 2y = 8x + 6 becomes y = 4x + 3 when you divide every term by 2.
Writing the equation from a graph
- Read c: where does the line cross the y-axis?
- Find m: draw a triangle and work out rise ÷ run.
- Write y = mx + c with your numbers.
Parallel lines
Lines that are Parallel slope at the same steepness, so they have the same gradient. They have different y-intercepts, or they would be the same line. y = 2x + 1 and y = 2x − 3 are parallel.
Key idea: in y = mx + c, read m from the number that multiplies x (with its sign) and c from the number on its own. Parallel lines: same m.
Try it: write down the gradient and the y-intercept of y = 5x − 3. (m = ?, c = ?)
Worked example
A line crosses the y-axis at (0, −1) and goes up 3 for every 1 along. Write its equation.
- c = −1, because it crosses the y-axis at −1.
- m = rise ÷ run = 3 ÷ 1 = 3.
- The equation is y = 3x − 1.
Worked example: rearranging first
Find the gradient and the y-intercept of the line 3x + y = 7.
- Take 3x from both sides: y = 7 − 3x, which is y = −3x + 7.
- The gradient is −3 and the y-intercept is 7.
Now you finish it
A line crosses the y-axis at 4 and goes down 2 for every 1 along. Write its equation.
- c = ___.
- m = ___ ÷ ___ = ___ (it goes down, so it is negative).
- The equation is y = ___x + ___.
Check my answer
c = 4 and m = −2 ÷ 1 = −2. The equation is y = −2x + 4.
Check your knowledge: reading y = mx + c
What is the gradient of the line y = 4x − 7?
- y = mx + c. The gradient is m.
- Which number is multiplying x?
- That looks like the y-intercept (c). The gradient is the number multiplying x.
Compare with y = mx + c: m = 4, so the gradient is 4. (The y-intercept is −7.)
What is the y-intercept of the line y = 6 − 2x?
- The y-intercept is the value of y when x = 0.
- Or write it as y = −2x + 6 and look for c.
- That is the gradient. The y-intercept is the number on its own.
Put x = 0: y = 6 − 0 = 6. The line crosses the y-axis at 6.
The line passes through the two points marked. Write its equation in the form y = mx + c. Type it like y = 2x + 5.
Text version of the picture, for people who cannot see it (it may give away the answer): a coordinate grid with a straight line sloping up to the right through two marked points, (0, -2) and (2, 4).
- Read c first: where does the line cross the y-axis?
- Then find the gradient from the two points: rise ÷ run.
- That looks like m and c swapped. m is the number multiplying x, and c is where the line crosses the y-axis.
- The line crosses the y-axis below the origin, so c is negative.
The line crosses the y-axis at (0, −2), so c = −2. From (0, −2) to (2, 4) the rise is 6 and the run is 2, so m = 6 ÷ 2 = 3. The equation is y = 3x − 2.
Which line is parallel to y = 5x − 1?
- Parallel lines have the same gradient. What is the gradient of y = 5x − 1?
- Look for another line with that number in front of x.
y = 5x − 1 has gradient 5, and so does y = 5x + 4. Equal gradients mean the lines are parallel.
A line has the equation 2y = 8x + 6. What is its gradient?
- To read the gradient the equation should start y = …
- Divide every term on both sides by 2.
- That looks like the number before x, but y has not been made the subject yet. Divide everything by 2 first.
- That looks like the y-intercept (6 ÷ 2). The gradient is the number multiplying x.
Divide every term by 2: y = 4x + 3. The number multiplying x is 4, so the gradient is 4.
6. Perpendicular lines Higher
Two lines at a right angle are Perpendicular. Their gradients multiply to give −1. To find the gradient of a perpendicular line, flip the gradient upside down and change its sign.
- Gradient 2 (which is 2 over 1) gives −1 over 2. Check: 2 × (−1 over 2) = −1.
- Gradient −3 over 4 gives 4 over 3. Check: −3 over 4 × 4 over 3 = −1.
This is because turning a line through 90° swaps the rise and the run, and one of them changes direction.
Worked example
Line L is y = 2x + 1. Find the gradient of a line perpendicular to L.
- The gradient of L is 2.
- Flip it to get 1 over 2, and change the sign: −1 over 2.
Now you finish it
Find the gradient of a line perpendicular to a line with gradient 5.
- 5 is 5 over 1. Flip it: ___.
- Change the sign: ___.
Check my answer
Flip 5 over 1 to get 1 over 5, then change the sign: −1 over 5 (typed as −1/5). Check: 5 × (−1 over 5) = −1.
Check your knowledge: perpendicular lines Higher
A line has gradient 4. What is the gradient of a line perpendicular to it? Type it like 3/5 or −2.
- Perpendicular gradients multiply to give −1.
- Flip the fraction and change the sign.
- You flipped the gradient but kept the sign. Perpendicular gradients have opposite signs.
- That changes the sign but does not flip it. Do both.
- That is the same gradient, which makes a parallel line.
4 = 4/1. Flip it to get 1/4 and change the sign: −1/4. Check: 4 × (−1/4) = −1.
Which line is perpendicular to y = 2x + 3?
- The gradient of y = 2x + 3 is 2.
- Find a gradient that multiplies with 2 to give −1.
The gradient of y = −x/2 is −1/2, and 2 × (−1/2) = −1, so the lines are perpendicular.
7. Where two lines cross
Two straight lines that are not parallel cross at exactly one point. That point lies on both lines, so its x-coordinate and y-coordinate fit both equations. That makes it the answer to a pair of Simultaneous equations. The graph is the picture of the algebra.
The lines y = x + 1 and y = 7 − x cross at (3, 4). Check: 3 + 1 = 4 and 7 − 3 = 4. ✓ To find the crossing point by algebra instead of a drawing, see Simultaneous equations. A shortcut for two lines written as y = … is to set the right-hand sides equal, because at the crossing point they give the same y.
Key idea: the crossing point is a solution of both equations. Check any answer by putting it into both.
Try it: is (2, 4) on both y = 2x and y = 6 − x? (Test each.)
Worked example
Show that the lines y = 2x and y = 9 − x cross at (3, 6).
- Put x = 3 into y = 2x: y = 6. ✓
- Put x = 3 into y = 9 − x: y = 6. ✓
- Both give y = 6, so (3, 6) is on both lines: that is where they cross.
Now you finish it
Find where y = x + 2 and y = 8 − 2x cross, by setting the right-hand sides equal.
- x + 2 = 8 − 2x. Add 2x to both sides: 3x + 2 = ___.
- Take 2 from both sides: 3x = ___, so x = ___.
- y = x + 2 = ___.
Check my answer
3x + 2 = 8, so 3x = 6 and x = 2. Then y = 2 + 2 = 4. Check: 8 − 2 × 2 = 4. ✓ They cross at (2, 4).
Check your knowledge: where lines cross
The graph shows two straight lines, L and M. Write the coordinates of the point where they cross. Type it like (2, 5).
Text version of the picture, for people who cannot see it (it may give away the answer): a coordinate grid from -3 to 6 on both axes with two straight lines. Line L slopes up to the right and goes through (-1, -3) and (3.5, 6). Line M slopes down to the right and goes through (-1, 6) and (6, -1). They cross once, at (2, 3).
- The crossing point is the one place both lines pass through.
- Read the x-value along, then the y-value up.
- That looks like (y, x). The x-coordinate, the number along, comes first.
- That is where M crosses the y-axis, not where the two lines meet.
The lines meet at 2 along and 3 up, so the point is (2, 3). Check with L: y = 2x − 1 gives 2 × 2 − 1 = 3 and with M: y = 5 − x gives 5 − 2 = 3. ✓
Does the point (3, 7) lie on both of the lines y = 2x + 1 and y = 10 − x? Type yes or no.
- Put x = 3 into each equation.
- Do you get y = 7 both times?
- Test both lines: 2 × 3 + 1 and 10 − 3. If both give 7, the point is on both lines.
y = 2x + 1: 2 × 3 + 1 = 7. y = 10 − x: 10 − 3 = 7. Both give 7, so the answer is yes.
The lines y = x + 2 and y = 3x − 4 cross at one point. What is the x-coordinate of that point?
- At the crossing point both lines have the same y, so the two right-hand sides are equal.
- Write x + 2 = 3x − 4 and solve it.
- That looks like the y-coordinate. The question asks for x.
x + 2 = 3x − 4. Take x from both sides: 2 = 2x − 4. Add 4: 6 = 2x, so x = 3. (Then y = 3 + 2 = 5, and 3 × 3 − 4 = 5 too.)
8. Graphs from real life
Many real situations are straight-line graphs. The same ideas apply: the gradient is the rate of change, and the y-intercept is the starting value.
Cost against hours
A plumber charges a £60 call-out fee plus £45 for every hour. The cost C (in pounds) for h hours is C = 45h + 60.
- The y-intercept, 60, is the call-out fee: what you pay for 0 hours.
- The gradient, 45, is the cost of each extra hour: £45 per hour.
Distance against time
On a distance-time graph, the gradient is the speed: distance ÷ time. A steeper line is a faster journey. A flat line means no movement (the vehicle has stopped). A line that goes back down means travelling back towards the start.
Key idea: on a real-life graph, say what the gradient means (for example £ per hour or km per hour) and what the y-intercept means (the cost or distance at the start).
Try it: in C = 45h + 60, what is the cost for 2 hours? (Put h = 2.)
Worked example
Use the graph above to find the cost of a 4-hour job, and the cost of each extra hour.
- Four hours: the point (4, 240), so the cost is £240. (Check: 45 × 4 + 60 = 240.)
- From (0, 60) to (4, 240) the cost rises by 180 over 4 hours.
- Gradient = 180 ÷ 4 = 45, so each extra hour costs £45.
Now you finish it
A van goes from the depot to 90 km away in 1.5 hours. What is its speed?
- Speed = distance ÷ time.
- ___ ÷ ___ = ___ km/h.
Check my answer
90 ÷ 1.5 = 60, so the speed is 60 km/h.
Check your knowledge: real-life graphs
The graph shows a plumber’s cost against hours worked. Two points are marked. How much does the plumber charge for each extra hour? Answer in pounds.
Text version of the picture, for people who cannot see it (it may give away the answer): a graph with hours worked across, from 0 to 6, and cost in pounds up, from 0 to 300. A straight line starts on the cost axis at 50 and slopes up through the two marked points (2, 120) and (4, 190), reaching 260 at 6 hours.
- The charge for each hour is the gradient of the line.
- Use the two marked points: rise ÷ run.
- That is the rise between the points. Divide it by the run, 2 hours.
- That looks like the call-out fee, where the line meets the cost axis. The charge for each hour is the gradient.
From (2, 120) to (4, 190) the cost rises by 70 over 2 hours. 70 ÷ 2 = 35, so the plumber charges £35 for each extra hour.
A plumber charges a £55 call-out fee plus £30 per hour, so the cost is C = 30h + 55. What does a job of 4.5 hours cost? Answer in pounds.
- h stands for the hours. What is h here?
- Put h = 4.5 into 30h + 55.
- That is the cost of the hours only. The £55 call-out fee is charged as well.
- That looks like multiplying the call-out fee by 4.5 too. The call-out fee is charged once.
30 × 4.5 = 135, then 135 + 55 = 190. The job costs £190.
The graph shows how far a delivery van is from the depot. What is the van’s speed in the first hour, in km/h?
Text version of the picture, for people who cannot see it (it may give away the answer): a distance-time graph with time in hours across, from 0 to 4, and distance from the depot in kilometres up, from 0 to 80. The graph has three straight parts: from (0, 0) it rises to (1, 60), then it is flat at 60 km until 1.5 hours, then it falls in a straight line to (3, 0).
- On a distance-time graph, speed is the gradient.
- How far does the van go in the first hour?
- That looks like the time. Speed is distance ÷ time.
- That looks like the speed on the way back. Use the first part of the graph.
In the first hour the line goes from 0 km up to 60 km. Speed = distance ÷ time = 60 ÷ 1 = 60 km/h.
A plumber’s quote is C = 45h + 60, where C is the cost in pounds and h is the hours. For how many hours is the bill £375?
- Put 375 in place of C.
- Take 60 from both sides, then divide by 45.
- That is the cost of the hours only. Divide it by 45 to find the hours.
- That looks like dividing 375 by 45 without taking off the £60 call-out fee first.
45h + 60 = 375, so 45h = 315 and h = 7. The bill is £375 for 7 hours.
A tank starts full. A graph of the litres left against the minutes passed is a straight line sloping down. What does its gradient tell you?
- Gradient is the change up the side for each step along.
- Here: the change in litres for each step along.
The gradient is the change in litres for each minute. A line sloping down has a negative gradient, and its size is the rate at which the tank empties.
Flip it: from the equation to the line, and back
So far you have mostly gone from an equation to a picture. Now go the other way.
Plotting from an equation
y = 2x − 1 → a line
Make a table of values, plot the points and join them.
Equation from the line
a line → y = mx + c
Read c where it crosses the y-axis. Find m from rise ÷ run.
Key idea: you need two things to pin down a line: its gradient and one point on it (the y-intercept is the easiest point). If you are given two points instead, find the gradient first, then use one point to find c.
Worked example: the equation through two points
Find the equation of the line through (1, 3) and (3, 7).
- Gradient: (7 − 3) ÷ (3 − 1) = 4 ÷ 2 = 2. So y = 2x + c.
- Put in (1, 3): 3 = 2 × 1 + c, so c = 1.
- The equation is y = 2x + 1. Check (3, 7): 2 × 3 + 1 = 7. ✓
Now you finish it
Find the equation of the line through (0, 5) and (2, 1).
- Gradient: (1 − 5) ÷ (2 − 0) = ___ ÷ ___ = ___.
- It crosses the y-axis at (0, 5), so c = ___.
- The equation is y = ___x + ___.
Check my answer
Gradient = −4 ÷ 2 = −2, and c = 5. The equation is y = −2x + 5. Check (2, 1): −4 + 5 = 1. ✓
Check your knowledge: flip it
Write the equation of the line, in the form y = mx + c. Write a gradient of 1 as x, and a gradient of −1 as −x. Type it like y = 2x + 5.
Text version of the picture, for people who cannot see it (it may give away the answer): a coordinate grid from -4 to 4 across and -3 to 5 up, with a straight line sloping down to the right. It goes through (-3, 5) and (4, -2), so it crosses the vertical axis at (0, 2) and the horizontal axis at (2, 0).
- Read c first: where does the line cross the y-axis?
- Then use a rise-and-run triangle to find the gradient. A line sloping down has a negative gradient.
- The line goes down to the right, so the gradient is negative.
- The line crosses the y-axis above the origin, so c is +2.
The line crosses the y-axis at (0, 2), so c = 2. It goes along 2 and down 2 to reach (2, 0), so the gradient is −2 ÷ 2 = −1. The equation is y = −x + 2.
Write the equation of the line with gradient 3 that crosses the y-axis at (0, 4). Type it like y = 2x + 5.
- y = mx + c. What are m and c here?
- Put the numbers in.
- That looks like m and c swapped. m is the gradient (3), c is where it crosses the y-axis (4).
- The line crosses the y-axis at 4, so you need to add the 4 too.
y = mx + c with m = 3 and c = 4 gives y = 3x + 4.
A line goes through (1, 5) and (3, 11). Write its equation in the form y = mx + c. Type it like y = 2x + 5.
- Find the gradient first: change in y ÷ change in x.
- Write y = (your gradient)x + c. Put one of the points in to find c.
- That looks like using the y-value of the point as c. c is the value of y when x = 0, not when x = 1.
- That looks like m and c swapped.
Gradient = (11 − 5) ÷ (3 − 1) = 6 ÷ 2 = 3, so y = 3x + c. Put in (1, 5): 5 = 3 × 1 + c, so c = 2. The equation is y = 3x + 2. Check (3, 11): 3 × 3 + 2 = 11. ✓
The line y = 2x + c goes through the point (3, 4). Find c.
- Put x = 3 and y = 4 into the equation.
- You get an equation with only c in it. Solve it.
- That looks like 4 − 2. First work out 2x with x = 3, which is 6.
- That looks like adding 6 to 4. Solve 4 = 6 + c by taking 6 from both sides.
Put x = 3 and y = 4 into y = 2x + c: 4 = 6 + c, so c = −2. The line is y = 2x − 2.
Spot the mistake
Finding an error in someone else’s working helps you learn. For each one, decide what went wrong.
Sam says: the gradient of the line through (0, 1) and (2, 5) is 2 ÷ 4 = 0.5. What went wrong?
- Work out the rise and the run between the two points.
- Gradient is the rise divided by the run, in that order.
The rise is 5 − 1 = 4 and the run is 2 − 0 = 2. Gradient = 4 ÷ 2 = 2. Sam turned it upside down.
Mia says: the line y = 3 − 2x has gradient 3 and y-intercept −2, because she read the numbers in the order they are written. What went wrong?
- Write the equation in the form y = mx + c, with the x term first.
- Which number multiplies x, and which stands on its own?
y = 3 − 2x is the same as y = −2x + 3. The gradient m is −2 and the y-intercept c is 3.
Check your knowledge: mixed review
Mixed up on purpose, like a real paper. Work out which method fits.
Find the midpoint of (−1, −1) and (5, 3). Type it like (2, 5).
- Add the x-coordinates, then halve.
- Do the same with the y-coordinates.
- That looks like adding the coordinates but not halving.
- That looks like halving the gaps between the points. Add the coordinates and halve instead.
(−1 + 5) ÷ 2 = 2 and (−1 + 3) ÷ 2 = 1. The midpoint is (2, 1).
What is the gradient of the line y = 7 − 3x?
- Write it as y = mx + c, with the x term first.
- m is the number multiplying x, with its sign.
- That looks like the y-intercept (c). The gradient is the number multiplying x.
- The 3x is taken away, so the gradient is negative.
y = 7 − 3x is the same as y = −3x + 7, so the gradient is −3.
What is y when x = −3 on the line y = 2x + 5?
- Replace x with −3.
- Multiply first, then add 5.
- That looks like 6 + 5. 2 times −3 is −6.
- That looks like −6 − 5. The rule adds 5.
2 × (−3) = −6, then −6 + 5 = −1.
A line is parallel to y = 4x + 1 and crosses the y-axis at (0, 6). Write its equation. Type it like y = 2x + 5.
- What is the gradient of y = 4x + 1?
- Parallel lines have the same gradient. What is c for the new line?
- That is the original line. A parallel line has the same gradient but crosses the y-axis somewhere else.
- That looks like m and c swapped.
Parallel lines have the same gradient, 4. The new line crosses the y-axis at 6, so c = 6. The equation is y = 4x + 6.
Exam style
Use these like a real paper. The marks tell you how much to write. A calculator is fine here.
Not sure what a question word means? Question words explained.
Write your working on paper, then type the answer.
- A is the point (−2, 1).
- B is the point (2, 9).
(a) [2 marks] Find the midpoint of AB. Type it like (2, 5).
- Find the middle of the x-coordinates.
- Then the middle of the y-coordinates.
- That looks like adding the coordinates but not halving.
- That looks like the gaps between A and B, not the midpoint.
(−2 + 2) ÷ 2 = 0 and (1 + 9) ÷ 2 = 5. The midpoint is (0, 5).
- M1 for (−2 + 2) ÷ 2 or (1 + 9) ÷ 2
- A1 for (0, 5)
- A is the point (−2, 1).
- B is the point (2, 9).
(b) [2 marks] Find the gradient of the line AB.
- Gradient = change in y ÷ change in x.
- Take care with the minus sign when you subtract the x-coordinates.
- That looks like run ÷ rise. Gradient is rise ÷ run.
- That looks like the rise only. Divide it by the run.
(9 − 1) ÷ (2 − (−2)) = 8 ÷ 4 = 2.
- M1 for (9 − 1) ÷ (2 − (−2))
- A1 for 2
- A is the point (−2, 1).
- B is the point (2, 9).
(c) [3 marks] The line L is parallel to AB and crosses the y-axis at (0, −4). Write the equation of L. Type it like y = 3x + 1.
- Parallel lines have the same gradient. What is the gradient of AB?
- Where L crosses the y-axis is c.
- L crosses the y-axis below the origin, so c is negative.
- That looks like m and c swapped.
L is parallel to AB, so its gradient is 2. It crosses the y-axis at −4, so c = −4. The equation is y = 2x − 4.
- M1 for gradient 2 (parallel lines have equal gradients)
- M1 for c = −4 from the y-axis crossing
- A1 for y = 2x − 4
- Line L has equation y = 3x − 2.
- Line M has equation y = x + 4.
- L and M cross at the point P.
[3 marks] Find the coordinates of P. Type them like (2, 5).
- At P both lines have the same y.
- Set the two right-hand sides equal and solve for x, then find y.
- That is only the x-coordinate. Put it back into one equation to find y.
- That looks like (y, x). The x-coordinate, the number along, comes first.
3x − 2 = x + 4, so 2x = 6 and x = 3. Then y = 3 + 4 = 7. Check: 3 × 3 − 2 = 7. P is (3, 7).
- M1 for 3x − 2 = x + 4
- M1 for solving to get x = 3
- A1 for (3, 7)
- Firm A charges a £60 call-out fee plus £45 per hour.
- Firm B charges a £25 call-out fee plus £55 per hour.
[4 marks] For how many hours of work do the two firms charge the same? Answer in hours.
- Write the cost of each firm as an expression in h, the hours.
- Set the two costs equal.
- Solve the equation for h.
- That looks like the difference in call-out fees. Divide it by the difference in hourly rates, 10.
- That looks like rounding down. The exact answer is 3.5 hours.
Firm A: 45h + 60. Firm B: 55h + 25. Set them equal: 45h + 60 = 55h + 25. Take 45h and 25 from both sides: 35 = 10h, so h = 3.5. Check: A costs 45 × 3.5 + 60 = £217.50 and B costs 55 × 3.5 + 25 = £217.50. ✓
- M1 for the two costs 45h + 60 and 55h + 25
- M1 for setting them equal
- M1 for 35 = 10h
- A1 for 3.5
Why it works
- m is the gradient. Each time x goes up by 1, y goes up by m. That steady change is what makes the graph a straight line.
- c is the y-intercept. On the y-axis x = 0, so y = m × 0 + c = c.
- Parallel lines have the same gradient. Equal steepness means the lines never get closer or further apart.
- The crossing point fits both equations. It is on both lines, so its coordinates work in both. That is exactly what “simultaneous” means.
Common traps
- Writing (y, x) instead of (x, y).
- Working out gradient as run ÷ rise. It is rise ÷ run.
- Forgetting the minus sign when a line goes down.
- Reading c from where the line crosses the x-axis. c is on the y-axis.
- In y = 7 − 3x, reading the gradient as 7. Rewrite it as y = −3x + 7 first.
- Thinking that parallel lines need the same c. They need the same m.
Going further
The line y = 2x + 3 crosses the x-axis. What is the x-coordinate of the point where it crosses? Type it as a decimal or a fraction.
- What is the y-coordinate of every point on the x-axis?
- Put that value in place of y and solve for x.
- That looks like the y-intercept, where the line crosses the y-axis. On the x-axis, y = 0.
- Check the sign: 2x = −3, so x is negative.
On the x-axis y = 0. So 0 = 2x + 3, which gives 2x = −3 and x = −1.5.
Higher The points A(1, 2) and B(7, 6) are joined by a straight line. What is the gradient of a line perpendicular to AB? Type it like 3/4 or −2.
- First find the gradient of AB.
- Perpendicular gradients multiply to give −1. Flip the gradient and change its sign.
- You flipped the gradient but did not change its sign.
- That changes the sign but does not flip it. Do both.
Gradient of AB = (6 − 2) ÷ (7 − 1) = 4/6 = 2/3. Flip it and change the sign: −3/2, which is −1.5. Check: 2/3 × (−3/2) = −1.
[3 marks] Show that the lines y = 3x + 1 and y = 3x − 5 never meet.
- Where two lines meet they have the same y. Write that as an equation.
- Take 3x from both sides. What happens?
- Look at the two gradients as well. What do you notice?
Where they meet, 3x + 1 = 3x − 5. Take 3x from both sides: 1 = −5, which is never true. So there is no point where they meet. (Both lines have gradient 3, so they are parallel.)
- M1 for setting 3x + 1 = 3x − 5
- M1 for simplifying to 1 = −5, which is impossible
- C1 for concluding that the lines never meet (they are parallel)
Check your knowledge: on the job
Real jobs from the building trades: plumbing, carpentry and electrics. Prices are typical, so check them with your own supplier.
A waste pipe must fall 1 cm for every 40 cm of its length (a gradient of 1 in 40). A run of pipe is 3.2 m long. How many cm must it fall over that run?
- Change 3.2 m to centimetres first.
- There is 1 cm of fall for every 40 cm. How many lots of 40 cm fit in the run?
- That looks like multiplying by 40. A fall of 1 in 40 means dividing by 40.
- That is 0.08 m, because you used the length in metres. The question asks for cm.
3.2 m = 320 cm. 320 ÷ 40 = 8, so the pipe must fall 8 cm.
A builder designs a wheelchair ramp with a gradient of 1/12 (1 cm of rise for every 12 cm along). A doorstep is 18 cm high. What is the shortest horizontal length of ramp, in cm?
- Gradient is rise ÷ run, so every 1 cm of rise needs 12 cm along.
- How many times bigger is 18 cm than 1 cm?
- That looks like 18 ÷ 12. Each 1 cm of rise needs 12 cm along, so multiply.
- That looks like 18 + 12. Each 1 cm of rise needs 12 cm along, so multiply.
Each 1 cm of rise needs 12 cm along. 18 × 12 = 216 cm. Check: 18 ÷ 216 = 1/12. ✓
An electrician’s bill in pounds is C = 42h + 70, where h is the hours worked. A bill comes to £238. How many hours were worked?
- Put 238 in place of C.
- Take 70 from both sides, then divide by 42.
- That is the cost of the hours only. Divide it by 42 to find the hours.
- That looks like dividing 238 by 42 without taking off the £70 call-out fee first.
42h + 70 = 238, so 42h = 168 and h = 4. The electrician worked 4 hours.
On a plan (in metres) a beam runs from (1, 2) to (9, 12). A support goes under its midpoint. Write the coordinates of the support, like (2, 5).
- The support is halfway along the beam.
- Find the middle of the x-values and the middle of the y-values.
- That looks like adding the coordinates but not halving.
- That looks like the gaps between the ends, not the midpoint.
(1 + 9) ÷ 2 = 5 and (2 + 12) ÷ 2 = 7. The support is at (5, 7).
[3 marks] Firm A hires out scaffolding at a cost of C = 14d + 85 pounds for d days. Firm B charges C = 20d + 25. For how many days is the cost the same?
- At the same cost, the two expressions are equal.
- Write 14d + 85 = 20d + 25 and collect the d terms on one side.
- Then solve for d.
- That is the cost at that point. The question asks for the number of days.
- That looks like the difference in the daily rates (20 − 14), not the number of days.
Set the costs equal: 14d + 85 = 20d + 25. Take 14d and 25 from both sides: 60 = 6d, so d = 10. Check: A costs 14 × 10 + 85 = £225 and B costs 20 × 10 + 25 = £225. ✓
- M1 for setting 14d + 85 = 20d + 25
- M1 for 60 = 6d
- A1 for 10
On a plan, a pipe runs along the line y = 0.5x + 2. A second pipe must run parallel to it and pass through (0, 7). Write the equation of the second pipe. Type it like y = 0.5x + 7.
- What is the gradient of the first pipe?
- Parallel lines have the same gradient. Where does the second pipe cross the y-axis?
- That is the first pipe. A parallel line has the same gradient but crosses the y-axis somewhere else.
- That looks like using the 2 as the gradient. The gradient is the number multiplying x, which is 0.5.
Parallel lines have the same gradient, 0.5. The second pipe crosses the y-axis at 7, so c = 7. The equation is y = 0.5x + 7.