Equation of a Straight Line: Six Forms and When to Use Them
Write a straight-line equation from slope, one or two points, or intercepts. Compare standard, point-slope, intercept, and normal forms.
TL;DR
A straight line in the coordinate plane satisfies , where and are not both zero. Use slope and a point, two points, or intercepts to find the equation.
Key Points
- Slope-intercept form shows the slope and the value at .
- Point-slope form is convenient when you know any point and the slope.
- Two points determine a unique line if the points are distinct.
- A vertical line has equation and undefined slope.
- Check an equation by substituting the original points.
What are the forms of a straight-line equation?
A line is the set of all points that satisfy its equation. Different equations can represent the same set if they are obtained by reversible algebraic steps.
| Form | Equation | What you need |
|---|---|---|
| Slope-intercept | Slope and intercept value | |
| Point-slope | A point and a finite slope | |
| Standard | Real coefficients with and not both zero | |
| Two-point | Two points with different coordinates | |
| Intercept | Two distinct, nonzero axis intercepts and | |
| Normal | Distance from the origin and the direction of a perpendicular |
In normal form, is measured from the positive -axis to a unit normal pointing from the origin toward the line and . When the line passes through the origin, and either unit normal gives a valid equation. For , divide the equation by . If the right side is negative, multiply the entire result by . The resulting and coefficients are the components and of the unit normal. The slope guide explains how the direction along a line is measured instead.
How do you write the equation from one or two points?
If you know a point and finite slope , every point on the line must follow the same change in per change in . Therefore . This equation includes the starting point because both sides become zero there. Expand if the question asks for . OpenStax, Find the Equation of a Line
With two distinct points, calculate the slope first. Subtract coordinates in the same order. If both first coordinates are equal, the line is vertical and its equation is . If both second coordinates are equal, the line is horizontal with equation . For all other pairs, substitute either point into point-slope form and check the other point afterwards.
For a form that also handles vertical lines, multiply the two-point equation through by the run:
If the run is zero and the points are distinct, the rise is nonzero and the equation forces . If the two supplied points are identical, neither form determines a unique line. OpenStax, Writing an Equation Given Two Points
Can you write a line from two points without using a slope fraction?
Yes. Use the cross-multiplied form and simplify to standard form. With and , the run is 6 and the rise is . Substitution gives , which simplifies to . Checking the first point gives . Checking the second gives . This approach avoids rounding a fractional slope before computing the intercept.
You can also calculate direction through the line’s midpoint for a check. The midpoint guide gives for this pair, and . The midpoint alone is not enough to find the line. It gives a third point to verify after you know the two endpoints.
How do you convert between forms?
To change to standard form, move the and terms to one side. Multiply all terms by a common denominator if you want integer coefficients. For example, gives , or . Standard-form triples that differ by a nonzero common multiplier describe the same line. Some courses also ask for no common integer factor and a positive leading coefficient. OpenStax, Use the Slope-Intercept Form
To convert back, solve for if . The slope is and the intercept value is . When , solve for instead. If you need a line through its nonzero axis crossings, the intercept guide explains how to recover and check them.
How do you use a parallel or perpendicular line?
Parallel nonvertical lines have equal slopes. Choose the given slope, substitute the new point, and verify the new intercept when a distinct line is required. Lines with equal slopes and equal intercepts coincide.
Perpendicular nonvertical lines with finite, nonzero slopes have a slope product of . For example, a line perpendicular to slope has slope . A horizontal line and a vertical line are perpendicular as well. The perpendicular lines guide separates those cases. OpenStax, Find the Equation of a Line
Six Worked Straight-Line Equation Examples
Example 1
Find the line with slope and -intercept 5.
- Use and in slope-intercept form.
- The equation is .
- Check that and satisfy it.
Example 2
Find the equation through and .
- Calculate slope .
- Insert slope 2 and into point-slope form to get .
- Simplify to . At , it gives .
Example 3
Write the line through with slope in standard form.
- Start with .
- Multiplying by 2 gives .
- Rearranging yields .
Example 4
Find the line through and .
- The first coordinates agree and the second coordinates differ.
- The change in is zero, so the slope is undefined.
- Every point on the line has . Its equation is .
Example 5
Find a line through perpendicular to .
- The given line has slope .
- Use slope through the new point to get .
- Rearranging gives . At the left side is .
Example 6
Convert to normal form.
- The length of the coefficient vector is .
- The equation becomes .
- The perpendicular distance from the origin is 4, and a unit normal has components .
Common Straight-Line Equation Mistakes
Mistake 1: Substituting a point’s second coordinate as the intercept
A point’s value is the intercept only when its coordinate is zero. Use for a point elsewhere.
Mistake 2: Multiplying only some terms when clearing fractions
Multiply both sides and every term by the same number. Substitute a known point to catch sign errors.
Mistake 3: Entering zero as the slope of a vertical line
A vertical line has zero run and undefined slope. Zero slope describes a horizontal line.
Try It Yourself
- Write the equation through with slope 3.
- Write the equation through and .
- Find the line through parallel to .
Answers. 1. . 2. . 3. .
Conclusion
- Identify the information given before choosing an equation form.
- Check whether the line is vertical before dividing by its run.
- Substitute known points into the finished equation to test it.
Read More
Research Behind This Article
- OpenStax, Elementary Algebra 2e: Find the Equation of a Line. OpenStax
- OpenStax, Intermediate Algebra: Find the Equation of a Line. OpenStax
- OpenStax, Algebra 1: Writing an Equation Given Two Points. OpenStax
- OpenStax, Elementary Algebra 2e: Use the Slope-Intercept Form of an Equation of a Line. OpenStax