Graphs of Linear Functions

Draw the graph of a linear function y=ax+by = ax + b from a table of values, read values from it, find where it crosses the axes, compare two lines, and draw and read straight-line graphs from real life.

Before you start

  • A point is given by its coordinates (x,y)(x, y), the xx-coordinate first. A(3,−2)A(3, -2) is 33 units to the right of the origin OO and 22 units down.
  • A linear function can be written in the form y=ax+by = ax + b, where aa and bb are numbers: aa multiplies xx, and bb stands on its own. In y=2x+1y = 2x + 1, a=2a = 2 and b=1b = 1. The function y=4−3xy = 4 - 3x can be written as y=−3x+4y = -3x + 4, so a=−3a = -3 and b=4b = 4.
  • A table of values lists some values of xx and the value of yy that the rule gives for each. To substitute a negative number, use brackets: when x=−3x = -3, y=2(−3)+1=−6+1=−5y = 2(-3) + 1 = -6 + 1 = -5.
  • To find xx when you know yy, solve an equation: if 2x+1=62x + 1 = 6, then 2x=52x = 5 and x=2.5x = 2.5.

Drawing the Graph of a Linear Function

When the rule connecting xx and yy is a linear function y=ax+by = ax + b, the points of its table of values always lie on one straight line. That line, drawn with a ruler, is the graph of the function: the coordinates of every point on it make the equation true.

The graph of a linear function

The graph of a linear function y=ax+by = ax + b is a straight line.

To draw it:

(1) make a table of values for the given values of xx, with at least three pairs;

(2) choose a scale for each axis, so that every value in the table fits, and draw the axes;

(3) plot the points;

(4) draw a straight line through the points with a ruler, across the given values of xx only;

(5) label the line with its equation.

Why at least three points?

Two points are enough to fix a straight line. The third point is a check: if the three points do not lie on one straight line, one of the values in the table is wrong. Work the table out again before you draw.

Example 1: Drawing the graph of y=2x+1y = 2x + 1

Draw the graph of y=2x+1y = 2x + 1 for values of xx from −2-2 to 33.

Solution

In the lesson Functions and Graphs of Ordered Pairs you made this table of values, plotted its six points and saw that they lie on a straight line. Now draw the line itself.

Step 1: the table of values. As a reminder, substitute each value of xx into y=2x+1y = 2x + 1:

x=−2x = -2: y=2(−2)+1=−4+1=−3y = 2(-2) + 1 = -4 + 1 = -3

x=−1x = -1: y=2(−1)+1=−2+1=−1y = 2(-1) + 1 = -2 + 1 = -1

x=0x = 0: y=2(0)+1=0+1=1y = 2(0) + 1 = 0 + 1 = 1

x=1x = 1: y=2(1)+1=3y = 2(1) + 1 = 3,   \; x=2x = 2: y=2(2)+1=5y = 2(2) + 1 = 5,   \; x=3x = 3: y=2(3)+1=7y = 2(3) + 1 = 7

xx−2-2−1-100112233
yy−3-3−1-111335577

Step 2: the scales. xx runs from −2-2 to 33 and yy from −3-3 to 77, so the xx-axis must reach at least from −2-2 to 33, and the yy-axis from −3-3 to 77. One unit to each square on both axes fits (on graph paper, 1 cm to 1 unit).

Step 3: plot the points (−2,−3)(-2, -3), (−1,−1)(-1, -1), (0,1)(0, 1), (1,3)(1, 3), (2,5)(2, 5) and (3,7)(3, 7).

Step 4: draw and label the line. The six points lie on one straight line. Draw it with a ruler from (−2,−3)(-2, -3) to (3,7)(3, 7), no further, and write y=2x+1y = 2x + 1 beside it.

The graph of y = 2x + 1 for x from −2 to 3: the points (−2, −3), (−1, −1), (0, 1), (1, 3), (2, 5) and (3, 7) plotted and joined by a straight linexy−3−2−11234−4−3−2−112345678Oy = 2x + 1

The graph of y=2x+1y = 2x + 1 is the straight line from (−2,−3)(-2, -3) to (3,7)(3, 7), through all six points of the table.

Example 2: A line that goes down

Copy and complete the table of values for y=3−2xy = 3 - 2x. Then draw the graph of y=3−2xy = 3 - 2x for values of xx from −1-1 to 44.

xx−1-10011223344
yy?33??−3-3?

Solution

y=3−2xy = 3 - 2x can be written as y=−2x+3y = -2x + 3, a linear function with a=−2a = -2 and b=3b = 3. Substitute each missing value of xx:

x=−1x = -1: y=3−2(−1)=3+2=5y = 3 - 2(-1) = 3 + 2 = 5

x=1x = 1: y=3−2(1)=3−2=1y = 3 - 2(1) = 3 - 2 = 1

x=2x = 2: y=3−2(2)=3−4=−1y = 3 - 2(2) = 3 - 4 = -1

x=4x = 4: y=3−2(4)=3−8=−5y = 3 - 2(4) = 3 - 8 = -5

xx−1-10011223344
yy553311−1-1−3-3−5-5

Scales: xx runs from −1-1 to 44 and yy from −5-5 to 55, so the xx-axis must reach from −1-1 to 44 and the yy-axis from −5-5 to 55. One unit to each square on both axes fits.

Plot the six points. They lie on one straight line, so the table checks. This line goes down from left to right: each time xx increases by 11, yy decreases by 22. Draw it from (−1,5)(-1, 5) to (4,−5)(4, -5) and label it.

The graph of y = 3 − 2x for x from −1 to 4: the points (−1, 5), (0, 3), (1, 1), (2, −1), (3, −3) and (4, −5) joined by a straight line going down from left to rightxy−2−112345−6−5−4−3−2−1123456Oy = 3 − 2x

The missing values of yy are 55, 11, −1-1 and −5-5. The graph is the straight line from (−1,5)(-1, 5) to (4,−5)(4, -5).

Example 3: Choosing a scale

Draw the graph of y=5x+10y = 5x + 10 for values of xx from 00 to 66.

Solution

Take x=0x = 0, 22, 44 and 66 (three pairs are enough; the fourth is a further check):

x=0x = 0: y=5(0)+10=10y = 5(0) + 10 = 10;   \; x=2x = 2: y=5(2)+10=20y = 5(2) + 10 = 20;   \; x=4x = 4: y=5(4)+10=30y = 5(4) + 10 = 30;   \; x=6x = 6: y=5(6)+10=40y = 5(6) + 10 = 40

xx00224466
yy1010202030304040

Scales: yy goes up to 4040. With one unit to each square, the yy-axis would need 4040 squares, far too many. Let each square on the yy-axis stand for 55 units instead, so that 4040 is 88 squares up. The xx-axis keeps one unit to each square.

The two axes may have different scales, but along one axis every square must stand for the same amount: 00, 55, 1010, 1515, … up the yy-axis.

Plot the four points, draw the line from (0,10)(0, 10) to (6,40)(6, 40) and label it.

The graph of y = 5x + 10 for x from 0 to 6, with 1 unit to a square across and 5 units to a square up: the points (0, 10), (2, 20), (4, 30) and (6, 40) joined by a straight linexy123456751015202530354045Oy = 5x + 10

With 11 unit to each square across and 55 units to each square up, the graph is the straight line from (0,10)(0, 10) to (6,40)(6, 40).

Reading Values from a Graph

Once a graph is drawn, it can be used to find values without working them out. Draw light dashed guide lines from one axis to the line, and from the line to the other axis.

Reading from a graph

To find yy for a given xx: start at the value on the xx-axis, go straight up (or down) to the line, then straight across to the yy-axis, and read the value there.

To find xx for a given yy: start at the value on the yy-axis, go straight across to the line, then straight down (or up) to the xx-axis, and read the value there.

Example 4: Reading the graph of y=2x+1y = 2x + 1

Use the graph of y=2x+1y = 2x + 1 drawn in Example 1 to find
(a) the value of yy when x=1.5x = 1.5,
(b) the value of xx when y=6y = 6,
(c) the value of xx when y=2y = 2.

Solution

(a) From 1.51.5 on the xx-axis (halfway between 11 and 22), go up to the line at PP, then across to the yy-axis. The reading is 44.

(b) From 66 on the yy-axis, go across to the line at QQ, then down to the xx-axis. The reading is halfway between 22 and 33, that is, 2.52.5.

(c) From 22 on the yy-axis, go across to the line at RR, then down to the xx-axis. The reading is halfway between 00 and 11, that is, 0.50.5.

The graph of y = 2x + 1 with dashed guide lines: from x = 1.5 up to P(1.5, 4); from y = 6 across to Q(2.5, 6); from y = 2 across to R(0.5, 2)xy−3−2−11234−4−3−2−112345678Oy = 2x + 1PQR

Check each reading by calculation:

(a) y=2(1.5)+1=3+1=4y = 2(1.5) + 1 = 3 + 1 = 4

(b) 2x+1=62x + 1 = 6, so 2x=52x = 5 and x=2.5x = 2.5

(c) 2x+1=22x + 1 = 2, so 2x=12x = 1 and x=0.5x = 0.5

(a) y=4y = 4 \quad (b) x=2.5x = 2.5 \quad (c) x=0.5x = 0.5

How exact is a reading?

A value read from a graph is only as exact as the drawing. Read to the nearest half of a small square, or as closely as the scale allows. When you know the equation, check the reading by calculation, as in Example 4.

Points on a Line, and Where a Line Crosses the Axes

The coordinates of every point on the graph of y=ax+by = ax + b make the equation true, and every point whose coordinates make the equation true lies on the line y=ax+by = ax + b (the drawn part may need to be extended to reach it). So there are two ways to tell whether a point lies on a line: substitute its coordinates into the equation, or plot it and look.

Does a point lie on the line?

A point lies on the line y=ax+by = ax + b exactly when its coordinates make the equation true. Substitute the xx-coordinate into ax+bax + b: if the result equals the yy-coordinate, the point is on the line; if not, the point is not on the line.

Example 5: Testing points

Do the points A(2,4)A(2, 4), B(1,2)B(1, 2) and C(3,6)C(3, 6) lie on the line y=3x−2y = 3x - 2? Decide by substitution, then check by drawing the line for values of xx from 00 to 33.

Solution

A(2,4)A(2, 4): 3(2)−2=6−2=43(2) - 2 = 6 - 2 = 4, which equals the yy-coordinate, 44. So AA lies on the line.

B(1,2)B(1, 2): 3(1)−2=3−2=13(1) - 2 = 3 - 2 = 1, but the yy-coordinate is 22. So BB does not lie on the line.

C(3,6)C(3, 6): 3(3)−2=9−2=73(3) - 2 = 9 - 2 = 7, but the yy-coordinate is 66. So CC does not lie on the line.

For the graph, a table with x=0x = 0, 11 and 33 gives y=3(0)−2=−2y = 3(0) - 2 = -2, y=3(1)−2=1y = 3(1) - 2 = 1 and y=3(3)−2=7y = 3(3) - 2 = 7. Draw the line from (0,−2)(0, -2) to (3,7)(3, 7) and plot AA, BB and CC:

The line y = 3x − 2 from (0, −2) to (3, 7), with A(2, 4) on the line, B(1, 2) one unit above it and C(3, 6) one unit below itxy−11234−3−2−112345678Oy = 3x − 2ABC

The drawing agrees: AA is on the line, BB is 11 unit above it and CC is 11 unit below it.

A(2,4)A(2, 4) lies on the line y=3x−2y = 3x - 2; B(1,2)B(1, 2) and C(3,6)C(3, 6) do not.

Every point on the yy-axis has xx-coordinate 00, and every point on the xx-axis has yy-coordinate 00. This is how to find where a line crosses each axis.

Where a line crosses the axes

A line crosses the yy-axis where x=0x = 0. For y=ax+by = ax + b this gives y=a(0)+b=by = a(0) + b = b, so the line crosses the yy-axis at the point (0,b)(0, b).

A line crosses the xx-axis where y=0y = 0. Put y=0y = 0 in the equation and solve it for xx.

Example 6: Where y=2x−5y = 2x - 5 crosses the axes

For the line y=2x−5y = 2x - 5, find the coordinates of the point where it crosses
(a) the yy-axis,
(b) the xx-axis.
Then draw the line for values of xx from 00 to 44 to check.

Solution

(a) On the yy-axis, x=0x = 0: y=2(0)−5=0−5=−5y = 2(0) - 5 = 0 - 5 = -5. The line crosses the yy-axis at (0,−5)(0, -5).

(b) On the xx-axis, y=0y = 0:

2x−5=02x - 5 = 0

2x=52x = 5

x=2.5x = 2.5

The line crosses the xx-axis at (2.5,0)(2.5, 0).

A third point: when x=4x = 4, y=2(4)−5=8−5=3y = 2(4) - 5 = 8 - 5 = 3. Draw the line from (0,−5)(0, -5) to (4,3)(4, 3); it passes through P(0,−5)P(0, -5) on the yy-axis and Q(2.5,0)Q(2.5, 0) on the xx-axis, halfway between 22 and 33.

The line y = 2x − 5 from (0, −5) to (4, 3), crossing the y-axis at P(0, −5) and the x-axis at Q(2.5, 0)xy−112345−6−5−4−3−2−11234Oy = 2x − 5PQ

(a) The line crosses the yy-axis at (0,−5)(0, -5). \quad (b) It crosses the xx-axis at (2.5,0)(2.5, 0).

Horizontal and Vertical Lines

When a=0a = 0, the function y=ax+by = ax + b becomes y=by = b: the value of yy is the same whatever xx is. For y=3y = 3 the table of values is:

xx−2-20022
yy333333

The points (−2,3)(-2, 3), (0,3)(0, 3) and (2,3)(2, 3) all have yy-coordinate 33, so they lie on a horizontal line, 33 units above the xx-axis.

In the same way, points with the same xx-coordinate lie on a vertical line. The vertical line x=2x = 2 is the set of every point whose xx-coordinate is 22, such as (2,−1)(2, -1), (2,0)(2, 0) and (2,3)(2, 3). It is not the graph of a function y=ax+by = ax + b: a function gives one value of yy for each xx, but the line x=2x = 2 has every value of yy at x=2x = 2, and no point at all at any other xx.

Horizontal and vertical lines

The graph of y=by = b is a horizontal line through (0,b)(0, b). It is the linear function y=ax+by = ax + b with a=0a = 0.

The line x=kx = k is a vertical line through (k,0)(k, 0). It is not the graph of a linear function y=ax+by = ax + b.

The xx-axis is the line y=0y = 0, and the yy-axis is the line x=0x = 0.

A horizontal line y=by = b, where bb is not 00, never crosses the xx-axis.

Example 7: Drawing y=3y = 3, y=−1y = -1 and x=3x = 3

On the same axes, draw the lines y=3y = 3, y=−1y = -1 and x=3x = 3. Write down the coordinates of the points where the line x=3x = 3 meets each of the other two lines.

Solution

y=3y = 3: every point has yy-coordinate 33, for example (−3,3)(-3, 3), (0,3)(0, 3) and (4,3)(4, 3). Draw the horizontal line through them.

y=−1y = -1: the horizontal line through (−3,−1)(-3, -1), (0,−1)(0, -1) and (4,−1)(4, -1).

x=3x = 3: every point has xx-coordinate 33, for example (3,−2)(3, -2), (3,0)(3, 0) and (3,4)(3, 4). Draw the vertical line through them.

The horizontal lines y = 3 and y = −1 and the vertical line x = 3, which meets them at (3, 3) and (3, −1)xy−4−3−2−112345−3−2−112345Oy = 3y = −1x = 3(3, 3)(3, −1)

Where x=3x = 3 meets y=3y = 3, the point has xx-coordinate 33 and yy-coordinate 33: it is (3,3)(3, 3). In the same way, x=3x = 3 meets y=−1y = -1 at (3,−1)(3, -1). The lines y=3y = 3 and y=−1y = -1 are both horizontal and never meet.

The line x=3x = 3 meets y=3y = 3 at (3,3)(3, 3) and meets y=−1y = -1 at (3,−1)(3, -1).

Two Lines on the Same Axes

Drawing two lines on the same axes lets you compare them and find where they meet. The point where two lines meet lies on both of them, so its coordinates make both equations true.

Example 8: Two lines that never meet

On the same axes, draw the graphs of y=x+2y = x + 2 and y=x−1y = x - 1 for values of xx from −2-2 to 33. Describe how the two lines are related.

Solution

Tables of values, with x=−2x = -2, 00 and 33:

xx−2-20033
y=x+2y = x + 2002255
y=x−1y = x - 1−3-3−1-122
The lines y = x + 2, from (−2, 0) to (3, 5), and y = x − 1, from (−2, −3) to (3, 2), drawn on the same axesxy−3−2−11234−4−3−2−1123456Oy = x + 2y = x − 1

For every value of xx, the value of x+2x + 2 is 33 more than the value of x−1x - 1. So the line y=x+2y = x + 2 is always 33 units above the line y=x−1y = x - 1.

Because y=x+2y = x + 2 is always 33 units above y=x−1y = x - 1, the two lines never meet. Each crosses the yy-axis at its value of bb: (0,2)(0, 2) and (0,−1)(0, -1).

The lines never meet: y=x+2y = x + 2 is always 33 units above y=x−1y = x - 1. They cross the yy-axis at (0,2)(0, 2) and (0,−1)(0, -1).

Example 9: One line up, one line down

On the same axes, draw the graphs of y=2x−1y = 2x - 1 and y=5−xy = 5 - x for values of xx from 00 to 44. Say which way each line goes, and find the point where the two lines meet.

Solution

xx002244
y=2x−1y = 2x - 1−1-13377
y=5−xy = 5 - x553311

For example, x=4x = 4 gives y=2(4)−1=7y = 2(4) - 1 = 7 and y=5−4=1y = 5 - 4 = 1.

The line y = 2x − 1 from (0, −1) to (4, 7) and the line y = 5 − x from (0, 5) to (4, 1), meeting at (2, 3)xy−112345−2−112345678Oy = 2x − 1y = 5 − x(2, 3)

In y=2x−1y = 2x - 1, a=2a = 2 is positive: as xx increases, yy increases, so the line goes up from left to right.

The function y=5−xy = 5 - x is y=−x+5y = -x + 5, so a=−1a = -1 is negative: as xx increases, yy decreases, so the line goes down from left to right.

The lines meet at (2,3)(2, 3). Check in both equations: 2(2)−1=32(2) - 1 = 3 ✓\checkmark and 5−2=35 - 2 = 3 ✓\checkmark.

y=2x−1y = 2x - 1 goes up from left to right and y=5−xy = 5 - x goes down; the lines meet at (2,3)(2, 3).

What a and b tell you about the line

In y=ax+by = ax + b: when aa is positive, the line goes up from left to right; when aa is negative, it goes down from left to right; when a=0a = 0, it is horizontal.

The line crosses the yy-axis at (0,b)(0, b).

Example 10: Matching equations to lines

The lines AA, BB and CC below are the graphs of y=x+2y = x + 2, y=2x+2y = 2x + 2 and y=2−xy = 2 - x, in some order. Match each line to its equation.

Three lines A, B and C, drawn for x from 0 to 3, all starting at (0, 2) on the y-axisxy−11234−2−1123456789OABC

Solution

All three equations have b=2b = 2, so all three lines cross the yy-axis at (0,2)(0, 2). That point cannot tell them apart, so test another one. Take x=2x = 2:

y=x+2y = x + 2: y=2+2=4y = 2 + 2 = 4, so this line passes through (2,4)(2, 4).

y=2x+2y = 2x + 2: y=2(2)+2=6y = 2(2) + 2 = 6, so this line passes through (2,6)(2, 6).

y=2−xy = 2 - x: y=2−2=0y = 2 - 2 = 0, so this line passes through (2,0)(2, 0).

On the graph, at x=2x = 2, line CC is at y=4y = 4, line BB is at y=6y = 6 and line AA is at y=0y = 0.

Check with x=3x = 3: y=x+2y = x + 2 gives 55, and CC passes through (3,5)(3, 5) ✓\checkmark; y=2x+2y = 2x + 2 gives 88, and BB passes through (3,8)(3, 8) ✓\checkmark; y=2−xy = 2 - x gives −1-1, and AA passes through (3,−1)(3, -1) ✓\checkmark.

This agrees with the rule above: AA is the only line going down, and y=2−xy = 2 - x is the only equation with a negative aa. Line BB is steeper than line CC.

Line AA is y=2−xy = 2 - x, line BB is y=2x+2y = 2x + 2 and line CC is y=x+2y = x + 2.

Linear Graphs in Real Life

Many quantities in daily life are linked by a linear function: a fixed amount, plus the same amount for each unit. The graph is then a straight line, and it can be read instead of calculating each time. In such a graph:

• each axis is named with its quantity and its unit, such as "Distance (km)" and "Fare ($)";

• the two axes usually have different scales, so say what one square stands for on each;

• only the first quadrant is used when the quantities cannot be negative, and the line is drawn only over the values the question gives;

• the points are joined by a line when every value in between makes sense (a time, a distance, an amount of money or of water). When only whole numbers make sense, such as a number of tickets or of people, the points are plotted and not joined.

Example 11: A currency conversion graph

Mei Ling is going to Malaysia. The exchange rate is S$1 = RM3.50 (Singapore dollars to Malaysian ringgit).
(a) Draw a graph to convert amounts from S$0 to S$50 into ringgit.
(b) Use the graph to convert S$30 into ringgit.
(c) Use the graph to convert RM140 into Singapore dollars.

Solution

(a) Each Singapore dollar is worth RM3.50, so SS Singapore dollars are worth RR ringgit, where R=3.5SR = 3.5S. This is a linear function with a=3.5a = 3.5 and b=0b = 0.

S=0S = 0: R=3.5×0=0R = 3.5 \times 0 = 0;   \; S=20S = 20: R=3.5×20=70R = 3.5 \times 20 = 70;   \; S=50S = 50: R=3.5×50=175R = 3.5 \times 50 = 175

Singapore dollars, SS0020205050
Ringgit, RR007070175175

Scales: across, one square stands for S$5; up, one square stands for RM10. Any amount of money in between makes sense, so the points are joined by a straight line from (0,0)(0, 0) to (50,175)(50, 175).

Conversion graph from Singapore dollars (0 to 50, 5 to a square) to ringgit (0 to 180, 10 to a square): a straight line from (0, 0) to (50, 175), with guide lines from S$30 to RM105 and from RM140 to S$40Singapore dollars (S$)Malaysian ringgit (RM)102030405020406080100120140160180O

(b) From S$30 on the horizontal axis, go up to the line, then across. The reading is halfway between RM100 and RM110, that is, RM105. Check: 3.5×30=1053.5 \times 30 = 105.

(c) From RM140 on the vertical axis, go across to the line, then down. The reading is S$40. Check: 140÷3.5=40140 \div 3.5 = 40.

(b) S$30 is worth RM105. \quad (c) RM140 is worth S$40.

Example 12: A taxi fare

A taxi charges a flag-down fare of $4, and then $0.60 for each kilometre, worked out on the exact distance. The fare for a trip of dd km is CC dollars, where C=0.6d+4C = 0.6d + 4.
(a) Draw the graph of the fare against the distance for trips of up to 20 km.
(b) Use the graph to find the fare for a trip of 15 km.
(c) Ali paid a fare of $7. How far did he travel?

Solution

(a) d=0d = 0: C=0.6(0)+4=4C = 0.6(0) + 4 = 4;   \; d=10d = 10: C=0.6(10)+4=10C = 0.6(10) + 4 = 10;   \; d=20d = 20: C=0.6(20)+4=16C = 0.6(20) + 4 = 16

Distance, dd km0010102020
Fare, CC dollars4410101616

Scales: across, one square stands for 2 km; up, one square stands for $1. Any distance in between makes sense, so the points are joined by a straight line from (0,4)(0, 4) to (20,16)(20, 16).

Graph of a taxi fare against distance: a straight line from (0, 4) to (20, 16), with guide lines from 15 km to $13 and from $7 to 5 kmDistance (km)Fare ($)246810121416182022123456789101112131415161718O

(b) From 15 km (halfway between 14 and 16), go up to the line, then across. The reading is $13. Check: 0.6(15)+4=9+4=130.6(15) + 4 = 9 + 4 = 13.

(c) From $7, go across to the line, then down. The reading is 5 km (halfway between 4 and 6). Check: 0.6d+4=70.6d + 4 = 7, so 0.6d=30.6d = 3 and d=30.6=5d = \frac{3}{0.6} = 5.

The line meets the fare axis at (0,4)(0, 4): before the taxi has moved at all, the fare is already the flag-down fare of $4.

(b) The fare for 15 km is $13. \quad (c) Ali travelled 5 km.

Example 13: A tank draining

A tank holds 60 litres of water. When its tap is opened, water drains out at 4 litres per minute. After tt minutes, the volume of water left is VV litres, where V=60−4tV = 60 - 4t.
(a) Draw the graph of VV against tt for the first 15 minutes.
(b) Use the graph to find the volume left after 2.5 minutes.
(c) After how many minutes are 30 litres left?
(d) Where does the line meet the time axis, and what does that point tell you?

Solution

(a) t=0t = 0: V=60−4(0)=60V = 60 - 4(0) = 60;   \; t=5t = 5: V=60−4(5)=40V = 60 - 4(5) = 40;   \; t=10t = 10: V=60−4(10)=20V = 60 - 4(10) = 20;   \; t=15t = 15: V=60−4(15)=0V = 60 - 4(15) = 0

Time, tt minutes005510101515
Volume, VV litres60604040202000

Scales: across, one square stands for 1 minute; up, one square stands for 5 litres. Time and volume take every value in between, so the points are joined. The line goes down from left to right, because the volume decreases as time goes on (a=−4a = -4 is negative).

Graph of the volume of water in a tank against time: a straight line from (0, 60) to (15, 0), with guide lines from 2.5 minutes to 50 litres and from 30 litres to 7.5 minutesTime (minutes)Volume (litres)12345678910111213141516102030405060O

(b) From 2.5 minutes, go up to the line, then across. The reading is 50 litres. Check: 60−4(2.5)=60−10=5060 - 4(2.5) = 60 - 10 = 50.

(c) From 30 litres, go across to the line, then down. The reading is 7.5 minutes. Check: 60−4t=3060 - 4t = 30. Add 4t4t to both sides: 60=30+4t60 = 30 + 4t. Subtract 3030: 30=4t30 = 4t, so t=7.5t = 7.5.

(d) The line meets the time axis at (15,0)(15, 0): after 15 minutes no water is left, so the tank is empty. (It meets the volume axis at (0,60)(0, 60): the 60 litres at the start.)

(b) 50 litres \quad (c) After 7.5 minutes \quad (d) At (15,0)(15, 0): the tank is empty after 15 minutes.

Common Mistakes

  • Joining the points with a curve or with zigzag pieces. The graph of y=ax+by = ax + b is one straight line, drawn with a ruler. If your points do not lie on one straight line, a value in your table is wrong.
  • Leaving out the brackets for a negative xx. For y=4−3xy = 4 - 3x at x=−2x = -2: y=4−3(−2)=4+6=10y = 4 - 3(-2) = 4 + 6 = 10. Working 4−6=−24 - 6 = -2 loses the minus sign of xx.
  • An uneven scale. Numbering equally spaced grid lines 00, 11, 22, 55, 1010 makes the graph wrong. Every square along one axis must stand for the same amount.
  • Starting on the wrong axis. To find yy for a given xx, start on the xx-axis; to find xx for a given yy, start on the yy-axis.
  • Writing coordinates the wrong way round. The line y=2x−5y = 2x - 5 crosses the xx-axis at (2.5,0)(2.5, 0), not at (0,2.5)(0, 2.5).
  • Mixing up x=2x = 2 and y=2y = 2. x=2x = 2 is the vertical line of points with xx-coordinate 22; y=2y = 2 is the horizontal line of points with yy-coordinate 22.
  • Drawing the line beyond the values asked for. For "values of xx from 00 to 44", the line starts at x=0x = 0 and stops at x=4x = 4.

Practice Questions

Draw each graph on graph paper or squared paper before you open its solution. The questions get harder as you go.

Question 1

Copy and complete the table of values for y=3x+2y = 3x + 2. Then draw the graph of y=3x+2y = 3x + 2 for values of xx from −2-2 to 22.

xx−2-2−1-1001122
yy?????
ShowHide solution

x=−2x = -2: y=3(−2)+2=−6+2=−4y = 3(-2) + 2 = -6 + 2 = -4

x=−1x = -1: y=3(−1)+2=−3+2=−1y = 3(-1) + 2 = -3 + 2 = -1

x=0x = 0: y=3(0)+2=2y = 3(0) + 2 = 2

x=1x = 1: y=3(1)+2=5y = 3(1) + 2 = 5

x=2x = 2: y=3(2)+2=8y = 3(2) + 2 = 8

xx−2-2−1-1001122
yy−4-4−1-1225588

The yy-axis must reach from −4-4 to 88; one unit to each square on both axes. Plot the five points and draw the line from (−2,−4)(-2, -4) to (2,8)(2, 8).

The graph of y = 3x + 2 for x from −2 to 2: the points (−2, −4), (−1, −1), (0, 2), (1, 5) and (2, 8) joined by a straight linexy−3−2−1123−5−4−3−2−1123456789Oy = 3x + 2

The values of yy are −4-4, −1-1, 22, 55 and 88. The graph is the straight line from (−2,−4)(-2, -4) to (2,8)(2, 8).

Question 2

Copy and complete the table of values for y=−x+4y = -x + 4. Then draw the graph of y=−x+4y = -x + 4 for values of xx from 00 to 44.

xx0011223344
yy?????
ShowHide solution

x=0x = 0: y=−(0)+4=4y = -(0) + 4 = 4

x=1x = 1: y=−(1)+4=3y = -(1) + 4 = 3

x=2x = 2: y=−(2)+4=2y = -(2) + 4 = 2

x=3x = 3: y=−(3)+4=1y = -(3) + 4 = 1

x=4x = 4: y=−(4)+4=0y = -(4) + 4 = 0

xx0011223344
yy4433221100

Plot the points (0,4)(0, 4), (1,3)(1, 3), (2,2)(2, 2), (3,1)(3, 1) and (4,0)(4, 0). They lie on one straight line, which checks the table. Draw it from (0,4)(0, 4) to (4,0)(4, 0):

The graph of y = −x + 4 for x from 0 to 4: the points (0, 4), (1, 3), (2, 2), (3, 1) and (4, 0) joined by a straight linexy−112345−112345Oy = −x + 4

The values of yy are 44, 33, 22, 11 and 00. The graph is the straight line from (0,4)(0, 4) to (4,0)(4, 0), going down from left to right.

Question 3

Draw the graph of y=10x+20y = 10x + 20 for values of xx from 00 to 55. Choose a suitable scale for the yy-axis, and use a third point to check your line.

ShowHide solution

x=0x = 0: y=10(0)+20=20y = 10(0) + 20 = 20;   \; x=2x = 2: y=10(2)+20=40y = 10(2) + 20 = 40;   \; x=5x = 5: y=10(5)+20=70y = 10(5) + 20 = 70

xx002255
yy202040407070

The values of yy go up to 7070, so one square on the yy-axis could stand for 1010 units (7070 is then 77 squares up); 55 units to a square also fits (1414 squares). One square on the xx-axis stands for 11 unit.

Draw the line through (0,20)(0, 20) and (5,70)(5, 70). The third point, (2,40)(2, 40), lies on it, so the line is right.

The graph of y = 10x + 20 for x from 0 to 5, with 10 units to a square up: a straight line from (0, 20) to (5, 70) through the check point (2, 40)xy1234561020304050607080Oy = 10x + 20

For example, with 1010 units to each square up the yy-axis, the graph is the straight line from (0,20)(0, 20) to (5,70)(5, 70), through the check point (2,40)(2, 40).

Question 4

The graph of y=2x−3y = 2x - 3 is drawn below for values of xx from 00 to 44. Use it to find
(a) the value of yy when x=2.5x = 2.5,
(b) the value of xx when y=4y = 4,
(c) the value of xx when y=−2y = -2.
Check each answer by calculation.

The graph of y = 2x − 3, a straight line from (0, −3) to (4, 5)xy−112345−4−3−2−1123456Oy = 2x − 3
ShowHide solution

(a) From 2.52.5 on the xx-axis, go up to the line, then across to the yy-axis: y=2y = 2. Check: 2(2.5)−3=5−3=22(2.5) - 3 = 5 - 3 = 2.

(b) From 44 on the yy-axis, go across to the line, then down to the xx-axis: x=3.5x = 3.5. Check: 2x−3=42x - 3 = 4, so 2x=72x = 7 and x=3.5x = 3.5.

(c) From −2-2 on the yy-axis, go across to the line, then up to the xx-axis: x=0.5x = 0.5. Check: 2x−3=−22x - 3 = -2, so 2x=12x = 1 and x=0.5x = 0.5.

The graph of y = 2x − 3 with dashed guide lines to the points (2.5, 2), (3.5, 4) and (0.5, −2)xy−112345−4−3−2−1123456Oy = 2x − 3

(a) y=2y = 2 \quad (b) x=3.5x = 3.5 \quad (c) x=0.5x = 0.5

Question 5

Without drawing, decide which of the points P(1,3)P(1, 3), Q(4,−3)Q(4, -3), R(3,0)R(3, 0) and S(2,−1)S(2, -1) lie on the line y=5−2xy = 5 - 2x. Then draw the line for values of xx from 00 to 44, plot the four points, and check your answers.

ShowHide solution

Substitute each xx-coordinate into 5−2x5 - 2x and compare the result with the yy-coordinate:

P(1,3)P(1, 3): 5−2(1)=5−2=35 - 2(1) = 5 - 2 = 3, which equals 33. PP lies on the line.

Q(4,−3)Q(4, -3): 5−2(4)=5−8=−35 - 2(4) = 5 - 8 = -3, which equals −3-3. QQ lies on the line.

R(3,0)R(3, 0): 5−2(3)=5−6=−15 - 2(3) = 5 - 6 = -1, not 00. RR does not lie on the line.

S(2,−1)S(2, -1): 5−2(2)=5−4=15 - 2(2) = 5 - 4 = 1, not −1-1. SS does not lie on the line.

To draw the line: x=0x = 0 gives y=5y = 5, x=1x = 1 gives y=3y = 3, and x=4x = 4 gives y=−3y = -3. Draw it from (0,5)(0, 5) to (4,−3)(4, -3):

The line y = 5 − 2x from (0, 5) to (4, −3), with P(1, 3) and Q(4, −3) on it, R(3, 0) one unit above it and S(2, −1) two units below itxy−112345−4−3−2−1123456Oy = 5 − 2xPQRS

The drawing agrees: PP and QQ are on the line; RR is 11 unit above it and SS is 22 units below it.

P(1,3)P(1, 3) and Q(4,−3)Q(4, -3) lie on the line y=5−2xy = 5 - 2x; R(3,0)R(3, 0) and S(2,−1)S(2, -1) do not.

Question 6

The line y=2x+8y = 2x + 8 crosses the yy-axis at AA and the xx-axis at BB.
(a) Find the coordinates of AA and of BB.
(b) The point C(k,14)C(k, 14) lies on the line. Find the value of kk.

ShowHide solution

(a) At AA, on the yy-axis, x=0x = 0: y=2(0)+8=8y = 2(0) + 8 = 8. So AA is (0,8)(0, 8).

At BB, on the xx-axis, y=0y = 0:

2x+8=02x + 8 = 0

2x=−82x = -8

x=−4x = -4

So BB is (−4,0)(-4, 0).

(b) CC lies on the line, so its coordinates make the equation true. Substitute x=kx = k and y=14y = 14:

2k+8=142k + 8 = 14

2k=62k = 6

k=3k = 3

Check: 2(3)+8=142(3) + 8 = 14 ✓\checkmark

(a) A(0,8)A(0, 8) and B(−4,0)B(-4, 0) \quad (b) k=3k = 3

Question 7

(a) Write down the coordinates of three points on the line y=−3y = -3.
(b) On the same axes, draw the lines y=−3y = -3 and x=1x = 1, and write down the coordinates of the point where they meet.
(c) One of y=4y = 4, x=4x = 4 and y=4xy = 4x is not the graph of a linear function y=ax+by = ax + b. Which one? Give a reason.

ShowHide solution

(a) Every point on y=−3y = -3 has yy-coordinate −3-3; the xx-coordinate can be anything. For example: (−2,−3)(-2, -3), (0,−3)(0, -3) and (4,−3)(4, -3).

(b) y=−3y = -3 is the horizontal line 33 units below the xx-axis; x=1x = 1 is the vertical line 11 unit to the right of the yy-axis.

The horizontal line y = −3 and the vertical line x = 1, meeting at (1, −3)xy−2−112345−5−4−3−2−1123Oy = −3x = 1(1, −3)

The meeting point has the xx-coordinate of x=1x = 1 and the yy-coordinate of y=−3y = -3: it is (1,−3)(1, -3).

(c) y=4y = 4 is y=0x+4y = 0x + 4 (a=0a = 0, b=4b = 4), and y=4xy = 4x is y=4x+0y = 4x + 0 (a=4a = 4, b=0b = 0): both are linear functions. x=4x = 4 is the vertical line of all the points with xx-coordinate 44. At x=4x = 4 it has every value of yy, so it is not a function of the form y=ax+by = ax + b.

(a) For example (−2,−3)(-2, -3), (0,−3)(0, -3) and (4,−3)(4, -3) \quad (b) (1,−3)(1, -3) \quad (c) x=4x = 4, a vertical line

Question 8

On the same axes, draw the graphs of y=x+1y = x + 1 and y=7−xy = 7 - x for values of xx from −1-1 to 44.
(a) Which line goes down from left to right? Explain how you can tell from its equation.
(b) Find the coordinates of the point where the lines meet, and check them in both equations.

ShowHide solution
xx−1-11144
y=x+1y = x + 1002255
y=7−xy = 7 - x886633

For example, x=−1x = -1 gives y=−1+1=0y = -1 + 1 = 0 and y=7−(−1)=7+1=8y = 7 - (-1) = 7 + 1 = 8.

The lines y = x + 1, from (−1, 0) to (4, 5), and y = 7 − x, from (−1, 8) to (4, 3), meeting at (3, 4)xy−2−112345−2−1123456789Oy = x + 1y = 7 − x

(a) y=7−xy = 7 - x goes down from left to right. Written as y=−x+7y = -x + 7, it has a=−1a = -1, which is negative: as xx increases, yy decreases.

(b) The lines meet at (3,4)(3, 4). Check: 3+1=43 + 1 = 4 ✓\checkmark and 7−3=47 - 3 = 4 ✓\checkmark.

(a) y=7−xy = 7 - x, because a=−1a = -1 is negative. \quad (b) The lines meet at (3,4)(3, 4).

Question 9

The lines PP, QQ and RR below are the graphs of y=2x+3y = 2x + 3, y=2x−1y = 2x - 1 and y=3−xy = 3 - x, in some order. By testing points, match each line to its equation.

Three lines P, Q and R drawn for x from 0 to 2, each starting on the y-axisxy−1123−2−112345678OPQR
ShowHide solution

Where each line meets the yy-axis (x=0x = 0): y=2x+3y = 2x + 3 and y=3−xy = 3 - x both give y=3y = 3, and y=2x−1y = 2x - 1 gives y=−1y = -1.

On the graph, only PP meets the yy-axis at (0,−1)(0, -1), so PP is y=2x−1y = 2x - 1. Lines QQ and RR both meet it at (0,3)(0, 3).

To tell QQ and RR apart, test x=2x = 2: y=2(2)+3=7y = 2(2) + 3 = 7, and y=3−2=1y = 3 - 2 = 1. Line RR passes through (2,7)(2, 7) and line QQ through (2,1)(2, 1).

So RR is y=2x+3y = 2x + 3 and QQ is y=3−xy = 3 - x. This agrees with the directions: QQ goes down, and y=3−xy = 3 - x has a=−1a = -1.

Check PP at x=2x = 2: y=2(2)−1=3y = 2(2) - 1 = 3, and PP passes through (2,3)(2, 3) ✓\checkmark.

PP is y=2x−1y = 2x - 1, QQ is y=3−xy = 3 - x and RR is y=2x+3y = 2x + 3.

Question 10 (Setting: Kayak Hire)

A shop at Pasir Ris hires out kayaks for a fixed charge of $10 plus $8 per hour, worked out on the exact time used. The charge for hh hours is CC dollars.
(a) Write down a formula for CC in terms of hh, and make a table of values for h=0h = 0, 22 and 55.
(b) Draw the graph of the charge against the time, for 0 to 5 hours.
(c) Use your graph to find the charge for 1.5 hours.
(d) Siti paid $38. For how long did she hire the kayak?

ShowHide solution

(a) The charge is $10 plus $8 for each of the hh hours: C=8h+10C = 8h + 10.

h=0h = 0: C=8(0)+10=10C = 8(0) + 10 = 10;   \; h=2h = 2: C=8(2)+10=26C = 8(2) + 10 = 26;   \; h=5h = 5: C=8(5)+10=50C = 8(5) + 10 = 50

Time, hh hours002255
Charge, CC dollars101026265050

(b) Scales: across, one square stands for half an hour; up, one square stands for $2. Any time in between makes sense, so the points are joined by a straight line from (0,10)(0, 10) to (5,50)(5, 50).

Graph of the charge for hiring a kayak against time: a straight line from (0, 10) to (5, 50), with guide lines from 1.5 hours to $22 and from $38 to 3.5 hoursTime (hours)Charge ($)1234561020304050O

(c) From 1.5 hours, go up to the line, then across: the reading is $22. Check: 8(1.5)+10=12+10=228(1.5) + 10 = 12 + 10 = 22.

(d) From $38, go across to the line, then down: the reading is 3.5 hours. Check: 8h+10=388h + 10 = 38, so 8h=288h = 28 and h=3.5h = 3.5.

(a) C=8h+10C = 8h + 10 \quad (c) $22 \quad (d) Siti hired the kayak for 3.5 hours.

Question 11 (Setting: A Trip to Bangkok)

Wei Ming's family is going to Bangkok. The exchange rate is S$1 = 25 Thai baht.
(a) Make a table converting S$0, S$20 and S$40 into baht.
(b) Draw a conversion graph for amounts from S$0 to S$40.
(c) Use your graph to convert S$12 into baht.
(d) Use your graph to convert 650 baht into Singapore dollars.

ShowHide solution

(a) Each Singapore dollar is worth 25 baht: SS Singapore dollars are worth 25S25S baht.

25×0=025 \times 0 = 0,   \; 25×20=50025 \times 20 = 500,   \; 25×40=100025 \times 40 = 1000

Singapore dollars0020204040
Thai baht0050050010001000

(b) Scales: across, one square stands for S$2; up, one square stands for 50 baht. Any amount in between makes sense, so the points are joined by a straight line from (0,0)(0, 0) to (40,1000)(40, 1000).

Conversion graph from Singapore dollars (0 to 44, 2 to a square) to Thai baht (0 to 1100, 50 to a square): a straight line from (0, 0) to (40, 1000), with guide lines from S$12 to 300 baht and from 650 baht to S$26Singapore dollars (S$)Thai baht102030402004006008001000O

(c) From S$12, go up to the line, then across: the reading is 300 baht. Check: 25×12=30025 \times 12 = 300.

(d) From 650 baht, go across to the line, then down: the reading is S$26. Check: 650÷25=26650 \div 25 = 26.

(c) S$12 is worth 300 baht. \quad (d) 650 baht is worth S$26.

Question 12 (Setting: The School Garden)

In the school garden, Tank A holds 100 litres of water and is drained at 5 litres per minute. At the same time, Tank B, which starts empty, is filled at 20 litres per minute. After tt minutes, Tank A holds (100−5t)(100 - 5t) litres and Tank B holds 20t20t litres.
(a) On the same axes, draw the graphs of the volume in each tank against time, for tt from 00 to 66.
(b) After how many minutes do the two tanks hold the same volume of water? What is that volume?
(c) Use your graphs to find how much more water Tank B holds than Tank A after 6 minutes.

ShowHide solution

(a) Tank A: t=0t = 0: 100−5(0)=100100 - 5(0) = 100;   \; t=2t = 2: 100−5(2)=90100 - 5(2) = 90;   \; t=6t = 6: 100−5(6)=70100 - 5(6) = 70.

Tank B: t=0t = 0: 20(0)=020(0) = 0;   \; t=2t = 2: 20(2)=4020(2) = 40;   \; t=6t = 6: 20(6)=12020(6) = 120.

Time, tt minutes002266
Tank A (litres)10010090907070
Tank B (litres)004040120120

Scales: across, one square stands for 1 minute; up, one square stands for 10 litres. Time and volume take every value in between, so each set of points is joined by a straight line.

Graphs of the volume of water against time for Tank A, from (0, 100) to (6, 70), and Tank B, from (0, 0) to (6, 120), meeting at (4, 80)Time (minutes)Volume (litres)123456720406080100120OTank ATank B

(b) The lines meet at (4,80)(4, 80). Check: Tank A holds 100−5(4)=80100 - 5(4) = 80 litres and Tank B holds 20(4)=8020(4) = 80 litres ✓\checkmark.

(c) At t=6t = 6, the graph of Tank B is at 120 litres and that of Tank A at 70 litres: 120−70=50120 - 70 = 50 litres.

(b) After 4 minutes, when each tank holds 80 litres. \quad (c) Tank B holds 50 litres more than Tank A.

Key Points

  • The graph of a linear function y=ax+by = ax + b is a straight line.
  • To draw it: make a table of values with at least three pairs (the third is a check), choose a scale, plot the points, draw the line with a ruler across the given values of xx only, and label it.
  • Along one axis every square stands for the same amount; the two axes may have different scales.
  • To read yy for a given xx, go from the xx-axis to the line, then across to the yy-axis. To read xx for a given yy, go from the yy-axis to the line, then to the xx-axis.
  • A point lies on the line exactly when its coordinates make the equation true.
  • A line crosses the yy-axis where x=0x = 0 (for y=ax+by = ax + b, at (0,b)(0, b)), and the xx-axis where y=0y = 0.
  • y=by = b is a horizontal line. x=kx = k is a vertical line, and it is not the graph of a function y=ax+by = ax + b.
  • When aa is positive the line goes up from left to right; when aa is negative it goes down.
  • Where two lines meet, the coordinates of the meeting point make both equations true.
  • In a real-life graph, name each axis with its quantity and unit, and join the points only when the values in between make sense.

‹ 10.3 Linear Functions 10.5 Gradient of a Linear Graph ›

All Secondary 1 (Grade 7) lessons

Home Campus has lessons, practice questions with worked solutions and worksheets for Primary 3 to Secondary 1. Register free to practise and keep track of progress.

This lesson follows the Singapore Secondary 1 syllabus and was checked question by question before it was published. Spotted a mistake? Tell us.