Graphs of Linear Equations in Two Variables
Draw the graph of from a table of values or from its intercepts, to a given scale and range; read values from it; tell whether a point lies on it; and draw it for a real setting.
Before you start
- In Secondary 1 you drew straight-line graphs, such as the graph of , from a table of values: work out for some values of , plot the points and join them with a ruler.
- In lesson 2.1 the solutions of , plotted as points, lay on one straight line.
Drawing the Graph from a Table of Values
The graph of ax + by = c
The graph of a linear equation is a straight line. Every point on the line is a solution of the equation, and every solution is a point on the line.
To draw it from a table of values:
(1) make the subject, ;
(2) choose at least three values of across the given range, if possible ones that give whole-number values of , and work out for each;
(3) plot the points, draw a straight line through them with a ruler across the given range, and label it with its equation.
Example 1: Drawing 3x + 2y = 6 from a table
Draw the graph of for values of from to .
Solution
Make the subject: , so .
An odd value of gives a half ( gives ), so choose the even values , , and , which include both ends of the range:
: . : . : . : .
Plot the four points. They lie on one straight line, which checks the table. Draw the line from to .
The graph is the straight line through and , passing through and .
Drawing the Graph from the Intercepts
The x-intercept and the y-intercept
The -intercept is the -coordinate of the point where the line crosses the -axis. Every point on the -axis has , so put and solve for .
The -intercept is the -coordinate of the point where the line crosses the -axis. Every point on the -axis has , so put and solve for .
Plot the two points, check with a third point, and draw the line.
Example 2: Drawing 2x + 3y = 12 from its intercepts
Find the -intercept and the -intercept of . Use them to draw its graph for from to , and check with a third point.
Solution
-intercept: put . , so and . The line crosses the -axis at .
-intercept: put . , so and . The line crosses the -axis at .
Third point: put . , so and , giving .
Ends of the range: gives , ; gives , .
The check point lies on the line through the two intercepts, so the line is right.
The -intercept is and the -intercept is ; the graph is the line through and .
The intercepts are quick to find, but they are not always good points to plot.
When two intercepts are not enough
The line passes through the origin (, as in ): both intercepts are , so they give the one point . You need other points from a table.
The intercepts are awkward fractions, as in : points with whole-number coordinates from a table are easier to plot accurately.
or , as in or : the line crosses only one axis (lesson 2.4).
Example 3: Fractional intercepts
(a) Find the intercepts of . (b) Find the intercepts of , then draw its graph for from to .
Solution
(a) : , so . : , so The intercepts are and .
(b) : , so . : , so .
The point is hard to plot exactly, so make a table instead. is a whole number when , or :
The line crosses the axes where the intercepts said: at on the -axis and between and on the -axis.
(a) -intercept , -intercept . (b) -intercept , -intercept ; the graph is the line through , and .
Example 4: A line through the origin
Draw the graph of for from to .
Solution
Putting gives , and putting gives . Both intercepts give the origin, one point only, so make a table.
Make the subject: , so . Even values of give whole numbers:
The graph is the straight line through the origin, and , drawn from to .
Drawing to a Given Scale, and Reading the Graph
Examination questions give the scale and the range. "2 cm to 1 unit on the -axis" means that each unit of is 2 cm long; on 2 mm graph paper that is 10 small squares. The two axes may have different scales, so always read the numbers on an axis, not the squares.
To read from the graph, draw a guide line from the given value on one axis to the line, then across (or down) to the other axis.
Example 5: Exam style
Using a scale of 2 cm to 1 unit on the -axis and 1 cm to 1 unit on the -axis, draw the graph of for . Use your graph to find (a) the value of when , (b) the value of when .
Solution
Make the subject: .
So the -axis runs from to and the -axis from to . In the drawing each square is 1 cm: one unit of is two squares, one unit of is one square.
(a) From (three squares to the right of ) go up to the line, then across to the -axis: . Check:
(b) From go across to the line, then down to the -axis: one square to the right of , so . Check:
(a) (b)
Does a point lie on the line?
A point lies on the line exactly when its coordinates make the equation true. Substitute them and see.
On a drawn graph, a point that is on the line sits on it; a point above or below the line is not a solution.
Example 6: Points on 2x + 3y = 12
Which of the points , and lie on the line ? Show them on the graph.
Solution
: On the line.
: Not , so not on the line.
: On the line.
On the graph, is just below the line: at the line has
and lie on the line; does not.
A Graph from a Real Setting
In a real setting the letters stand for amounts, and only some of their values make sense. Draw only the part of the line that makes sense, and say what each reading from it means.
Example 7: Mixing coffee beans
A coffee shop mixes kg of beans costing $ per kg with kg of beans costing $ per kg. The beans cost $ altogether. (a) Show that . (b) Draw the graph of for the values that make sense. (c) Use your graph to find the mass of the $ beans when kg of the $ beans is used. (d) Use your graph to find when .
Solution
(a) The $ beans cost $ and the $ beans cost $, so . Divide every term by : .
(b) A mass cannot be negative, so and . Intercepts: gives , so ; gives , so . Draw the line from to only.
Third point: gives , so and , giving , which lies on the line.
A mass need not be a whole number of kilograms, so every point of the line from to makes sense, and the line is drawn solid.
(c) From , halfway between and , go up to the line, then across to the -axis: . Check:
(d) From go across to the line, then down to the -axis: halfway between and , so . Check:
(a) , which is . (b) The line from to . (c) kg of the $ beans. (d) : kg of the $ beans.
Common Mistakes
- Mixing up the intercepts. Putting gives the -intercept; putting gives the -intercept.
- Using the intercepts for a line through the origin. In both intercepts give , one point only. Use a table.
- Losing a sign when making the subject. From : , and dividing both terms by gives , not .
- Counting squares instead of reading numbers. When the scales differ, one square may be half a unit on one axis and one unit on the other.
- Drawing beyond the range, or beyond the values that make sense in a real setting, or not labelling the line with its equation.
Practice Questions
Draw each graph on graph paper before you open its solution. The questions get harder as you go.
Question 1
Find the -intercept and the -intercept of (a) , (b) , (c) .
ShowHide solution
(a) : . : , .
(b) : , . : , .
(c) : , . : , .
(a) and (b) and (c) and (-intercept first)
Question 2
Use the intercepts to draw the graph of for from to . Check with a third point.
ShowHide solution
: , giving . : , , giving .
Third point: gives , , , giving .
Ends: gives , ; gives , .
The line through and ; the check point lies on it.
Question 3
Make the subject of , and draw its graph for from a table of values.
ShowHide solution
, so . Multiples of give whole numbers:
The line from to , through and .
Question 4
Explain why the intercepts alone cannot be used to draw the graph of . Then draw it for from to .
ShowHide solution
Putting gives and putting gives : both intercepts give the single point , and one point does not fix a line.
Make the subject: , . Multiples of give whole numbers: , ; , ; , .
The line passes through the origin, so both intercepts are the same point. The graph is the line through , and .
Question 5
Using a scale of 1 cm to 1 unit on the -axis and 1 cm to 2 units on the -axis, draw the graph of for . Use it to find (a) when , (b) when .
ShowHide solution
.
(a) Up from to the line and across: one square on the -axis is units, and the line is reached three quarters of a square above , so . Check:
(b) Across from (halfway between and ) to the line and up: . Check:
(a) (b)
Question 6
Which of the points , , and lie on the line ? (a) Find out by substituting. (b) Draw the line for and mark the four points. Does the graph agree?
ShowHide solution
(a) : . Yes.
: . No.
: . No.
: . Yes.
(b) Make the subject: . When , ; when , . Join and .
Yes: and are on the line. is below it (at the line has ), and is above it (at the line has ).
and lie on the line; and do not.
Question 7
Copy and complete the table of values for . Using a scale of 1 cm to 1 unit on both axes, draw the graph for . Use your graph to find (a) when , (b) when .
| ? | ? | ? |
ShowHide solution
, so : gives ; gives ; gives .
(a) Up from to the line, then across: halfway between and , so . Check:
(b) Across from , halfway between and , to the line, then down: . Check:
The missing values of are , and . (a) (b)
Question 8
A rectangle is cm long and cm wide, and its perimeter is cm. (a) Show that . (b) Draw the graph of for . (c) Use your graph to find the width when the length is cm. (d) Explain why the graph is not drawn for or more.
ShowHide solution
(a) The perimeter is so . Divide every term by : .
(b) : gives ; gives ; gives . Draw the line from to .
(c) Up from , halfway between and , to the line, then across: . Check:
(d) When , , and a rectangle cannot have a width of . When is more than , is negative, and a width cannot be negative.
(a) , which is . (c) cm (d) The width would be or negative.
Question 9
Mrs Tan spends exactly $ on kg of prawns at $ per kg and kg of fish at $ per kg. (a) Show that . (b) Using a scale of 2 cm to 1 kg on the -axis and 1 cm to 1 kg on the -axis, draw the graph for the values that make sense. (c) Use your graph to find how much fish she buys with kg of prawns. (d) Use your graph to find the mass of prawns she buys with kg of fish.
ShowHide solution
(a) The prawns cost $ and the fish $, so . Divide every term by : .
(b) Neither mass can be negative. Intercepts: gives , ; gives , . Third point: gives , . Draw the line from to ; a mass need not be a whole number, so the line is solid.
(c) From (two squares to the right of ) go up to the line, then across: halfway between and , so . Check:
(d) From , halfway between and , go across to the line, then down: six squares, which is kg, so . Check:
(a) , which is . (c) kg of fish (d) kg of prawns
Key Points
- The graph of is a straight line; its points are exactly the solutions of the equation.
- From a table: make the subject, choose values of that give whole numbers, plot at least three points.
- The -intercept: put . The -intercept: put .
- Two intercepts fix the line only when they are two different points; for a line through the origin, or awkward fractions, use a table. Always check with a third point.
- With a given scale, read the numbers on each axis, not the squares.
- To read the graph, go from the given value on one axis to the line, then across (or down) to the other axis.
- A point is on the line exactly when its coordinates make the equation true.
- In a real setting, draw only the part of the line that makes sense.