Resources For Teachers For Tutors For Students & Parents Pricing
Year 11 General Linear Equations And Their Graphs

Finding The Equation Of A Straight-Line Graph Using Two Points On The Graph

20 practice questions 2 video lessons Theory + worked examples

Theory

When you are given two points on a line, find the equation by first computing the slope with m=y2y1x2x1, then substituting the slope and either point into the point-slope form yy1=m(xx1). Includes parallel lines, horizontal and vertical cases, and real-world rate problems.

When the question gives you two points on a line, you don't yet know the slope or the y-intercept. The two-point method computes the slope first, then uses the point-slope form to write the equation.

The gradient formula gives the slope between any two points (x1,y1) and (x2,y2):

m=y2y1x2x1

It doesn't matter which of the two points you label (x1,y1) — the answer is the same. Pick whichever has simpler numbers. Parallel lines share the same slope, so to find a line parallel to a given one through a new point, reuse the given slope.

The first diagram shows a line passing through two named points, with the rise and run between them highlighted. The slope is rise over run =21=2. The second diagram shows two parallel lines — same slope m=3, different y-intercepts.

Line through two points with rise and run A line through the two points (1, 3) and (2, 5), showing the slope as rise over run. x y -2 -1 1 2 3 4 -1 1 2 3 4 5 6 (1, 3) (2, 5) run = 1 rise = 2
Slope between (1,3) and (2,5): m=5321=2.
Parallel lines have the same slope Two parallel lines with slope 3 but different y-intercepts. x y -3 -2 -1 1 2 3 -4 -3 -2 -1 1 2 3 4 y = 3x + 2 y = 3x - 2
Parallel lines have the same slope. The y-intercepts differ.

Two formulas — find the slope first, then write the equation.

m=y2y1x2x1(gradient formula)
m=y2y1x2x1
yy1=m(xx1)(point-slope form)
yy1=m(xx1)
Parallel lines rule. Two lines are parallel if and only if they have the same slope. To find a line parallel to y=mx+c through a point, reuse the slope m and apply the point-slope form.

How to find the equation from two points

  1. Find the slope. Use m=y2y1x2x1. Label the points so the arithmetic is simplest.
  2. Substitute the slope and either point into yy1=m(xx1).
  3. Expand and rearrange into the form y=mx+c.
EXAMPLE 1 — TWO-POINT STANDARD
Find the equation of the line through (1,3) and (2,5).
SOLUTION

Find the slope using the gradient formula.

m=5321
m=2

Substitute m=2 and the point (1,3) into the point-slope form.

y3=2(x1)
y3=2x2
y=2x+1
y=2x+1
EXAMPLE 2 — NEGATIVE COORDINATES
Find the equation of the line through (2,1) and (4,4).
SOLUTION

Subtracting a negative becomes addition in the denominator.

m=414(2)
m=36=12

Substitute m=12 and the point (2,1).

y1=12(x+2)
y1=12x+1
y=12x+2
y=12x+2
EXAMPLE 3 — PARALLEL LINE
Find the equation of the line parallel to y=3x2 passing through (1,5).
SOLUTION

Parallel lines share the slope. From y=3x2, the slope is m=3.

y5=3(x1)
y5=3x3
y=3x+2
y=3x+2
EXAMPLE 4 — REAL-WORLD RATE
A tour bus has covered 160 km after 2 hours and 340 km after 5 hours. Find the equation for distance d in terms of time t, in the form d=mt+c.
SOLUTION

Treat the readings as the points (2,160) and (5,340). The slope is the bus's speed.

m=34016052
m=1803=60

Substitute into the point-slope form with the point (2,160).

d160=60(t2)
d=60t+40

The bus travels at 60 km/h and started 40 km from the origin at t=0.

d=60t+40

Common pitfalls

Slope is rise over run, not run over rise. The formula is y2y1x2x1. Writing x2x1y2y1 gives the reciprocal — the wrong value.
Watch out for negative coordinates. Subtracting a negative becomes addition: 4(2)=6, not 2. A common error is to drop the brackets and end up with 42=2.
Use the same order in numerator and denominator. If y2 is from the second point, x2 must be from the second point too. Swapping the order in only one of them flips the sign of the slope.
Don't stop at the slope. The slope alone is not the equation. After finding m, still substitute into point-slope form and rearrange into y=mx+c.

Frequently asked questions

How do I find the equation of a line passing through two points?

First find the slope using m equals (y2 minus y1) divided by (x2 minus x1). Then substitute the slope and either of the two points into the point-slope form y minus y1 equals m times (x minus x1) and rearrange into y equals m x plus c.

What is the gradient formula?

The gradient (or slope) formula is m equals (y2 minus y1) divided by (x2 minus x1). It is the change in y divided by the change in x between any two points on the line.

Does it matter which point I label as point 1 and which as point 2?

No. As long as you subtract the y-coordinates and x-coordinates in the same order, you get the same slope. Pick the labelling that gives the cleanest arithmetic — usually whichever point has simpler numbers.

How do I find the equation of a line parallel to another line?

Parallel lines have the same slope. Take the slope from the given equation y equals m x plus c, then use that slope together with the new point in the point-slope form y minus y1 equals m times (x minus x1).

What if the two points have the same y-coordinate or the same x-coordinate?

If both points share the same y-value, the line is horizontal: y equals that common value. If both share the same x-value, the line is vertical: x equals that common value. The vertical case has an undefined slope, so the gradient formula does not apply.

How do I get a linear equation from a real-world rate problem with two readings?

Treat each reading as a point. For example, after 2 hours distance is 160 km gives the point (2, 160). Find the slope between the two points using the gradient formula — that is the constant rate — then substitute into point-slope form and rearrange.

Video Lessons

  • Point Slope Form - Basic Introduction - Algebra Watch
  • How to Find the Equation of a Line Given Two Point │Linear Equations Watch

Practice Questions

20 questions available.

Practice Questions