Mathematics · Simulation and virtual lab Free
Linear functions: gradient, intercepts and real-life lines
Move m and c, draw lines through two points, shade inequalities and find where two moto fares cost the same.
- You will learn to
- See how m and c change the graph of y = mx + c.
- Find the gradient and equation of a line through two points, and its intercepts.
- Shade linear inequalities and use two lines to compare real-life tariffs.
- You will measure
- Gradient, intercepts and equation of each line; the distance where two fares are equal.
- Time needed
- About 25–35 min
- Equipment
- Nothing extra. Real version: graph paper, ruler, pencil.
- Price
- Free: no payment, no account.
Virtual lab
Follow the steps with the simulation above (go back to the simulation ↑). Each time you tap Record, a row is added to the table and a point to the graph.
Aim
To investigate how the gradient m and the intercept c change the graph of y = mx + c, to find the equation of a line through two points, to represent linear inequalities, and to use linear graphs to compare two real-life tariffs.
What to do
- Choose Explore y = mx + c. Change only c: what happens to the line? Then change only m. Record three lines.
- Set m to a negative number, then to 0. Describe each line. Read the x-intercept and check it by solving mx + c = 0.
- Tap New challenge and set m and c so that the line passes through both purple points. Record each solved challenge.
- Choose Line through two points. Tap two points and calculate m = (y₂ − y₁) ÷ (x₂ − x₁) yourself before reading it. Try two points on a vertical line.
- Back in Explore, shade y > mx + c. Is a point on the line included? Why is the line dashed?
- Choose Compare two moto fares. Change moto B and find the distance where both cost the same. Record it.
Results
Questions
What is the gradient and the y-intercept of y = 3x − 5?
Gradient m = 3; y-intercept c = −5 (the line crosses the y-axis at (0, −5)).
Find the gradient of the line through (1, 2) and (4, 11).
m = (11 − 2) ÷ (4 − 1) = 9 ÷ 3 = 3.
Find the equation of the line through (2, 1) with gradient −2.
y = −2x + c; 1 = −4 + c, so c = 5: y = −2x + 5.
What do lines with the same gradient have in common?
They are parallel: they rise by the same amount for each step to the right, so they never meet.
Why is the boundary drawn dashed for y > 2x + 1 but solid for y ≤ 2x + 1?
For a strict inequality (>) the points on the line are not included, so the line is dashed; for ≤ they are included, so the line is solid.
Moto A costs 300 + 250x and moto B 600 + 150x RWF for x km. When do they cost the same?
300 + 250x = 600 + 150x, so 100x = 300 and x = 3 km (both cost 1 050 RWF). For longer trips B is cheaper.
For teachers: expected results and how the model works
Explore: m from −5 to 5 in steps of 0.5, c from −10 to 10. The orange triangle shows run and rise from the y-intercept (or from point A), so learners see m = rise ÷ run. Challenges always use a gradient of ±0.5, ±1, ±2 or ±3, an integer c and two points inside the grid, so they can be solved exactly with the sliders. Two points: a vertical line gives an undefined gradient and the equation x = k. Shading: y > mx + c is drawn with a dashed boundary, y ≤ mx + c with a solid one. Fares (examples, not real prices): moto A = 300 + 250x RWF; moto B starts at 600 + 150x RWF and the two cost the same at 3 km (1 050 RWF); the crossing point is the solution of the simultaneous equations.
Exam practice Exam set
National-exam style questions on this simulation (18 marks). Try each one on paper first, then open the marking scheme.
A line passes through (−2, 7) and (3, −3). (a) Find its gradient. (b) Find its equation. (c) Find where it crosses the x-axis. (6 marks)
Marking scheme: (a) m = (−3 − 7) ÷ (3 − (−2)) = −10 ÷ 5 = −2 (2). (b) 7 = −2(−2) + c, c = 3: y = −2x + 3 (2). (c) 0 = −2x + 3, x = 1.5: (1.5, 0) (2).
Show that the lines y = 2x + 1 and 4x − 2y = 6 are parallel. (3 marks)
Marking scheme: Second line: 2y = 4x − 6, y = 2x − 3 (1); both gradients are 2 (1); equal gradients and different intercepts, so the lines are parallel (1).
Water flows into a tank at a steady rate. After 2 minutes it holds 50 litres and after 6 minutes 130 litres. (a) Find the rate of flow. (b) How much water was in the tank at the start? (c) Write V in terms of t. (5 marks)
Marking scheme: (a) Rate = (130 − 50) ÷ (6 − 2) = 20 litres per minute (2). (b) 50 − 2 × 20 = 10 litres (2). (c) V = 20t + 10 (1).
On a graph, shade the region where y ≥ x − 2 and y < 4. List two points with integer coordinates in the region. (4 marks)
Marking scheme: Solid line y = x − 2 with the region above shaded (1); dashed line y = 4 with the region below (1); the overlap identified (1); two correct points, e.g. (0, 0) and (2, 1) (1).

Donat Sciences and MathsMathematics · Virtual lab worksheet
School: ........................................ Name: ................................ Class: ........ Date: ............
Linear functions: gradient, intercepts and real-life lines
Aim: To investigate how the gradient m and the intercept c change the graph of y = mx + c, to find the equation of a line through two points, to represent linear inequalities, and to use linear graphs to compare two real-life tariffs.
Apparatus (real laboratory): graph paper, ruler, pencil.
What to do (with the simulation on www.donatstem.co.rw)
- Choose Explore y = mx + c. Change only c: what happens to the line? Then change only m. Record three lines.
- Set m to a negative number, then to 0. Describe each line. Read the x-intercept and check it by solving mx + c = 0.
- Tap New challenge and set m and c so that the line passes through both purple points. Record each solved challenge.
- Choose Line through two points. Tap two points and calculate m = (y₂ − y₁) ÷ (x₂ − x₁) yourself before reading it. Try two points on a vertical line.
- Back in Explore, shade y > mx + c. Is a point on the line included? Why is the line dashed?
- Choose Compare two moto fares. Change moto B and find the distance where both cost the same. Record it.
Results
| # | Line | Gradient m | y-intercept c | x-intercept | Equation |
|---|
| 1 | | | | | |
| 2 | | | | | |
| 3 | | | | | |
| 4 | | | | | |
| 5 | | | | | |
| 6 | | | | | |
| 7 | | | | | |
| 8 | | | | | |
Graph
Draw each recorded line on the grid. Mark its gradient triangle and both intercepts.
Questions
- What is the gradient and the y-intercept of y = 3x − 5? [2]
- Find the gradient of the line through (1, 2) and (4, 11). [2]
- Find the equation of the line through (2, 1) with gradient −2. [2]
- What do lines with the same gradient have in common? [2]
- Why is the boundary drawn dashed for y > 2x + 1 but solid for y ≤ 2x + 1? [2]
- Moto A costs 300 + 250x and moto B 600 + 150x RWF for x km. When do they cost the same? [2]
- A line passes through (−2, 7) and (3, −3). (a) Find its gradient. (b) Find its equation. (c) Find where it crosses the x-axis. [6]
- Show that the lines y = 2x + 1 and 4x − 2y = 6 are parallel. [3]
- Water flows into a tank at a steady rate. After 2 minutes it holds 50 litres and after 6 minutes 130 litres. (a) Find the rate of flow. (b) How much water was in the tank at the start? (c) Write V in terms of t. [5]
- On a graph, shade the region where y ≥ x − 2 and y < 4. List two points with integer coordinates in the region. [4]

Donat Sciences and MathsMathematics · Virtual lab worksheet
School: ........................................ Name: ................................ Class: ........ Date: ............
Marking scheme: Linear functions: gradient, intercepts and real-life lines
Expected results
Explore: m from −5 to 5 in steps of 0.5, c from −10 to 10. The orange triangle shows run and rise from the y-intercept (or from point A), so learners see m = rise ÷ run. Challenges always use a gradient of ±0.5, ±1, ±2 or ±3, an integer c and two points inside the grid, so they can be solved exactly with the sliders. Two points: a vertical line gives an undefined gradient and the equation x = k. Shading: y > mx + c is drawn with a dashed boundary, y ≤ mx + c with a solid one. Fares (examples, not real prices): moto A = 300 + 250x RWF; moto B starts at 600 + 150x RWF and the two cost the same at 3 km (1 050 RWF); the crossing point is the solution of the simultaneous equations.
Answers
- What is the gradient and the y-intercept of y = 3x − 5? [2]
Gradient m = 3; y-intercept c = −5 (the line crosses the y-axis at (0, −5)).
- Find the gradient of the line through (1, 2) and (4, 11). [2]
m = (11 − 2) ÷ (4 − 1) = 9 ÷ 3 = 3.
- Find the equation of the line through (2, 1) with gradient −2. [2]
y = −2x + c; 1 = −4 + c, so c = 5: y = −2x + 5.
- What do lines with the same gradient have in common? [2]
They are parallel: they rise by the same amount for each step to the right, so they never meet.
- Why is the boundary drawn dashed for y > 2x + 1 but solid for y ≤ 2x + 1? [2]
For a strict inequality (>) the points on the line are not included, so the line is dashed; for ≤ they are included, so the line is solid.
- Moto A costs 300 + 250x and moto B 600 + 150x RWF for x km. When do they cost the same? [2]
300 + 250x = 600 + 150x, so 100x = 300 and x = 3 km (both cost 1 050 RWF). For longer trips B is cheaper.
- A line passes through (−2, 7) and (3, −3). (a) Find its gradient. (b) Find its equation. (c) Find where it crosses the x-axis. [6]
(a) m = (−3 − 7) ÷ (3 − (−2)) = −10 ÷ 5 = −2 (2). (b) 7 = −2(−2) + c, c = 3: y = −2x + 3 (2). (c) 0 = −2x + 3, x = 1.5: (1.5, 0) (2).
- Show that the lines y = 2x + 1 and 4x − 2y = 6 are parallel. [3]
Second line: 2y = 4x − 6, y = 2x − 3 (1); both gradients are 2 (1); equal gradients and different intercepts, so the lines are parallel (1).
- Water flows into a tank at a steady rate. After 2 minutes it holds 50 litres and after 6 minutes 130 litres. (a) Find the rate of flow. (b) How much water was in the tank at the start? (c) Write V in terms of t. [5]
(a) Rate = (130 − 50) ÷ (6 − 2) = 20 litres per minute (2). (b) 50 − 2 × 20 = 10 litres (2). (c) V = 20t + 10 (1).
- On a graph, shade the region where y ≥ x − 2 and y < 4. List two points with integer coordinates in the region. [4]
Solid line y = x − 2 with the region above shaded (1); dashed line y = 4 with the region below (1); the overlap identified (1); two correct points, e.g. (0, 0) and (2, 1) (1).