Equations of Lines
In Grade 9 you worked with lines in the form . This page adds a formula for slope that works for any two points, shows how to find the equation of a line from whatever information you’re given, and introduces two more ways to write the same line. You’ll use all of this in every linear systems and analytic geometry page that follows.
Key ideas
Section titled “Key ideas”Slope from rise over run
Section titled “Slope from rise over run”The slope of a line measures how steep it is: how much changes for each step in .
Pick any two points on the line, and . Going from the first to the second, the rise is and the run is . That gives the slope formula:
It doesn’t matter which point you call “first”, as long as you subtract in the same order on the top and the bottom. Going from to instead gives , the same slope.
Write slopes as exact fractions in lowest terms, like , not .
Four kinds of slope
Section titled “Four kinds of slope”| Line | Slope | Equation looks like |
|---|---|---|
| rises left to right | positive | |
| falls left to right | negative | |
| horizontal | (the rise is ) | |
| vertical | undefined (the run is ) |
A vertical line has no slope at all: the slope formula would divide by . Its equation is , because every point on it has the same -coordinate. A horizontal line through is , because every point on it has -coordinate .
Three forms of the same line
Section titled “Three forms of the same line”| Form | Example | Good for |
|---|---|---|
| slope–intercept: | reading the slope and -intercept, graphing | |
| standard form: | no fractions; a tidy final answer | |
| finding intercepts, setting up linear systems |
In the last two forms, , , and are integers, and we usually make positive. All three examples in the table are the same line.
To convert to , solve for . To convert from , multiply by the denominator to clear fractions, then move every term to one side (for ) or move only the constant to the right side (for ).
Intercepts
Section titled “Intercepts”- The -intercept is where the line crosses the -axis. Every point on the -axis has , so set and solve for .
- The -intercept is where the line crosses the -axis. Set and solve for . In , it’s simply .
For : when , so ; when , so . Plotting and is a fast way to graph the line.
Finding the equation of a line
Section titled “Finding the equation of a line”You always need two things: the slope and the -intercept .
- Find . From a graph, count rise over run. From two points or a table, use the slope formula.
- Find . If you can see where the line crosses the -axis, read it off. Otherwise, substitute and any point on the line into and solve for .
- Write the equation, then change the form if the question asks.
- Check that a second point on the line satisfies your equation.
Worked examples
Section titled “Worked examples”Example 1: From a graph
Section titled “Example 1: From a graph”Find the equation of the line in the graph. Write it in the form and in the form .
Solution. The line crosses the -axis at , so .
From to , the run is (right) and the rise is (down):
So the equation is
For standard form, multiply every term by , then move everything to the left side:
Check with : . ✓
Example 2: From two points
Section titled “Example 2: From two points”Find the equation of the line through and .
Solution. Use the slope formula:
Substitute and the point into :
The equation is .
Check with the other point, : . ✓
Example 3: From a table of values
Section titled “Example 3: From a table of values”Find the equation of the line that passes through these points. Give it in standard form.
Solution. Each time goes up by , goes down by . The changes are constant, so the points really are on a line, and
The table doesn’t include , so find by substituting a point, say :
So . Multiply by and move everything to the left:
Check with : . ✓
Example 4: Converting forms and finding intercepts
Section titled “Example 4: Converting forms and finding intercepts”For the line :
- (a) Write the equation in the form , and state the slope.
- (b) Write the equation in the form .
- (c) Find both intercepts.
Solution.
(a) Solve for :
The slope is .
(b) Move only the constant to the right side: .
(c) For the -intercept, read from part (a): it’s , the point . For the -intercept, set : , so , the point .
Check: the slope from to is . ✓
Common mistakes
Section titled “Common mistakes”Subtracting in different orders on the top and bottom. Writing flips the sign of the slope. Whatever point you start with on the top, start with the same point on the bottom.
Putting run over rise. Slope is . The -values go on top. A quick sense check: a line that looks steeper than should have a slope bigger than (or less than ).
Mixing up zero and undefined slope. A horizontal line has slope and equation . A vertical line has undefined slope and equation . “No slope” and “zero slope” are not the same thing.
Using b from the wrong place. In , is the -intercept only after you’ve solved for . In , the -intercept is , not .
Sign slips when changing forms. When a term crosses the equals sign it changes sign, and when you divide by a negative, every term changes sign. Check by substituting a point into both versions of the equation.
Confusing the two intercepts. The -intercept is found by setting (not ), because it’s on the -axis, where is .
Practice
Section titled “Practice”1. (Warm-up) Find the slope of the line through and .
Solution
2. (Warm-up) Find the slope of the line through each pair of points, and write the equation of the line.
- (a) and
- (b) and
Solution
(a) . The line is horizontal: .
(b) , which is undefined. The line is vertical: .
3. (Warm-up) A line has slope and -intercept . Write its equation in the form and in the form .
Solution
.
Multiply by : . Move everything to the right side so that the term stays positive: . So
Check with the -intercept : . ✓
4. (Core) Find the equation of the line through with slope . Give your answer in both form and standard form.
Solution
Substitute into :
So . Multiply by : , so
Check with : . ✓
5. (Core) Find the equation of the line through and .
Solution
Substitute : , so . The equation is .
Check with : . ✓
6. (Core) Write in the form . State the slope and both intercepts.
Solution
The slope is and the -intercept is . For the -intercept, set : , so .
7. (Core) Water drains from a tank at a constant rate. The table shows the volume (in litres) after minutes.
| (min) | |||
|---|---|---|---|
| (L) |
- (a) Find an equation for in terms of .
- (b) What do the slope and the -intercept mean here?
- (c) When will the tank be empty?
Solution
(a) Every minutes the volume drops by L, so . Substitute : , so .
Check with : . ✓
(b) The slope means the tank loses L every minute. The -intercept means the tank held L when it started draining ().
(c) Set : , so . The tank is empty after minutes.
8. (Challenge) The line through and has slope . Find .
Solution
Check: the slope from to is . ✓
9. (Challenge) A line has -intercept and -intercept . Write its equation in all three forms.
Solution
The line passes through and .
The -intercept is , so .
Multiply by : . Rearranging gives , or .
Check the intercepts in : when , ✓; when , ✓.