Straight Lines
A straight line is the simplest curve in the plane. Its defining feature is a constant slope: the ratio of the vertical change to the horizontal change between any two points on the line. Every non-vertical line can be written in the form y = mx + b, where m is the slope and b is the y-intercept.
Quick Reference
| Form | Equation | When to Use |
|---|---|---|
| Point-slope form | y = y_1 + m(x - x_1) | Given slope m and a point (x_1, y_1) |
| Slope-intercept form | y = mx + b | Given slope m and y-intercept b |
| Point-point form | y = y_1 + \dfrac{y_2-y_1}{x_2-x_1}(x-x_1) | Given two points (x_1,y_1) and (x_2,y_2) |
| General form | Ax + By + C = 0 | Any non-degenerate line |
| Vertical line | x = x_1 | Line parallel to the y-axis |
Slope of a Line
Consider a straight line L and two distinct points P(x_1, y_1) and Q(x_2, y_2) on it. The slope of the line, denoted m, is:
\boxed{m = \frac{y_2 - y_1}{x_2 - x_1}}The slope of a line is independent of which two points we choose on the line. If Q is exactly one unit to the right of P (so x_2 - x_1 = 1), then m = y_2 - y_1: moving one unit horizontally, the slope tells us how many units we must travel vertically to stay on the line. This is the origin of the phrase:
\text{slope} = \frac{\text{rise}}{\text{run}}
The sign of the slope indicates the line's direction:
- m > 0: the line rises to the right.
- m < 0: the line falls to the right.
- m = 0: the line is horizontal.

Important: The slope of a vertical line is undefined. Any two points on a vertical line share the same x-coordinate, making the denominator x_2 - x_1 = 0, and division by zero is not defined.
Equations of a Line
Point-Slope Form
To find the equation of the line through P(x_1, y_1) with slope m, let (x, y) be any other point on the line. The slope formula gives \dfrac{y - y_1}{x - x_1} = m, which rearranges to:
Point-Slope Form
y = y_1 + m(x - x_1)Slope-Intercept Form
The special case where the known point is the y-intercept (0, b) gives:
Slope-Intercept Form
y = mx + bwhere m is the slope and b is the y-intercept.
Point-Point Form
Given two points (x_1, y_1) and (x_2, y_2), first compute m = \dfrac{y_2 - y_1}{x_2 - x_1}, then substitute into the point-slope form:
Point-Point Form
y = y_1 + \left(\frac{y_2-y_1}{x_2-x_1}\right)(x-x_1)Vertical Lines
The equation of the vertical line through (x_1, y_1) is x = x_1.
General Equation of a Line
General Equation of a Line
Ax + By + C = 0 \quad (A \text{ and } B \text{ not both zero})Every line can be written in this form, and every equation of this form represents a line.
To understand why, consider two cases:
- Nonvertical line y = mx + b: rearrange to -mx + y - b = 0, which matches the general form with A = -m, B = 1, C = -b.
- Vertical line x = a: rearrange to x - a = 0, matching A = 1, B = 0, C = -a.
Conversely, from Ax + By + C = 0:
- If B \neq 0, solve for y: y = -\dfrac{A}{B}x - \dfrac{C}{B}. This is slope-intercept form with slope m = -\dfrac{A}{B} and y-intercept b = -\dfrac{C}{B}.
- If B = 0, the equation becomes Ax + C = 0, giving x = -\dfrac{C}{A}: a vertical line.
Worked Examples
Example 1. Find an equation of the line through (-2, 4) with slope m = \dfrac{3}{4}.
Solution. Using the point-slope form:
\begin{aligned} y - 4 &= \frac{3}{4}(x-(-2)) \\ y &= 4 + \frac{3}{4}(x+2) \\ y &= \frac{3}{4}x + \frac{3}{2} + 4 = \frac{3}{4}x + 5.5. \end{aligned}Alternatively, multiplying both sides of y - 4 = \dfrac{3}{4}(x+2) by 4:
4y - 16 = 3x + 6 \implies 3x - 4y + 22 = 0.A slope of \dfrac{3}{4} means moving 4 units right and 3 units up traces the line.
Example 2. Find an equation of the line through $(1, 5)$ and (4, -1).
Solution. First compute the slope:
m = \frac{-1-5}{4-1} = \frac{-6}{3} = -2.Apply the point-slope form with (x_1, y_1) = (1, 5):
y - 5 = -2(x-1) \implies y = -2x + 7.Example 3. Find the equation of the line with slope -1 and y-intercept $3$.
Solution. From the slope-intercept form with m = -1 and b = 3:
y = -x + 3.Example 4. Find the slope and y-intercept of 2y + 4x = 6.
Solution. Solve for y:
2y = -4x + 6 \implies y = -2x + 3.The slope is m = -2 and the y-intercept is b = 3.
Example 5. Find the slope and y-intercept of 5x - 2y + 8 = 0.
Solution. Isolate y:
-2y = -5x - 8 \implies y = \frac{5}{2}x + 4.The slope is m = \dfrac{5}{2} and the y-intercept is b = 4.
Frequently Asked Questions
What is the slope of a line?
The slope of a line is the ratio of the vertical change (rise) to the horizontal change (run) between any two points on the line. It measures both the steepness and direction of the line. A positive slope means the line rises from left to right, a negative slope means it falls, and a slope of zero means the line is horizontal.