Algebra Foundations / Module 3, Equations / Lesson 3
Straight-Line Graphs and Equations
Learn to read gradient and intercepts, find the equation of a line from two points, and use parallel and perpendicular lines, with an interactive line grapher, worked examples, graded practice and full answers.
- Mathematics
- Secondary and high school, ages 13 to 15
- About 55 minutes
- Interactive line grapher, worked examples and practice
1Learning goal: what you will be able to do
A straight line is the picture of a steady rate of change. By the end of this lesson you will be able to read the gradient and intercept from an equation, find the equation of a line from two points, and explain what the numbers mean in a real situation.
Learning outcomes
- FoundationPlot a straight line from a table of values, and explain gradient as change in y over change in x.
- CoreRead the gradient and y-intercept from y = mx + c, and find the x-intercept by setting y = 0.
- CoreFind the equation of a line from two points, or from a point and a gradient, and rearrange equations such as 3x + 2y = 12.
- ExtensionRecognise parallel and perpendicular lines from their gradients, and interpret gradient and intercept in a word problem.
Where this lesson fits
This is the third lesson of Module 3 in Algebra Foundations. It joins equations to pictures: every skill from the first two lessons is used when you find intercepts or solve for a missing number.
- Module 3, Lesson 1: Solving linear equationsOpen
- Module 3, Lesson 2: Linear inequalitiesOpen
- Module 3, Lesson 3: Straight-line graphs and equationsThis lesson
- Module 4, Simultaneous equationsPlanned
Where this topic appears in courses
Straight-line graphs appear in UK Key Stage 3 and GCSE Mathematics, Cambridge IGCSE Mathematics, WAEC senior secondary mathematics, IB Middle Years and Diploma mathematics, and US Common Core standards 8.EE.B.5 to 8.EE.B.6 and HSA-CED.A.2. Some courses write the equation as y = mx + b instead of y = mx + c; the meaning is identical. This lesson supports, and does not replace, the specification you follow.
2A familiar example: a plumber’s bill
A plumber charges a $30 call-out fee the moment she arrives, then $20 for every hour of work. How much will a 3-hour job cost? And what about 5 hours?
Predict first: what do the 3-hour and 5-hour jobs cost?
Take the fixed fee, then add the hourly part.
$90 and $130. For 3 hours: $30 + 3 × $20 = $90. For 5 hours: $30 + 5 × $20 = $130. Every extra hour adds exactly $20, so two more hours add $40, which is the difference between $90 and $130.
Two numbers describe everything: the fixed starting amount, $30, and the steady rate of change, $20 per hour. Let x be the hours and y the cost. The rule is
y = 20x + 30
If you plot hours along the bottom and cost up the side, every job lies on one straight line. The rate, 20, is the gradient, and the fixed fee, 30, is where the line crosses the vertical axis, the intercept. Use the grapher below to see how these two numbers control every straight line.
Try it: the line grapher
Move the sliders for the gradient m and the y-intercept c. The red dot is the y-intercept and the green dot is the x-intercept. Tick the box to see the gradient triangle: one step right, then up or down by m. Try m = 20 scaled down to 2 and c = 3 to see the shape of the plumber’s bill.
3Clear explanation
Coordinates and equations
A point (x, y) lies on a line if its coordinates make the line’s equation true. For y = 2x + 1, the point (3, 7) is on the line because 2(3) + 1 = 7, but (3, 8) is not. The line is the set of all such points.
Plotting from a table of values
Choose several values of x, compute y for each, plot the points and join them with a ruler. Two points fix a straight line, but plot three so that any arithmetic slip shows up as a point out of line.
Gradient
The gradient measures how steep a line is: how much y changes for each 1 step in x.
gradient m = (change in y) / (change in x) = (y2 − y1) / (x2 − x1)
- A positive gradient rises from left to right. A negative gradient falls. Zero is flat.
- The larger the number, ignoring sign, the steeper the line.
- Be consistent: whichever point you take first on top, take it first on the bottom.
The equation y = mx + c
Every non-vertical straight line can be written y = mx + c, where m is the gradient and c is the y-intercept, the value of y where the line crosses the vertical axis (where x = 0). A vertical line has the equation x = a and an undefined gradient. A horizontal line is y = c with gradient 0.
Intercepts
The y-intercept is c. The x-intercept is where the line crosses the horizontal axis, where y = 0. Put y = 0 and solve for x. For y = 2x − 6, set 0 = 2x − 6, so x = 3.
Finding an equation
- From two points. Find the gradient. Then substitute one point into y = mx + c and solve for c.
- From a point and a gradient. Substitute the point and the gradient and solve for c.
- From another form. Rearrange. For 3x + 2y = 12, subtract 3x: 2y = −3x + 12, then divide by 2: y = −1.5x + 6.
Parallel and perpendicular lines
Parallel lines never meet, because they have the same gradient. Two lines are perpendicular (at a right angle) when the product of their gradients is −1, that is, one gradient is the negative reciprocal of the other. A line with gradient 2 is perpendicular to a line with gradient −1/2.
Meaning in real life
In y = 20x + 30, the gradient 20 is the rate (dollars per hour) and the intercept 30 is the starting value (the fee when x = 0). A negative gradient means a quantity is decreasing, like a draining tank.
\nReal experiments produce straight lines too. In the Hooke’s Law virtual lab, the extension of a spring plotted against the force is a straight line, and its gradient tells you how stretchy the spring is. In the Ohm’s Law virtual lab, voltage plotted against current is a straight line through the origin whose gradient is the resistance. Try both after this lesson and read the gradient yourself.
Common mistakes
| Mistake | Why it is wrong | Fix |
|---|---|---|
| Gradient as change in x over change in y | It measures rise over run, y over x | Write "rise over run" before you start |
| Subtracting the points in different orders | The sign of the gradient comes out wrong | Use the same point first on top and bottom |
| Reading c as the x-intercept | c is where x = 0, the y-intercept | Set y = 0 for the x-intercept |
| Not rearranging to y = mx + c first | In 3x + 2y = 12 the gradient is not 3 | Get y on its own with coefficient 1 |
| Calling lines with gradients 2 and −2 perpendicular | The product is −4, not −1 | Use the negative reciprocal: −1/2 |
4Worked examples
Read each example with a pencil in hand. Cover the steps, try the first line yourself, then compare. Each example ends with a check that a known point lies on your line.
Example 1 Foundation 3 marks: plotting from a table
Complete a table of values for y = 2x + 1 for x from −2 to 2, and say what the graph looks like.
- x = −2: y = 2(−2) + 1 = −3. x = −1: y = −1. x = 0: y = 1. x = 1: y = 3. x = 2: y = 5.
- Plot (−2, −3), (−1, −1), (0, 1), (1, 3), (2, 5) and join them with a ruler. They lie on one straight line rising from left to right.
- The y values go up by 2 each time x goes up by 1, which is the gradient.
- Check: is (3, 7) on the line? 2(3) + 1 = 7, so yes.
Answer: the points are as listed, forming a straight line with gradient 2 that crosses the y-axis at 1.
Example 2 Core 4 marks: the equation from two points
Find the equation of the line through (2, 3) and (6, 11).
- Gradient: m = (11 − 3)/(6 − 2) = 8/4 = 2.
- Write y = 2x + c and substitute (2, 3): 3 = 2(2) + c, so 3 = 4 + c and c = −1.
- The equation is y = 2x − 1.
- Check with the other point: 2(6) − 1 = 11, which matches.
Answer: y = 2x − 1.
Example 3 Core 4 marks: gradient and intercepts from an equation
For y = −1⁄2x + 4, state the gradient, the y-intercept and the x-intercept.
- Compare with y = mx + c: the gradient is −1/2 (the line falls half a unit for each step right) and the y-intercept is 4.
- For the x-intercept put y = 0: 0 = −0.5x + 4, so 0.5x = 4 and x = 8.
- Check: (8, 0) gives −0.5(8) + 4 = 0. Correct.
Answer: gradient −1/2, y-intercept 4 (the point (0, 4)), x-intercept 8 (the point (8, 0)).
Example 4 Core 4 marks: rearranging first
Find the gradient and both intercepts of 3x + 2y = 12.
- Make y the subject. Subtract 3x: 2y = −3x + 12. Divide by 2: y = −1.5x + 6.
- The gradient is −1.5 and the y-intercept is 6.
- x-intercept: put y = 0 in the original: 3x = 12, so x = 4.
- Check: (4, 0) gives 3(4) + 2(0) = 12. Correct.
Answer: gradient −1.5, y-intercept 6, x-intercept 4. Notice the gradient is not 3: you must rearrange before you read it.
Example 5 Core 3 marks: a parallel line
Find the equation of the line parallel to y = 3x − 2 that passes through (1, 6).
- Parallel lines have the same gradient, so m = 3.
- Substitute (1, 6) into y = 3x + c: 6 = 3 + c, so c = 3.
- The equation is y = 3x + 3.
- Check: 3(1) + 3 = 6. The line is parallel to the original and passes through (1, 6).
Answer: y = 3x + 3.
Example 6 Core 4 marks: a real situation
A tank holds 80 litres and drains at a steady 5 litres per minute, so the volume is V = 80 − 5t, where t is the time in minutes. Explain the gradient and intercept, and find when the tank is empty.
- Write it as V = −5t + 80. The gradient is −5: the volume falls by 5 litres every minute.
- The V-intercept is 80: the starting volume when t = 0.
- Empty means V = 0: 0 = 80 − 5t, so 5t = 80 and t = 16.
- Check: 80 − 5(16) = 0.
Answer: gradient −5 litres per minute, starting volume 80 litres, empty after 16 minutes.
Example 7 Extension 4 marks: a perpendicular line
Find the equation of the line perpendicular to y = 2x + 1 through the point (4, 3).
- The gradient of the given line is 2. A perpendicular gradient is the negative reciprocal: −1/2.
- Substitute (4, 3) into y = −0.5x + c: 3 = −2 + c, so c = 5.
- The equation is y = −0.5x + 5.
- Check: the gradients multiply to 2 × (−1/2) = −1, and 3 = −0.5(4) + 5.
Answer: y = −0.5x + 5.
5Learner practice
Work each question on paper first, then enter your answer. You get two tries on each question. Two questions generate new numbers every time.
What are the gradient and y-intercept of y = 3x − 5?
Find the gradient of the line through (1, 2) and (5, 10).
A line has gradient −2 and crosses the y-axis at 7. Find y when x = 3.
Which line is parallel to y = 2x + 1?
A line has gradient 4. What is the gradient of a line perpendicular to it?
A line with gradient 3 passes through (2, 5). Its equation is y = 3x + c. Find c.
A plumber’s bill is y = 20x + 30 dollars for a job of x hours. Find the cost of a 4.5-hour job.
6Answer explanations
Attempt every question before you open these. A right answer with a wrong method is luck, so read each explanation even when you were correct. Questions 3 and 6 show their own worked solution as soon as you answer.
Question 1: gradient and intercept of y = 3x − 5
Answer: gradient 3, y-intercept −5. In y = mx + c, m is the coefficient of x and c is the constant. The sign belongs to the number: the constant here is −5.
The x-intercept is different: setting y = 0 gives 3x = 5, so x = 5/3 (option c is therefore wrong).
Question 2: gradient through (1, 2) and (5, 10)
Change in y: 10 − 2 = 8. Change in x: 5 − 1 = 4. Gradient = 8/4 = 2.
A common slip is putting the change in x on top, giving 4/8 = 0.5. Remember: rise over run.
Question 3: generated gradient
Take the second point minus the first for both coordinates, in the same order, then divide the y change by the x change. A negative gradient means the line falls from left to right.
Question 4: y when x = 3
The equation is y = −2x + 7. With x = 3: y = −6 + 7 = 1.
Question 5: a parallel line
Answer: y = 2x − 7. Parallel lines have the same gradient (2) and different intercepts. The line with gradient −2 is a mirror image (a), gradient 1/2 is a different slope (b), and y = x + 2 has gradient 1 (d).
Question 6: generated x-intercept
Put y = 0 and solve the resulting equation, the skill from the first lesson in this module. Check your answer by substituting it back: the line must give y = 0.
Question 7: a perpendicular gradient
Answer: −1/4. The product of perpendicular gradients is −1. Since 4 × (−1/4) = −1, the negative reciprocal of 4 is −1/4. Option a (−4) is only the negative, and option c (1/4) is only the reciprocal.
Question 8: finding c
Substitute (2, 5): 5 = 3(2) + c, so 5 = 6 + c and c = −1. The line is y = 3x − 1. Check: 3(2) − 1 = 5.
Question 9: the plumber's 4.5-hour job
y = 20(4.5) + 30 = 90 + 30 = $120. The gradient 20 is the hourly rate and the intercept 30 is the call-out fee, so the fee is paid once and only the hours are multiplied.
7Short recap
- A straight line is the graph of a steady rate of change. Two points fix it.
- Gradient = change in y over change in x. Positive rises, negative falls, zero is flat.
- In y = mx + c, m is the gradient and c is the y-intercept.
- For the x-intercept, set y = 0 and solve.
- To find an equation, get the gradient, then substitute a point to find c.
- Rearrange to y = mx + c before reading the gradient from forms like 3x + 2y = 12.
- Parallel lines have equal gradients. Perpendicular gradients multiply to −1.
- In context, the gradient is the rate and the intercept is the starting value.
Tick what you can now do
If you ticked fewer than four, return to the matching worked example, redo it without looking, then try the generated questions again. The next planned lesson in this course, on simultaneous equations, finds where two lines cross.
Related lessons, entries and labs
- Solving Linear Equations: the skill used to find intercepts.
- Linear Inequalities: the same ideas, where the answer is a range.
- Algebra and Regression analysis: where fitted straight lines are used with real data.
- Hooke’s Law virtual lab, Ohm’s Law virtual lab and Newton’s Second Law virtual lab: experiments whose graphs are straight lines.
References and further reading
Titles and publishers only. Search each site for the title to reach the exact page.
- OpenStax, Algebra and Trigonometry 2e, the chapter on linear functions. Free and open textbook. https://openstax.org/
- Khan Academy, Algebra 1, unit on linear equations and graphs. https://www.khanacademy.org/
- National Governors Association Center for Best Practices and Council of Chief State School Officers, Common Core State Standards for Mathematics. https://www.thecorestandards.org/
- UK Department for Education, Mathematics programmes of study: key stage 3. https://www.gov.uk/