Skip to main content
The new Teacher Workspace is here. Your first 3 assignments are free. Try it →

4.6 Find the Equation of a Line

Updated March 2026Fiveable Content Team
Fiveable

🔟Elementary Algebra Unit 4 Review

QR code for Elementary Algebra practice questions

4.6 Find the Equation of a Line

Equations of Lines

Line equation from slope and y-intercept

The most direct way to write a line's equation is when you already know the slope and the y-intercept. You'll use slope-intercept form:

y=mx+by = mx + b

  • mm is the slope (steepness and direction of the line). Positive slopes rise left to right; negative slopes fall.
  • bb is the y-intercept, the point where the line crosses the y-axis at (0,b)(0, b).

To write the equation, just substitute your values for mm and bb.

Example: slope = 2, y-intercept = -3

y=2x+(−3)y = 2x + (-3), which simplifies to y=2x−3y = 2x - 3

Line equation from slope and a point

When you know the slope and one point on the line (but not the y-intercept), use point-slope form:

y−y1=m(x−x1)y - y_1 = m(x - x_1)

  • mm is the slope.
  • (x1,y1)(x_1, y_1) is the known point on the line.

Steps:

  1. Substitute the slope for mm and the point's coordinates for x1x_1 and y1y_1.
  2. If the problem asks for slope-intercept form, distribute the slope and solve for yy.

Example: slope = −12-\frac{1}{2}, point (4,6)(4, 6)

  1. Substitute: y−6=−12(x−4)y - 6 = -\frac{1}{2}(x - 4)

  2. Distribute: y−6=−12x+2y - 6 = -\frac{1}{2}x + 2

  3. Add 6 to both sides: y=−12x+8y = -\frac{1}{2}x + 8

Both the point-slope version and the simplified slope-intercept version are correct equations for the same line. Your instructor may specify which form to give.

Line equation from slope and y-intercept, OpenAlgebra.com: Free Algebra Study Guide & Video Tutorials: Graph Lines Using Intercepts

Line equation from two points

If you're given two points and no slope, you need to calculate the slope first, then use point-slope form.

Steps:

  1. Find the slope using the slope formula: m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1}

  2. Pick either point and substitute it along with the slope into point-slope form.

  3. Simplify if needed.

Example: points (1,3)(1, 3) and (5,11)(5, 11)

  1. Calculate slope: m=11−35−1=84=2m = \frac{11 - 3}{5 - 1} = \frac{8}{4} = 2

  2. Use the point (1,3)(1, 3): y−3=2(x−1)y - 3 = 2(x - 1)

  3. Simplify: y−3=2x−2y - 3 = 2x - 2, so y=2x+1y = 2x + 1

You can plug in either point. Using (5,11)(5, 11) instead gives y−11=2(x−5)y - 11 = 2(x - 5), which simplifies to the same equation: y=2x+1y = 2x + 1.

Equation of a parallel line

Parallel lines have the same slope but different y-intercepts. They never intersect because they rise and run at the same rate, just shifted vertically.

To write the equation of a line parallel to a given line through a specific point:

  1. Identify the slope of the given line.
  2. Use that same slope with the new point in point-slope form.

Example: Find the line parallel to y=3x−2y = 3x - 2 that passes through (1,5)(1, 5).

  1. The given slope is 3. The parallel line also has slope 3.

  2. Substitute into point-slope form: y−5=3(x−1)y - 5 = 3(x - 1)

  3. Simplify: y=3x+2y = 3x + 2

Notice the two lines share the slope of 3 but have different y-intercepts (-2 vs. 2).

Line equation from slope and y-intercept, OpenAlgebra.com: Free Algebra Study Guide & Video Tutorials: Graph using the y-intercept and Slope

Equation of a perpendicular line

Perpendicular lines meet at a 90° angle. Their slopes are negative reciprocals of each other, meaning you flip the fraction and change the sign. The product of perpendicular slopes always equals -1.

To find the negative reciprocal: if the original slope is mm, the perpendicular slope is −1m-\frac{1}{m}.

Steps:

  1. Find the slope of the given line.
  2. Take its negative reciprocal to get the perpendicular slope.
  3. Use the perpendicular slope and the given point in point-slope form.

Example: Find the line perpendicular to y=−2x+3y = -2x + 3 that passes through (2,−1)(2, -1).

  1. The given slope is −2-2. The negative reciprocal is 12\frac{1}{2}.

  2. Substitute: y−(−1)=12(x−2)y - (-1) = \frac{1}{2}(x - 2)

  3. Simplify: y+1=12x−1y + 1 = \frac{1}{2}x - 1, so y=12x−2y = \frac{1}{2}x - 2

Quick check: (−2)×12=−1(-2) \times \frac{1}{2} = -1. The slopes multiply to -1, confirming they're perpendicular.

Linear Functions and Graphs

A linear function produces a straight line when graphed. Its defining feature is a constant rate of change, which is the slope. Every point on the line satisfies the equation, and every solution to the equation is a point on the line.

You can write linear equations in different forms depending on what information you have:

  • Slope-intercept form y=mx+by = mx + b: best when you know the slope and y-intercept.
  • Point-slope form y−y1=m(x−x1)y - y_1 = m(x - x_1): best when you know the slope and any point.

These forms describe the same line, just written differently. Converting between them is a matter of algebraic simplification.