- Practice
- About 18 min
- 5 practice questions
Equations of a straight line: axes, slope-intercept, point-slope, two-point and intercept forms
Write the equation of a line parallel to an axis, or from a slope and y intercept, a point and a slope, two points or two intercepts, and turn each into the form ax + by + c = 0.
If something looks wrong, please tell us.
By the end of this lesson you can
- Write the equations of the axes and of lines parallel to them.
- Use the slope-intercept form y = mx + c and the point-slope form y − y₁ = m(x − x₁).
- Use the two-point form and the intercept form x/a + y/b = 1.
- Choose the right form from the information given and simplify to ax + by + c = 0.
A first-degree equation in two variables, ax + by + c = 0 with a and b not both zero, is the equation of a straight line: every point on the line satisfies it, and every point that satisfies it is on the line. In practice we are usually given some facts about a line (a point, its slope, where it cuts the axes) and must write its equation. Each set of facts has its own ready-made form.
The axes and lines parallel to them
Every point on the X axis has y-coordinate 0, so the X axis is y = 0; the Y axis is x = 0. A line parallel to the X axis at a distance b has every y-coordinate equal to b, so it is y = b (above the X axis if b > 0, below if b < 0). A line parallel to the Y axis is x = c (to the right of the Y axis if c > 0, to the left if c < 0).
Worked example 1
Through (−3, 4): the line parallel to the X axis is y = 4, and the line parallel to the Y axis is x = −3. Check: the point (−3, 4) satisfies both.
The four main forms
| Form | Equation | What you need |
|---|---|---|
| Slope-intercept | y = mx + c | Slope m and y intercept c |
| Point-slope | y − y₁ = m(x − x₁) | Slope m and one point (x₁, y₁) |
| Two-point | (y − y₁)/(y₂ − y₁) = (x − x₁)/(x₂ − x₁) | Two points (x₁, y₁) and (x₂, y₂) |
| Intercept | x/a + y/b = 1 | x intercept a and y intercept b (both non-zero) |
Slope-intercept form. A non-vertical line cuts the Y axis at one point (0, c); c is the y intercept. A line with slope m and y intercept c is y = mx + c. In particular y = mx passes through the origin, and a line with slope m that cuts the X axis at d is y = m(x − d).
Point-slope form. If (x, y) is any other point on the line through (x₁, y₁) with slope m, then (y − y₁)/(x − x₁) = m, which gives y − y₁ = m(x − x₁). Two-point form. Through (x₁, y₁) and (x₂, y₂) the slope is (y₂ − y₁)/(x₂ − x₁); putting it into the point-slope form and rearranging gives the two-point form. Intercept form. A line cutting the axes at (a, 0) and (0, b) gives, by the two-point form, x/a + y/b = 1.
Which equation form to use
-
Slope and y intercept known
- y = mx + c
-
Slope (or inclination) and a point known
- y − y₁ = m(x − x₁)
- m = tan θ if the inclination is given
-
Two points known
- Two-point form
- or find m first, then point-slope
-
Both intercepts known
- x/a + y/b = 1
Worked example 2: slope and intercept
Slope −2 and y intercept 5: y = −2x + 5, that is, 2x + y − 5 = 0. Inclination 45° and y intercept −3: m = tan 45° = 1, so y = x − 3, that is, x − y − 3 = 0.
Worked example 3: a point and a slope
Through (2, 3) with inclination 135°: m = tan 135° = −1. y − 3 = −1(x − 2), so y − 3 = −x + 2, giving x + y − 5 = 0. Check: 2 + 3 − 5 = 0.
Worked example 4: two points
Through (1, −2) and (4, 7): (y − (−2))/(7 − (−2)) = (x − 1)/(4 − 1), so (y + 2)/9 = (x − 1)/3. Multiply both sides by 9: y + 2 = 3(x − 1) = 3x − 3, so 3x − y − 5 = 0. Check both points: 3(1) − (−2) − 5 = 0 and 3(4) − 7 − 5 = 0.
Worked example 5: intercepts, both ways
(i) Intercepts 4 on the X axis and −6 on the Y axis: x/4 + y/(−6) = 1. Multiply by 12: 3x − 2y = 12, so 3x − 2y − 12 = 0. Check: (4, 0) gives 12 − 0 − 12 = 0 and (0, −6) gives 0 + 12 − 12 = 0. (ii) Intercepts of 5x + 2y = 20: divide by 20 to get x/4 + y/10 = 1, so the x intercept is 4 and the y intercept is 10.
Worked example 6: a line in real life (made-up data)
A tank holds 500 litres and drains at a steady 25 litres a minute. The volume left after t minutes is V = 500 − 25t: a straight line in slope-intercept form with slope −25 (litres per minute, falling) and intercept 500 (the starting volume). The tank is empty when V = 0: 25t = 500, so t = 20 minutes, which is the t intercept.
Key takeaways: y = b and x = c are lines parallel to the axes. Pick the form from the facts: y = mx + c, y − y₁ = m(x − x₁), the two-point form, or x/a + y/b = 1. Check your final equation by substituting the given points.
Check your understanding
-
1. What is the equation of the line through (3, −5) parallel to the Y axis?
- y = −5
- x = −5
- x = 3
- y = 3
Show answer
Answer: C. A line parallel to the Y axis has the same x-coordinate at every point, so it is x = c. It passes through (3, −5), so c = 3 and the line is x = 3. y = −5 is the line through the point parallel to the X axis.
-
2. Which is the equation of the line with slope 3 and y intercept −4?
- 3x − y − 4 = 0
- 3x + y − 4 = 0
- x − 3y − 4 = 0
- 3x − y + 4 = 0
Show answer
Answer: A. y = mx + c gives y = 3x − 4, which rearranges to 3x − y − 4 = 0. Check: x = 0 gives y = −4, the y intercept.
-
3. What is the equation of the line through (2, 1) and (6, 9)?
- x − 2y = 0
- 2x + y − 5 = 0
- x − y − 1 = 0
- 2x − y − 3 = 0
Show answer
Answer: D. Slope = (9 − 1)/(6 − 2) = 8/4 = 2. Point-slope: y − 1 = 2(x − 2), so y = 2x − 3, that is, 2x − y − 3 = 0. Check (6, 9): 12 − 9 − 3 = 0.
-
4. What intercepts does the line 3x − 4y = 24 make on the axes?
- x intercept −8, y intercept 6
- x intercept 8, y intercept −6
- x intercept 3, y intercept −4
- x intercept 6, y intercept −8
Show answer
Answer: B. Divide by 24: x/8 − y/6 = 1, that is, x/8 + y/(−6) = 1. So the x intercept is 8 and the y intercept is −6. Check: y = 0 gives 3x = 24, x = 8; x = 0 gives −4y = 24, y = −6.
-
5. What is the equation of the line through (1, 2) with slope −3?
- 3x − y − 1 = 0
- x + 3y − 7 = 0
- 3x + y − 5 = 0
- 3x + y + 5 = 0
Show answer
Answer: C. y − 2 = −3(x − 1) = −3x + 3, so 3x + y − 5 = 0. Check: 3(1) + 2 − 5 = 0, and the slope of 3x + y − 5 = 0 is −3.
Sign in to keep track of the lessons you finish.