Practice Maths

Graphing Linear Relationships

Key Ideas

Key Terms

linear relationship
Whose graph is a straight line.
gradient-intercept form
y = mx + b, where m is the gradient and b is the y-intercept.
gradient
M = (y2 − y1) ÷ (x2 − x1) measures the steepness and direction of the line.
y-intercept
B is where the line crosses the y-axis (x = 0).
x-intercept
Where the line crosses the x-axis (y = 0).
Gradient-intercept method
Plot the y-intercept, then apply rise/run to find a second point.
Intercepts method
Find both intercepts and draw the line through them.
Hot Tip To find the x-intercept, substitute y = 0 into the equation and solve for x. To find the y-intercept, substitute x = 0 and solve for y.

Worked Example

Question: Sketch the graph of y = 2x − 3 using the gradient-intercept method.

Step 1 — Identify m and b.
y = 2x − 3  ⇒  gradient m = 2, y-intercept b = −3.

Step 2 — Plot the y-intercept.
Mark the point (0, −3) on the y-axis.

Step 3 — Use the gradient to find a second point.
m = 2 = rise/run = 2/1. From (0, −3): move 1 right and 2 up ⇒ point (1, −1).
Repeat: from (1, −1) move 1 right and 2 up ⇒ point (2, 1).

Step 4 — Draw the line.
Draw a straight line through the plotted points and extend with arrows.

Check using intercepts: Set y = 0: 0 = 2x − 3 ⇒ x = 1.5. x-intercept is (1.5, 0). ✓

The Equation y = mx + b

Every straight line can be written in the form y = mx + b, where m is the gradient (steepness) and b is the y-intercept (where the line crosses the y-axis). For example, in y = 3x + 2, the gradient is 3 and the line crosses the y-axis at (0, 2). If the equation is written differently — like 2x + y = 5 — rearrange it to y = −2x + 5 to read off m and b directly.

Plotting a Line from Its Equation

To sketch a line from its equation, use a two-step method. First, plot the y-intercept: put the point (0, b) on the y-axis. Second, use the gradient to find a second point. The gradient m = rise/run tells you how many units to move up (rise) for every unit you move right (run). For y = 2x + 1: plot (0, 1), then move right 1 and up 2 to reach (1, 3). Draw a straight line through both points and extend it with arrows.

If the gradient is a fraction, like m = 3/4, move right 4 and up 3. If m is negative, like m = −2, move right 1 and down 2 — the line slopes downward from left to right.

Finding the x-Intercept

The x-intercept is where the line crosses the x-axis, which always has y = 0. To find it, substitute y = 0 into the equation and solve for x. For y = 2x − 6: set 0 = 2x − 6, so 2x = 6, giving x = 3. The x-intercept is (3, 0). This is especially useful if you want to sketch a line by plotting both intercepts instead of using the gradient method.

Special Cases: Horizontal and Vertical Lines

Two special types of lines break the usual pattern. A horizontal line has equation y = k, where k is a constant. For example, y = 4 is a flat line passing through every point with y-coordinate 4. Its gradient is 0. A vertical line has equation x = k. For example, x = −2 passes through every point with x-coordinate −2. Vertical lines have undefined gradient because run = 0, and you cannot divide by zero.

Key tip: When sketching, always plot at least two clear points and label them with their coordinates. Using the y-intercept and x-intercept is often the quickest approach. For horizontal lines (y = k) and vertical lines (x = k), just mark the constant value on the appropriate axis and draw through it.

Real-World Connections

Linear relationships appear constantly in everyday life. A phone plan that charges $20 per month plus $0.10 per text can be modelled as C = 0.10n + 20, where n is the number of texts. The gradient 0.10 represents the rate of change (cost per text), and the y-intercept 20 represents the fixed monthly fee. The x-intercept has no practical meaning here (you cannot send a negative number of texts), which is a good reminder to always think about the context when interpreting intercepts.

Mastery Practice

  1. State the gradient (m) and y-intercept (b) for each equation. Fluency

    1. y = 3x + 5
    2. y = −2x + 7
    3. y = 4x − 1
    4. y = −x + 6
    5. y = 5x
    6. y = −3x − 4
    7. y = ½x + 3
    8. y = −⅔x + 1
  2. Complete the table of values for each equation. Use x = −2, −1, 0, 1, 2. Fluency

    1. y = x + 4
    2. y = 2x − 1
    3. y = −x + 3
    4. y = 3x + 2
    5. y = −2x − 1
    6. y = ½x + 2
  3. Sketch each line on a clearly labelled set of axes, using the gradient-intercept method. Show at least three points. Understanding

    1. y = x + 2
    2. y = 2x − 4
    3. y = −x + 3
    4. y = −3x + 6
    5. y = ½x − 1
    6. y = 4
  4. For each equation, find the x-intercept and y-intercept, then sketch the line through both intercepts. Understanding

    1. y = 2x − 6
    2. y = −3x + 9
    3. 3x + 2y = 12
    4. 4x − y = 8
  5. Identify gradient and y-intercept, then answer each question. Understanding

    1. Which of the following lines are parallel to y = 3x + 1?
      (A) y = 3x − 5     (B) y = −3x + 1     (C) y = 3x + 7     (D) y = ⅓x + 1
    2. Write the equation of a line parallel to y = −2x + 4 that passes through the y-axis at 6.
    3. Explain how you can tell, just by looking at the equations, whether two lines are parallel.
    4. Are y = 4x − 3 and 2y = 8x + 10 parallel? Rearrange the second equation to y = mx + b form first.
  6. Match each equation to its correct description below. Understanding

    Equations:   (i) y = 2x + 1   (ii) y = −x + 4   (iii) y = ½x − 2   (iv) y = −3x − 1

    1. A line that crosses the y-axis at 1 and rises steeply left-to-right.
    2. A line that crosses the y-axis at 4 and slopes downward with gradient −1.
    3. A line that crosses the y-axis at −2 and rises gently with gradient ½.
    4. A line that crosses the y-axis at −1 and falls steeply with gradient −3.
  7. Real-world linear models. Problem Solving

    1. A plumber charges a $60 call-out fee plus $80 per hour.
      1. Write an equation for the total cost C (dollars) in terms of hours h.
      2. What is the gradient and what does it represent in this context?
      3. What is the C-intercept and what does it represent?
      4. Sketch the graph for h = 0 to h = 5.
      5. How many hours did the plumber work if the total bill was $380?
    2. A car hire company charges $45 per day plus a flat fee of $30.
      1. Write an equation for total cost C in terms of number of days d.
      2. How much does a 4-day hire cost?
      3. A customer is charged $255. How many days did they hire the car?
    3. The distance (km) a cyclist travels is given by d = 18t, where t is time in hours.
      1. What is the gradient and what does it represent?
      2. How far does the cyclist travel in 2.5 hours?
      3. How long does it take to travel 126 km?
  8. Find the equation of the line passing through each pair of points. Write your answer in gradient-intercept form (y = mx + b). Problem Solving

    1. (0, 3) and (2, 7)
    2. (1, 5) and (3, 11)
    3. (−1, 4) and (2, 1)
    4. (0, −2) and (4, 6)
    5. (2, −3) and (6, 5)
    6. (−2, 7) and (4, −5)
  9. Graphing linear relationships in context. Understanding

    Water Tank. A tank is being filled with water. After 0 minutes it contains 20 litres, and water is added at 15 litres per minute.
    1. Write an equation for the volume V (litres) in terms of time t (minutes).
    2. Complete a table of values for t = 0, 1, 2, 3, 4.
    3. What is the V-intercept, and what does it represent in this context?
    4. Sketch the graph of V versus t for t = 0 to t = 4. Label both axes and mark the V-intercept.
    5. After how many minutes will the tank contain 110 litres?
    6. Explain why the graph is a straight line rather than a curve.
  10. Comparing two linear models. Problem Solving

    Two Taxi Services. Speedy Cabs charges $3 per km plus a $5 flag-fall. Quick Ride charges $2 per km plus an $8 flag-fall.
    1. Write an equation for the cost C (dollars) of each service in terms of distance d (km).
    2. On the same set of axes, sketch both lines for d = 0 to d = 10.
    3. Find the distance at which both services cost the same (solve algebraically by setting the two equations equal).
    4. For distances less than your answer to (c), which service is cheaper? Explain how you can see this from the graph.
    5. A passenger travels 7 km. How much does each service charge? Which is cheaper by how much?