Back to the path
↗

Lines in a coordinate system: slope and equation

Level 5 · Ages 15–16

Quick recall· Let's wake up what you already know before we start.

Vector recall: A(1, 2) and B(4, 8). What is the y-coordinate of vector AB?

The whole lesson

Read it again any time, including while you work through the exercises.

A steep road, a gentle slope, a descent: how do you measure that with numbers? In a coordinate system, every non-vertical line has a slope that says exactly how much it rises when you move 1 to the right.

To compute it between two points A(xA, yA) and B(xB, yB) on the line: m = (yB - yA) / (xB - xA). In plain words: vertical change divided by horizontal change, the famous Δy/Δx. Mind the order: if you start with B on top, start with B at the bottom too! A positive slope means the line goes up (reading left to right), a negative one means it goes down, a zero slope means it is horizontal.

Every non-vertical line has an equation of the form y = mx + p. The number m is the slope, and p is the y-intercept: the height where the line crosses the vertical axis (when x = 0). With these two numbers, you know everything about the line!

To find the equation of a line through two points: first compute m with the slope formula, then substitute one point's coordinates for x and y to find p. And to check whether a point lies on the line, plug its x into the equation: if you get the right y back, the point is on it.

Last key: two lines are parallel if and only if they have the same slope. Same steepness, never a meeting!

The worked example, step by step

A line goes through A(1, 2) and B(3, 8). Find its equation y = mx + p.

  1. m = (8 - 2) / (3 - 1) = 6/2 = 3

    First I compute the slope: vertical change (8 - 2 = 6) divided by horizontal change (3 - 1 = 2). The line rises 3 for every step of 1 to the right.

  2. 2 = 3 × 1 + p

    I state that A(1, 2) is on the line: I substitute x = 1 and y = 2 into y = 3x + p.

  3. p = 2 - 3 = -1

    I solve: p = -1. The equation is y = 3x - 1. Check with B: 3 × 3 - 1 = 8, exactly B's y-coordinate!

Result: y = 3x - 1.