The Equation of a Line
Learning objectives
- Write the equation of a line in slope-intercept form and point-slope form
- Find the slope of a line through two given points
- Identify horizontal and vertical lines and their equations
- Convert between different forms of line equations
The parametric form is elegant; the ordinary form is what you grew up with. Both describe the same lines, but the ordinary form trades the parameter for a direct relation between and . That makes it perfect for graphing, for spotting whether two lines are parallel or perpendicular at a glance, and for the entire enterprise of school algebra. This section is the bridge between the two views: parametric and ordinary.
Slope, the rate of change
The slope of the line through and (assuming ) is
It measures how much changes for each unit change in . A slope of means: walk unit right, climb units. A slope of means: walk units right, drop unit. Slope is the geometric soul of the line, and (in calculus) it generalises to the derivative.
Slope-intercept form
The most common equation for a line:
Here is the slope and is the -intercept, the value of where the line crosses the -axis (i.e., when ). Two numbers determine a line completely.
- Statistics: Linear regression fits the line to a cloud of data points; the slope is the most-asked-for number in elementary stats ("how much does Y change per unit of X?").
- Economics: A demand curve is a line in slope-intercept form; the slope measures price sensitivity (price elasticity at a point), one of the most central quantities in microeconomics.
- Physics: Hooke's law is a line through the origin with slope ; the spring constant is just the negative slope, and finding from data is the simplest experiment a physics student does.
Adjust the slope and intercept sliders. The equation display updates live as . Each pair gives a unique line.
Point-slope form
When you know the slope and any one point on the line, the point-slope form writes the equation directly:
This is just the slope formula rearranged. It is the workhorse for finding line equations: compute slope, plug in a point, simplify if you want.
Special cases: horizontal and vertical lines
- A horizontal line has slope ; its equation is (constant).
- A vertical line has undefined slope (division by zero in ); its equation is . Vertical lines cannot be written as .
Parallel and perpendicular: slope tests
Using slopes, two non-vertical lines are:
- Parallel ⇔ their slopes are equal: .
- Perpendicular ⇔ their slopes are negative reciprocals: , or .
So and are parallel (same slope , different intercept); and are perpendicular ().
From two points to an equation, the standard recipe
Through and : slope . Use point-slope with : . Simplify: . Done. The same line can be written as using the other point, check by simplifying that you get either way.
Try it
- Before adjusting: with and , what is the equation of the line, and which point does it pass through? Set the sliders and verify it is through the origin.
- Predict first: with and , where does the line cross the -axis, and does it rise or fall? Set the sliders and verify it is .
- What is the slope of a line perpendicular to ? Answer: .
A trap to watch for
"Parallel lines have the same equation." No, parallel lines have the same slope but generally different intercepts. The lines and are parallel but distinct (the second one is shifted up by ). If two distinct lines have the same equation, they are the same line, which is more than parallel. A second common trap: forgetting that vertical lines have no slope and cannot fit . Always check whether the two points share an -coordinate before computing slope; if they do, you have a vertical line .
What you now know
You can move freely between the slope-intercept form , the point-slope form , and the parametric form ; you can identify parallel and perpendicular lines from their slopes; and you can write the equation of a line through any two given points. With this section you have a complete algebraic toolkit for straight lines in the plane, the foundation for everything that follows in trigonometry, conics, and calculus.
Quick check
Mark section complete →
References
- Lang, S. (1971). Basic Mathematics. Springer. Chapter 10, §4, the ordinary equation of a line and slope-intercept form.
- Stewart, J. (2015). Calculus, 8th ed. Cengage. Appendix B covers lines in coordinates as a calculus prerequisite.
- Apostol, T. M. (1967). Calculus, Volume 1, 2nd ed. Wiley. §1.6 develops slope-intercept lines and connects them to the derivative.
- Coxeter, H. S. M. (1969). Introduction to Geometry, 2nd ed. Wiley. §13 develops line equations in the broader affine setting.