Home › School › Maths
Grades 8–9 · about 15 min · Free

Lines and linear equations

Straight lines are everywhere in maths and science — a phone plan's cost, a car's distance over time, a temperature converting between scales. Almost all of these are described by a linear equation, and once you know its two key numbers, the slope and the intercept, you can picture and predict the whole line. This lesson connects the equation to its graph.

The coordinate plane

We draw graphs on a coordinate plane: a horizontal x-axis and a vertical y-axis crossing at the origin (0, 0). Any point is named by two numbers, (x, y) — how far across, then how far up. The point (3, 2) is 3 right and 2 up.

A straight line is just all the points (x, y) that follow one rule. That rule, written as an equation linking x and y, is a linear equation.

Slope and intercept: y = mx + b

The most useful way to write a line is y = mx + b. Here m is the slope — how steep the line is, or how much y changes for each step in x. A bigger m is steeper; a positive m rises to the right, a negative m falls. And b is the y-intercept — where the line crosses the y-axis (the value of y when x = 0).

So the equation carries the whole picture: b tells you where to start on the y-axis, and m tells you which way and how steeply to head from there. The line below is y = 2x + 1: it starts at 1 on the y-axis and rises 2 for every 1 across.

y = 2x + 1
y = 2x + 1: it crosses the y-axis at 1 (the intercept) and rises 2 for each step right (the slope).

Reading and drawing a line

To draw a line from y = mx + b: first plot the intercept b on the y-axis, then use the slope to find another point — go across 1 and up by m — and join them. To read a line's equation from a graph, find where it crosses the y-axis (that's b) and how much it rises per step across (that's m).

You can also find y for any x by substituting into the equation. This is how a straight-line model predicts values you haven't measured yet.

Worked example
For the line y = 2x + 1, what is y when x = 3?
  1. Substitute x = 3 into y = 2x + 1.
  2. y = 2 × 3 + 1.
  3. y = 6 + 1.
Answer: y = 7, so the point (3, 7) is on the line.

Check yourself

Try these. Pick an answer to see whether it's right and why.

In the equation y = mx + b, what does m represent?
m is the slope — how much y changes for each step in x. b is the y-intercept.
Where does the line y = 2x + 1 cross the y-axis?
The y-intercept b is 1, so the line crosses the y-axis at y = 1 (when x = 0).
The point (x, y) = (3, 2) is located where?
A point (x, y) is x across then y up, so (3, 2) is 3 right and 2 up.
For y = 2x + 1, what is y when x = 3?
Substitute: y = 2 × 3 + 1 = 6 + 1 = 7.
A line with a bigger slope m is:
A larger slope means y changes more for each step in x, so the line is steeper.

In a nutshell

Finished? Mark this lesson done — it's saved in this browser.