- Position: using coordinates · coming soon
- Using formulae: substituting values
- The nth term of an arithmetic sequence
A table that can never be finished
Here is a taxi company, invented for this lecture. It charges a fixed $3 when you get in, plus $0.50 for every kilometre. So a journey of km costs dollars, where
Make a table of fares. A 0 km journey costs $3.00. Then 1 km costs $3.50, 2 km costs $4.00, 3 km costs $4.50, and 4 km costs $5.00.
You have met a list like this before. The fares go up by the same amount each time, so they form an arithmetic sequence with common difference 0.50. The lecture on geometric sequences ended with a promise: adding the same amount each time gives terms that lie on a straight line. This lecture keeps that promise. It also shows what the line is for.
There is a problem with the table, though. A journey can be 2.5 km long, or 2.71 km. Every distance has a fare. So the table has infinitely many rows, and nobody can ever finish writing it.
A graph solves this. Each row of the table is a pair of numbers, and each pair of numbers is a point. Draw the points, and they line up. Then one straight line through them holds every row at once, including all the rows you never wrote.
Finding your way on the grid
Every point on a graph is named by two numbers in brackets, . They are called its coordinates. The first number tells you how far to go across, along the horizontal -axis. The second tells you how far to go up, along the vertical -axis. You always start at the origin O, the point , where the two axes cross.
So means 4 across, then 5 up. The order matters. The point is a different point: 5 across, then 4 up. The alphabet helps you keep the order: comes before , and across comes before up.
Negative coordinates go the other way. The point is 3 to the left of the origin, then 2 up. The point is 2 to the right, then 3 down. The axes divide the grid into four regions, called quadrants. The taxi graph stays in one quadrant, but many lines pass through three.
Method 1: a table of values
The most reliable way to draw the graph of an equation has four steps.
- 1. Choose some values of .
- 2. Substitute each one into the equation to find .
- 3. Plot each pair as a point.
- 4. Draw one straight line through the points with a ruler.
For the taxi, choose and 8. Each is a substitution, just as in the lecture on using formulae. For example, at , .
| (km) | 0 | 2 | 4 | 6 | 8 |
|---|---|---|---|---|---|
| ($) | 3 | 4 | 5 | 6 | 7 |
A few choices make the work easier. Space the values evenly, so that a pattern can show. Include , the easiest substitution. Plot at least three points. Two points are enough to fix a line. But if one of the two is wrong, you still get a straight line, only the wrong one. The third point is your check.
Before you plot, set up the axes. Each axis needs an even scale: the same distance on the paper must always mean the same amount. Label each axis with what it measures, such as "distance in km" and "fare in $".
Now look at the graph again. The line could carry on to the left, into negative values of . The equation does not mind: at , . But no taxi travels km. So the graph of a real situation uses only the part of the line that makes sense, here from . The equation describes the whole line. The situation chooses the piece.
Why the points line up
Why should the points lie on a straight line at all? Why not a gentle curve?
Look along the fares in the table: 3, 4, 5, 6, 7. Each step of 2 km adds exactly $1. This is because every extra kilometre adds $0.50, wherever the journey has reached. So the step from one point to the next always has the same shape: 2 across, 1 up.
Now imagine walking from point to point. If every step has the same shape, the walk never changes direction. A path that never changes direction is a straight line.
That is it. That is the whole idea. Equal steps in give equal steps in , and equal steps make a straight line. The size of the step also tells you how steep the line is. The next lecture in this topic gives that number its name.
Test the idea yourself below. Plot points one at a time and watch the steps. Then choose , where something different happens.
Choose an equation. Move x with the slider or the − and + buttons, then press Plot this point. Plot at least three points, and read the change in y for each 1 across. Then press Join with a ruler.
The graph of , plotted from a table with from to 4. Every step is 1 across and 2 up, so the points lie on one straight line.
Compare . For , the values of are . The changes for each 1 across are . They are not equal, so the points do not lie on a straight line, and a ruler line through two of them misses the others.
You should have seen two things. For the first two equations, the change in for each 1 across was the same between every pair of neighbouring points, and the ruler line went through all of them. For , the changes were . They grow steadily, so the walk turns at every point and the graph is a curve.
What makes an equation linear
An equation whose graph is a straight line is called a linear equation. You can recognise one before you draw anything.
An equation in and is linear when and each appear only to the power 1. They are never squared, never multiplied together, never under a root and never in the bottom of a fraction.
The graph of every linear equation is a straight line. Examples: , , , .
The reason is the one you have just seen. When appears only to the power 1, each extra 1 in changes by the same amount. With , the gaps keep growing.
Method 2: where the line crosses the axes
Many linear equations do not arrive in the form "". Take . You could make a table, but each row would need a small equation solved. There is a faster way.
Most straight lines cross both axes. The point where a line crosses the -axis is called the -intercept. The point where it crosses the -axis is called the -intercept.
Every point on the -axis has . So to find the -intercept, put : , so and . The point is .
Every point on the -axis has . So to find the -intercept, put : , so and . The point is .
Plot the two intercepts and join them with a ruler. Then check with a third point away from the axes. At : , so and . The point should be on your line, and it is.
Why does putting work? It is not a trick. The -axis is exactly the set of points whose -coordinate is 0. So the question "where does the line meet the -axis?" means "which point of the line has ?" The substitution is that question, written in algebra.
Use the intercept method on . What goes wrong, and how do you fix it?
Show the answer
Putting gives . Putting gives . Both intercepts are the same point, the origin . One point cannot fix a line, because infinitely many lines pass through it. So choose another value: gives . Join to , and check with a third point such as . Every line through the origin needs this extra point. The intercept method works only when it gives two different points.
Lines with only one letter
Some linear equations have only one letter. Look at . There is no in it, so the value of makes no difference: is always 4. The points , and all fit. They all sit at the same height, so they form a horizontal line, 4 units above the -axis.
Now look at . Here can be anything, but is always . The points , and all fit. They sit directly above and below each other, so they form a vertical line, 2 units to the left of the -axis.
The vertical line is the one kind of straight line that cannot be written as "". This is because one value of , , goes with every value of , not with a single one. So the form , which a later lecture in this topic studies, covers almost every line, but not this one.
The intercept method does not suit these lines: never meets the -axis. They need no method, because the equation already tells you where the line is.
A point that refuses to line up
When you plot a table of values, every point should lie exactly on one straight line. If one point sits off the line, the line is not bent. That point is almost always a mistake in its row of the table. Do not draw the line out of its way to reach it. Go back and redo that substitution.
The equal-steps idea gives you a check before you plot anything. With evenly spaced values, the values of a straight line must change by the same amount every time. If one change is different, the error is in a row beside it. Find the wrong line in the working below.
One line of this working is wrong. Tap the line you think contains the mistake.
A student's working for , with the wrong row marked.
- :
- : . Wrong: the minus sign of was lost. Subtracting adds 3, so .
- :
- :
- :
- Steps in : . They are not equal, which points to the row .
The odd steps, and then , point straight at the row . With there, every step is , as it should be.
Worked examples
Use the taxi line to find (a) the fare for a 5 km journey, (b) how far you can travel for $6.50.
(a) Find 5 on the -axis. Go straight up to the line, then straight across to the -axis. You reach 5.5, so the fare is $5.50. Check: ✓.
(b) This time start on the -axis, at 6.5. Go across to the line, then down to the -axis. You reach 7, so $6.50 pays for 7 km. Check: ✓. Reading backwards like this is the same as solving the equation . The graph does it by eye.
One more thing to notice. A 4 km journey costs $5, but an 8 km journey costs $7, not $10. Doubling the distance does not double the fare, because of the fixed $3. So the fare is not directly proportional to the distance, and its line does not pass through the origin.
Draw the graph of for from to 3.
Make the table, keeping brackets round the negative values. At : .
| 0 | 1 | 2 | 3 | |||
|---|---|---|---|---|---|---|
| 7 | 5 | 3 | 1 |
Check the steps first: each 1 across changes by , every time. So the table is consistent. The line falls from left to right, starting at in the top-left quadrant and ending at in the bottom-right one.
It crosses the -axis at . For the -intercept, put : , so . The point sits halfway between and , exactly where the line should cross ✓.
Draw the graph of .
Put : , so . The -intercept is , below the origin. Put : , so . The -intercept is .
Join them, then check with a third point. At : , so and . Is on the line? Going from to is 5 across and 2 up. One more equal step, 5 across and 2 up, lands on ✓. Equal steps again.
A second taxi company (also invented) charges a flat $4 for any journey up to 10 km. Draw its fare line on the same axes as . For which journeys is each company cheaper?
The flat fare is , a horizontal line from to . The first company's line starts lower, at , and rises. The two lines cross where . That gives , so . They cross at .
Left of , the rising line is below the flat line, so the first company is cheaper for journeys shorter than 2 km. Right of , the flat fare is cheaper. At exactly 2 km, both charge $4. Check: ✓.
Three classic mistakes
If your points do not lie on one line, do not join them with short straight pieces or draw a bend through them. A linear equation never gives a bent graph. One point off the line means one wrong row. Find it, fix it, and then draw one ruler line through all the points and past them.
The point is 2 across and 5 up. Plotting it 5 across and 2 up puts it at , a different point. Say "across, then up" as you plot. The same mistake happens when reading a graph: the first coordinate always comes from the horizontal axis.
is a vertical line, because every point on it has -coordinate 3. is a horizontal line. "" sounds as if it should go up, so many students draw it vertically. Do not trust the sound. List three points that fit, such as , and , and see which way they line up.
Work each one on paper first. Open a hint only when you are stuck.
-
Make a table of values for for from to 3, and draw the graph. Then decide, without drawing, whether the points and lie on the line.
Hint 1
Work out for each , with brackets round the negative values. Check that the values change by the same amount each time.
Hint 2
A point lies on the line when its coordinates fit the equation. Put its into and compare the result with its .
Full answer
For , the values are . Each step is , so the table is consistent, and the points lie on one straight line. For : , which equals the point's , so it is on the line. For : , but the point has . So it is not on the line: it is 1 unit above it.
-
Find the intercepts of , and draw the line. Then find a third point to check it.
Hint 1
Put to find where the line crosses the -axis. Then put .
Hint 2
For the check, choose an away from the intercepts, such as , and solve for .
Full answer
: , so , giving . : , so , giving . Check at : , so and , giving . Going from to is 5 across and 4 down. One more equal step, 5 across and 4 down, reaches ✓.
-
A rectangle has corners at , , and . Write the equation of each of its four sides. Which side does the point lie on? Which line cuts the rectangle into a top half and a bottom half?
Hint 1
Sketch the rectangle. Each side is horizontal or vertical.
Hint 2
On a horizontal side, every point has the same -coordinate. On a vertical side, every point has the same -coordinate.
Full answer
The bottom side joins and : every point has , so its equation is . The top side is . The left side joins and , so it is . The right side is . The point has and its , 3, is between 1 and 5, so it lies on the right side, . Halfway between and is , so the horizontal line cuts the rectangle into two equal halves.
-
Two candles are lit at the same time. Candle A is 24 cm tall and burns down 3 cm each hour, so its height after hours is . Candle B is 18 cm tall and burns down 1.5 cm each hour, so . Draw both lines for the times that make sense. When is candle A 9 cm tall? When are the two candles the same height?
Hint 1
Each line starts at its candle's height when and stops when the height reaches 0. Find when that happens for each candle.
Hint 2
The candles are the same height where the two lines cross, that is where .
Full answer
Candle A: at , so its line runs from to . Candle B: at , so its line runs from to . A negative height or time makes no sense, so neither line goes further. Candle A is 9 cm tall when , so and hours. The candles are the same height where . This gives , so hours, when both are cm tall. Check: ✓. On the graph, A starts higher but falls faster, so the two lines cross at . After 4 hours, A is the shorter candle.
A straight line is the picture of steady change: the same change in for every equal step in . That is why scientists look for one first when they plot their measurements.
In 1678 Robert Hooke published his law for springs in Latin: ut tensio, sic vis, "as the extension, so the force". Each equal extra weight stretches a spring by the same extra amount, until it is stretched too far. So the measurements lie close to a straight line, and the line gives stretches that were never measured.
Straight lines also appear in pieces. Singapore taxes income in bands (IRAS, rates for Years of Assessment from 2024). For a chargeable income between $40 000 and $80 000, the tax is $550 plus 7% of the amount above $40 000. So $60 000 gives dollars. Inside that band, the graph of tax against income is a straight line. In the next band, the rate is 11.5%, so the next piece is steeper. The whole graph is a chain of straight pieces, each one steeper than the last.
- A point is plotted by going across and then up from the origin, and negative coordinates go left or down.
- To draw a graph from a table of values, substitute evenly spaced values of , plot at least three points, and draw one ruler line through them.
- The graph of a linear equation is straight because equal steps in give equal steps in , and the same fact checks a table before you plot it.
- The intercepts are found by putting (for the -intercept) and (for the -intercept), and a third point is always used as a check.
- is a horizontal line and is a vertical line, and the vertical line is the one straight line that cannot be written as "".