Finding The Equation Of A Straight-Line Graph Using Two Points On The Graph
Theory
When you are given two points on a line, find the equation by first computing the slope with
When the question gives you two points on a line, you don't yet know the slope or the
The gradient formula gives the slope between any two points
It doesn't matter which of the two points you label
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
Two formulas — find the slope first, then write the equation.
How to find the equation from two points
- Find the slope. Use
. Label the points so the arithmetic is simplest. - Substitute the slope and either point into
. - Expand and rearrange into the form
.
Find the slope using the gradient formula.
Substitute
Subtracting a negative becomes addition in the denominator.
Substitute
Parallel lines share the slope. From
Treat the readings as the points
Substitute into the point-slope form with the point
The bus travels at
Common pitfalls
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
Practice Questions
20 questions available.
Practice Questions