What Is It?
What Are Coordinates and Straight-Line Graphs?
Coordinates are a pair of numbers that tell you exactly where a point is on a flat grid. The grid is made from two number lines that cross at right angles. The line going across is the x-axis, the line going up is the y-axis, and the place where they cross is called the origin, which has coordinates (0, 0).
A point is always written as (x, y): first how far across, then how far up. The point (3, 5) is 3 steps to the right of the origin and 5 steps up. Because the order matters, mathematicians call this an ordered pair. Swap the numbers and you land somewhere completely different.
A straight-line graph is what you get when you plot every point that obeys a simple rule, such as "the y value is always double the x value plus 1". Join those points and they line up perfectly in a straight line. Every straight line (except a vertical one) can be described by an equation of the form y = mx + c, where m tells you how steep the line is and c tells you where it crosses the y-axis.
In this chapter you will learn to plot points in all four quadrants, find the midpoint between two points, calculate the gradient (called the slope in the US) of a line, read and rearrange equations like y = mx + c (often written y = mx + b in American textbooks), and find the equation of a line from two points. These skills link algebra to pictures, which is one of the most powerful ideas in all of maths.
Why Does It Matter?
Why Does It Matter?
Coordinates and straight lines are everywhere once you start looking. Any time something changes at a steady rate, a straight-line graph is hiding behind it.
Maps, GPS and finding places
Latitude and longitude are coordinates for the whole Earth. A map grid reference, a seat number in a cinema (row and seat) and a square on a chessboard (such as e4) all use the same idea: two numbers, in a fixed order, pin down one exact spot.
Screens, games and animation
Every pixel on your phone or laptop screen has an x and a y coordinate. When a game character moves, the program is changing its coordinates many times a second. Game designers use gradients to make a ball roll down a slope or a car drive up a ramp at the right angle.
Money that grows at a steady rate
A taxi that charges a fixed starting fee plus the same amount for every kilometre, a phone plan with a monthly charge plus a cost per gigabyte, or a savings jar where you add the same amount each week: all of these make straight-line graphs. The starting fee is the y-intercept, and the cost per unit is the gradient. Reading the graph lets you compare deals at a glance.
Roads, ramps and roofs
Road signs that warn of a steep hill show the gradient as a percentage, for example 10%, meaning the road rises 10 metres for every 100 metres you travel across. Wheelchair ramps, staircases and roofs all have rules about their gradients so that they are safe and comfortable to use.
Science and engineering
Scientists plot results on coordinate grids to spot patterns. If the points form a straight line, the gradient often has a real meaning: on a distance against time graph the gradient is the speed, and on a graph of the stretch of a spring against the force applied, the gradient tells engineers how stiff the spring is.
Detailed Explanation
Coordinates and Straight-Line Graphs Explained Step by Step
1. The coordinate grid
Imagine you are standing in the corner of a large hall with tiles on the floor. To tell a friend where you dropped your keys you could say "walk 4 tiles along the wall, then 3 tiles towards the middle". That is exactly what coordinates do.
The grid has two axes (the plural of axis). The x-axis is horizontal and the y-axis is vertical. They meet at the origin, O, which is the point (0, 0). Each axis is a number line, so it has numbers marked at equal steps.
To plot the point (4, 3), start at the origin, move 4 across to the right, then 3 up. Mark the spot with a small cross. A handy memory trick is "along the corridor, then up the stairs": you always go across (x) before you go up or down (y).
To read the coordinates of a point that is already plotted, do the same thing in reverse: drop straight down (or up) to the x-axis to read the x value, then go straight across to the y-axis to read the y value.
2. The four quadrants and negative coordinates
The axes do not stop at zero. The x-axis carries on to the left with negative numbers, and the y-axis carries on downwards with negative numbers. The two axes split the grid into four regions called quadrants, numbered anticlockwise starting from the top right.
| Quadrant | Position | Sign of x | Sign of y | Example point |
|---|---|---|---|---|
| First | Top right | + | + | (3, 2) |
| Second | Top left | - | + | (-3, 2) |
| Third | Bottom left | - | - | (-3, -2) |
| Fourth | Bottom right | + | - | (3, -2) |
A negative x value means move left instead of right. A negative y value means move down instead of up. So (-2, -5) means 2 to the left, then 5 down. Points that sit exactly on an axis, such as (0, 4) or (-6, 0), are not in any quadrant: they lie on the boundary.
3. The midpoint of a line segment
Picture two friends standing at different points on the grid who agree to meet exactly halfway. The halfway point is called the midpoint. Halfway across is the average of the two x values, and halfway up is the average of the two y values.
For points (x₁, y₁) and (x₂, y₂), the small numbers ₁ and ₂ are just labels meaning "first point" and "second point". The midpoint is:
Midpoint = ( (x₁ + x₂) ÷ 2 , (y₁ + y₂) ÷ 2 )
For example, the midpoint of (2, 3) and (8, 7) is ((2 + 8) ÷ 2, (3 + 7) ÷ 2) = (5, 5). Always check that your answer looks halfway between the two points if you sketch them.
4. Horizontal and vertical lines
Imagine a row of points that all sit at the same height, such as (-2, 3), (0, 3), (1, 3) and (5, 3). The x values change but the y value is always 3. The rule they all follow is simply y = 3, and joining them gives a horizontal line.
In the same way, points such as (4, -1), (4, 0) and (4, 6) all have x = 4. The rule is x = 4, and the line is vertical.
| Equation | What the line looks like |
|---|---|
| y = k (for any number k) | Horizontal line crossing the y-axis at k |
| x = k | Vertical line crossing the x-axis at k |
| y = 0 | The x-axis itself |
| x = 0 | The y-axis itself |
| y = x | Diagonal line through the origin, going up at 45° |
| y = -x | Diagonal line through the origin, going down at 45° |
It feels backwards at first that "x = 4" is a vertical line, so think of it this way: every point on it has an x coordinate of 4, and those points are stacked one above the other.
5. Plotting a straight line from a table of values
An equation such as y = 2x + 1 is a rule that turns any x value into a y value. Think of it as a machine: put x in, double it, add 1, and y comes out. To draw the graph, choose a few x values, work out the matching y values, and plot the pairs.
| x | -2 | -1 | 0 | 1 | 2 | 3 |
|---|---|---|---|---|---|---|
| y = 2x + 1 | -3 | -1 | 1 | 3 | 5 | 7 |
Plot (-2, -3), (-1, -1), (0, 1), (1, 3), (2, 5) and (3, 7), then join them with a ruler. They lie on a perfectly straight line. Notice that each time x goes up by 1, y goes up by 2. That steady change is the key idea behind the gradient.
Three points are enough to draw a straight line. Use at least three, because if one of them is out of line you know you have made an arithmetic slip. Extend the line right across the grid and label it with its equation.
6. Gradient: how steep is the line?
Imagine walking along the line from left to right. The gradient tells you how much you climb for every one step you take across. A gradient of 2 means you go up 2 for every 1 across. A gradient of ½ means a gentle climb of half a unit for every 1 across.
To find the gradient from a graph, pick two points on the line, draw a right-angled triangle underneath it, and measure the rise (the change in y) and the run (the change in x).
Gradient = rise ÷ run = change in y ÷ change in x
Using coordinates, for two points (x₁, y₁) and (x₂, y₂):
m = (y₂ - y₁) ÷ (x₂ - x₁)
The letter m is the standard symbol for gradient. The order you subtract in does not matter, as long as you use the same order on the top and the bottom.
| Type of gradient | What you see, reading left to right | Example |
|---|---|---|
| Positive | Line goes uphill | y = 3x + 1 (m = 3) |
| Negative | Line goes downhill | y = -2x + 5 (m = -2) |
| Zero | Flat, horizontal line | y = 4 (m = 0) |
| Undefined | Vertical line (the run is 0, and you cannot divide by 0) | x = 3 |
The bigger the number (ignoring its sign), the steeper the line. A gradient of 5 is steeper than a gradient of 2, and a gradient of -5 is steeper than a gradient of -2, it just goes downhill.
7. The equation y = mx + c
Every non-vertical straight line can be written as y = mx + c. This is one of the most useful equations you will ever learn, because you can read the whole shape of the line straight from it.
- m is the gradient: the number multiplying x.
- c is the y-intercept: the y value where the line crosses the y-axis. The crossing point is (0, c), because every point on the y-axis has x = 0.
For y = 4x - 3, the gradient is 4 and the line crosses the y-axis at (0, -3). For y = -x + 6, the gradient is -1 (the "1" is invisible) and the y-intercept is 6. For y = 5x, there is no c written, so c = 0 and the line passes through the origin.
Sometimes the equation is in a disguise, such as 2y = 6x + 8 or 3x + y = 7. Rearrange it so that y is on its own on the left before you read off m and c:
- 2y = 6x + 8: divide every term by 2 to get y = 3x + 4. So m = 3 and c = 4.
- 3x + y = 7: subtract 3x from both sides to get y = -3x + 7. So m = -3 and c = 7.
You can also draw a line without a table of values. Plot the y-intercept (0, c), then use the gradient as a set of directions: for m = 3, go 1 across and 3 up and mark another point; for m = -½, go 2 across and 1 down. Join the points and extend.
8. Finding the equation of a line
Think of a line as being fixed by two facts: how steep it is and one place it passes through. Once you know both, the equation follows.
Given the gradient and one point: put the gradient into y = mx + c, then substitute the coordinates of the point to find c. For a line with gradient 3 through (2, 11): 11 = 3 × 2 + c, so 11 = 6 + c and c = 5. The equation is y = 3x + 5.
Given two points: first find the gradient from the two points, then use either point to find c, exactly as above. Finally, check your equation with the other point. If it works for both, you know it is right.
9. Where lines cross the axes and each other
Every point on the x-axis has y = 0, so to find where a line crosses the x-axis, set y = 0 and solve. For y = 2x - 8: 0 = 2x - 8, so x = 4 and the line crosses the x-axis at (4, 0). To find the y-intercept, set x = 0, which simply gives c.
Two lines that are not parallel cross at exactly one point. At that point both equations are true together, so their y values are equal. Set the right-hand sides equal and solve. For y = x + 2 and y = 3x - 4: x + 2 = 3x - 4, so 6 = 2x and x = 3. Then y = 3 + 2 = 5, so the lines meet at (3, 5).
10. Parallel and perpendicular lines
Picture two railway tracks: they never meet because they climb at exactly the same rate. Parallel lines have the same gradient. So y = 2x + 1 and y = 2x - 7 are parallel, and only their y-intercepts differ.
Lines that meet at a right angle are called perpendicular. Their gradients multiply to give -1. In practice, flip the gradient over and change its sign: a line with gradient 2 is perpendicular to a line with gradient -½, and a line with gradient -3/4 is perpendicular to a line with gradient 4/3.
Parallel: m₁ = m₂ and Perpendicular: m₁ × m₂ = -1
11. Straight-line graphs in real life
When a situation has a fixed starting amount plus a steady rate, it makes a straight line. A plumber who charges a call-out fee of 40 plus 25 for every hour of work has total cost C = 25h + 40. The gradient, 25, is the cost per hour. The intercept, 40, is the cost before any work is done. Learning to say what m and c mean in a real situation is a skill that exams love to test.
Worked Examples
Find the midpoint of the line joining A(2, 3) and B(8, -5).
Add the x coordinates and halve: (2 + 8) ÷ 2 = 10 ÷ 2 = 5.
Add the y coordinates and halve: (3 + (-5)) ÷ 2 = -2 ÷ 2 = -1.
Write the answer as a coordinate pair, x first.
The midpoint is (5, -1).
Quick check: from x = 2 to x = 8 is 6 steps, and 5 is 3 steps from each end. From y = 3 down to y = -5 is 8 steps, and -1 is 4 steps from each end.
Complete a table of values for y = 3x - 2 for x = -1, 0, 1, 2 and 3, and describe the graph.
x = -1: y = 3 × (-1) - 2 = -3 - 2 = -5.
x = 0: y = 0 - 2 = -2.
x = 1: y = 3 - 2 = 1. x = 2: y = 6 - 2 = 4. x = 3: y = 9 - 2 = 7.
The y values go up by 3 each time, so the points lie on a straight line with gradient 3.
y values: -5, -2, 1, 4, 7. Plot (-1, -5), (0, -2), (1, 1), (2, 4), (3, 7) and join with a straight line crossing the y-axis at (0, -2).
The constant jump of 3 in the y row matches m = 3 in the equation, and the y value when x = 0 matches c = -2. That is y = mx + c in action.
Find the gradient of the line through (1, 2) and (4, 11).
Change in y: 11 - 2 = 9.
Change in x: 4 - 1 = 3.
Gradient = 9 ÷ 3 = 3.
The gradient is 3.
The line goes up 3 for every 1 across. Both points are going uphill from left to right, so a positive answer makes sense.
Find the gradient of the line through (-2, 5) and (4, -7).
Change in y: -7 - 5 = -12.
Change in x: 4 - (-2) = 4 + 2 = 6.
Gradient = -12 ÷ 6 = -2.
The gradient is -2.
Going from left (x = -2) to right (x = 4), the y value falls from 5 to -7, so the line goes downhill and the gradient must be negative. Subtracting a negative (4 - (-2)) is where most slips happen, so take care.
Find the gradient and the y-intercept of the line 3x + 2y = 8.
Get the y term on its own: subtract 3x from both sides to give 2y = -3x + 8.
Divide every term by 2: y = -1.5x + 4 (or y = -3/2 x + 4).
Compare with y = mx + c: m = -1.5 and c = 4.
Gradient -1.5 (that is -3/2), y-intercept 4, so the line crosses the y-axis at (0, 4).
Check: (0, 4) should satisfy the original equation: 3 × 0 + 2 × 4 = 8. It does.
Find the equation of the straight line through (2, 7) and (5, 13).
Gradient: m = (13 - 7) ÷ (5 - 2) = 6 ÷ 3 = 2.
So the line is y = 2x + c. Substitute the point (2, 7): 7 = 2 × 2 + c.
7 = 4 + c, so c = 3.
Check with the other point (5, 13): 2 × 5 + 3 = 13. Correct.
y = 2x + 3
Always test the second point. If it does not fit, the gradient or c has an arithmetic slip.
Find the equation of the line parallel to y = 4x - 5 that passes through (3, 1).
Parallel lines have the same gradient, so m = 4.
The new line is y = 4x + c. Substitute (3, 1): 1 = 4 × 3 + c.
1 = 12 + c, so c = 1 - 12 = -11.
y = 4x - 11
Check: 4 × 3 - 11 = 12 - 11 = 1. The new line is the old line slid downwards, which is why only c changed.
A plumber charges a fixed call-out fee of 40 plus 25 for each hour of work. (a) Write an equation for the total cost C for h hours. (b) Find the cost of a 3-hour job. (c) A bill comes to 165. How many hours did the job take? (d) What do the gradient and intercept mean?
(a) The cost rises by 25 per hour and starts at 40, so C = 25h + 40.
(b) h = 3: C = 25 × 3 + 40 = 75 + 40 = 115.
(c) 165 = 25h + 40. Subtract 40: 125 = 25h. Divide by 25: h = 5.
(d) The gradient, 25, is the cost per hour. The intercept, 40, is the cost when h = 0, the call-out fee.
(a) C = 25h + 40 (b) 115 (c) 5 hours (d) gradient = cost per hour, intercept = fixed call-out fee.
Part (c) is just solving a linear equation, which you met in the previous chapter. Graphs and equations are two views of the same rule.
Common Mistakes
Going up before going across
Because both numbers look alike, it is easy to mix the order. Remember along the corridor, then up the stairs, or notice that x comes before y in the alphabet.
Turning the gradient upside down
The gradient is rise over run: the up-and-down change goes on top. A quick sketch helps: this line climbs steeply, so its gradient should be bigger than 1, not a small fraction.
Subtracting in a different order on top and bottom
If you start with the second point on the top, you must start with the second point on the bottom too. Mixing the order flips the sign. Check: this line goes uphill, so the gradient must be positive.
Reading the gradient before rearranging
You can only read m and c straight off when the equation starts with y = on its own. Divide every term, including the constant, by the number in front of y.
Mixing up x = k and y = k
On the line x = 3, every point has an x coordinate of 3, such as (3, 0), (3, 1) and (3, 5). Those points are stacked straight up, so the line is vertical. If in doubt, plot three points that obey the rule.
Thinking c is where the line crosses the x-axis
The c in y = mx + c is the y-intercept. To find the x-intercept, set y = 0 and solve: 0 = 2x - 6 gives x = 3.
Summary
- A coordinate (x, y) gives a position on a grid: x across first, then y up or down.
- The axes cross at the origin (0, 0) and split the grid into four quadrants, numbered anticlockwise from the top right.
- The midpoint of two points is the average of their x values and the average of their y values.
- Lines of the form x = k are vertical, and lines of the form y = k are horizontal.
- Gradient = change in y ÷ change in x, so it measures how far the line rises for each step across.
- Positive gradients go uphill from left to right, negative gradients go downhill, horizontal lines have gradient 0 and vertical lines have no defined gradient.
- In y = mx + c, m is the gradient and c is the y-intercept, the point (0, c) where the line crosses the y-axis.
- Rearrange an equation so that y is on its own before reading off m and c.
- To find the equation of a line, find m first, then substitute a point to find c, and check with a second point.
- Parallel lines have equal gradients, and perpendicular lines have gradients that multiply to -1.