Algebra · Lesson 7 of 13

Writing Equations of Lines

Key rules and formulas, worked examples and 12 practice problems with step-by-step solutions.

1. From Slope & Y-Int

Writing equation given m and b

$$y = m \times x + b$$

Directly plug the slope for 'm' and the y-intercept for 'b'.

Example

Write the equation of a line with slope $$m = 3$$ and y-intercept $$b = -4$$

Show solution
  • Step 1: Identify given values: $$m = 3$$, $$b = -4$$.
  • Step 2: Write standard slope-intercept form: $$y = mx + b$$.
  • Step 3: Substitute $$m = 3$$ and $$b = -4$$: $$y = 3x + (-4) \Rightarrow y = 3x - 4$$.

=> Conclusion: Equation is $$y = 3x - 4$$

Practice problems

  1. Problem 1

    Write the equation of a line with slope $$m = 2$$ and y-intercept $$b = 5$$

    Show solution

    Answer: $$y = 2x + 5$$

    • Step 1: Identify given values: $$m = 2$$, $$b = 5$$.
    • Step 2: Use Slope-Intercept Form: $$y = mx + b$$.
    • Step 3: Substitute values: $$y = 2x + 5$$.

    => Correct Option: A ($$y = 2x + 5$$)

  2. Problem 2

    Write the equation of a line with slope $$m = \frac{-1}{2}$$ and y-intercept $$b = 3$$

    Show solution

    Answer: $$y = \frac{-1}{2} x + 3$$

    • Step 1: Identify given values: $$m = \frac{-1}{2}$$, $$b = 3$$.
    • Step 2: Use Slope-Intercept Form: $$y = mx + b$$.
    • Step 3: Substitute values: $$y = \frac{-1}{2} x + 3$$.

    => Correct Option: B ($$y = \frac{-1}{2} x + 3$$)

  3. Problem 3

    Write the equation of a line with slope $$m = 0$$ and y-intercept $$b = -7$$

    Show solution

    Answer: $$y = -7$$

    • Step 1: Identify given values: $$m = 0$$, $$b = -7$$.
    • Step 2: Substitute into $$y = mx + b \Rightarrow y = (0)x + (-7)$$.
    • Step 3: Simplify: $$y = -7$$ (Horizontal line).

    => Correct Option: A ($$y = -7$$)

Remember

Directly plug the slope for 'm' and the y-intercept for 'b' into the Slope-Intercept Form: $$y = mx + b$$.

2. From Slope & Point

Using a point (x1, y1) and slope m

$$y - y_1 = m \times (x - x_1)$$

Use Point-Slope form. Plug in values, then solve for y to get Slope-Intercept form.

Example

Write the equation of the line passing through (2, 5) with slope $$m = 3$$

Show solution
  • Step 1: Identify given point $$(x_1, y_1) = (2, 5)$$ and slope $$m = 3$$.
  • Step 2: Substitute into Point-Slope form: $$y - 5 = 3(x - 2)$$.
  • Step 3: Distribute 3: $$y - 5 = 3x - 6$$.
  • Step 4: Add 5 to both sides: $$y = 3x - 1$$.

=> Conclusion: Equation is $$y = 3x - 1$$

Practice problems

  1. Problem 4

    Write the equation of the line passing through (1, 4) with slope $$m = 2$$

    Show solution

    Answer: $$y = 2x + 2$$

    • Step 1: Given $$(x_1, y_1) = (1, 4)$$ and $$m = 2$$.
    • Step 2: Point-Slope form: $$y - 4 = 2(x - 1)$$.
    • Step 3: Expand: $$y - 4 = 2x - 2$$.
    • Step 4: Add 4: $$y = 2x + 2$$.

    => Correct Option: A ($$y = 2x + 2$$)

  2. Problem 5

    Write the equation of the line passing through $$(-3, 2)$$ with slope $$m = -4$$

    Show solution

    Answer: $$y = -4x - 10$$

    • Step 1: Given $$(x_1, y_1) = (-3, 2)$$ and $$m = -4$$.
    • Step 2: Point-Slope form: $$y - 2 = -4(x - (-3)) \Rightarrow y - 2 = -4(x + 3)$$.
    • Step 3: Expand: $$y - 2 = -4x - 12$$.
    • Step 4: Add 2: $$y = -4x - 10$$.

    => Correct Option: A ($$y = -4x - 10$$)

  3. Problem 6

    Write the equation of the line passing through $$(4, -1)$$ with slope $$m = \frac{1}{2}$$

    Show solution

    Answer: $$y = \frac{1}{2} x - 3$$

    • Step 1: Given $$(x_1, y_1) = (4, -1)$$ and $$m = \frac{1}{2}$$.
    • Step 2: Point-Slope form: $$y - (-1) = \frac{1}{2}(x - 4) \Rightarrow y + 1 = \frac{1}{2} x - 2$$.
    • Step 3: Subtract 1: $$y = \frac{1}{2} x - 3$$.

    => Correct Option: B ($$y = \frac{1}{2} x - 3$$)

Remember

Use Point-Slope form $$y - y_1 = m(x - x_1)$$. Plug in values, then expand and solve for y to convert into Slope-Intercept form ($$y = mx + b$$).

3. From Two Points

Finding the equation using only (x1,y1) & (x2,y2)

$$m = \frac{(y^2-y^1)}{(x^2-x^1)}$$

First, calculate the slope (m). Then, use the slope and one of the points in Point-Slope form.

Example

Write the equation of the line passing through (1, 3) and (3, 7).

Show solution
  • Step 1: Calculate slope: $$m = \frac{(7 - 3)}{(3 - 1)} = \frac{4}{2} = 2$$.
  • Step 2: Use point (1, 3) and $$m = 2$$ in Point-Slope form: $$y - 3 = 2(x - 1)$$.
  • Step 3: Expand: $$y - 3 = 2x - 2$$.
  • Step 4: Add 3 to both sides: $$y = 2x + 1$$.

=> Conclusion: Equation is $$y = 2x + 1$$

Practice problems

  1. Problem 7

    Write the equation of the line passing through (2, 5) and (4, 9).

    Show solution

    Answer: $$y = 2x + 1$$

    • Step 1: Calculate slope: $$m = \frac{(9 - 5)}{(4 - 2)} = \frac{4}{2} = 2$$.
    • Step 2: Point-Slope form using $$(2, 5)$$: $$y - 5 = 2(x - 2)$$.
    • Step 3: Expand: $$y - 5 = 2x - 4$$.
    • Step 4: Add 5: $$y = 2x + 1$$.

    => Correct Option: B ($$y = 2x + 1$$)

  2. Problem 8

    Write the equation of the line passing through $$(-1, 6)$$ and $$(2, -3)$$

    Show solution

    Answer: $$y = -3x + 3$$

    • Step 1: Calculate slope: $$m = (-3 - 6) / (2 - (-1)) = \frac{-9}{3} = -3$$.
    • Step 2: Point-Slope form using $$(2, -3)$$: $$y - (-3) = -3(x - 2) \Rightarrow y + 3 = -3x + 6$$.
    • Step 3: Subtract 3: $$y = -3x + 3$$.

    => Correct Option: B ($$y = -3x + 3$$)

  3. Problem 9

    Write the equation of the line passing through $$(-2, -5)$$ and (6, 1).

    Show solution

    Answer: $$y = \frac{3}{4} x - \frac{7}{2}$$

    • Step 1: Calculate slope: $$m = (1 - (-5)) / (6 - (-2)) = \frac{6}{8} = \frac{3}{4}$$.
    • Step 2: Point-Slope form using $$(6, 1)$$: $$y - 1 = \frac{3}{4}(x - 6)$$.
    • Step 3: Expand: $$y - 1 = \frac{3}{4} x - \frac{18}{4} \Rightarrow y - 1 = \frac{3}{4} x - \frac{9}{2}$$.
    • Step 4: Add $$1 (\frac{2}{2})$$: $$y = \frac{3}{4} x - \frac{7}{2}$$.

    => Correct Option: B ($$y = \frac{3}{4} x - \frac{7}{2}$$)

Remember

First, calculate the slope $$m = \frac{(y_2 - y_1)}{(x_2 - x_1)}$$. Then, use the calculated slope and one of the points in Point-Slope form to solve for y.

4. Parallel / Perpendicular

Lines based on another line's slope

Para: $$m_1 = m_2$$; Perp: $$m_1 = -1/m_2$$

Parallel lines have same slope. Perpendicular lines have negative reciprocal slopes.

Example

Write the equation of the line passing through (2, 1) and perpendicular to $$y = 2x + 5$$

Show solution
  • Step 1: Given line slope $$m_1 = 2$$.
  • Step 2: Perpendicular slope $$m_2 = -1 / m_1 = \frac{-1}{2}$$.
  • Step 3: Use point (2, 1) and $$m_2 = \frac{-1}{2}$$: $$y - 1 = \frac{-1}{2}(x - 2)$$.
  • Step 4: Expand: $$y - 1 = \frac{-1}{2} x + 1 $$ => Add 1: $$y = \frac{-1}{2} x + 2$$.

=> Conclusion: Equation is $$y = \frac{-1}{2} x + 2$$

Practice problems

  1. Problem 10

    Write the equation of the line passing through (3, 4) and parallel to $$y = 2x - 1$$

    Show solution

    Answer: $$y = 2x - 2$$

    • Step 1: Parallel lines have same slope => $$m = 2$$.
    • Step 2: Point-Slope form using $$(3, 4)$$: $$y - 4 = 2(x - 3)$$.
    • Step 3: Expand: $$y - 4 = 2x - 6$$.
    • Step 4: Add 4: $$y = 2x - 2$$.

    => Correct Option: B ($$y = 2x - 2$$)

  2. Problem 11

    Write the equation of the line passing through $$(4, -2)$$ and perpendicular to $$y = 2x + 3$$

    Show solution

    Answer: $$y = \frac{-1}{2} x$$

    • Step 1: Perpendicular slope is negative reciprocal of $$2 \Rightarrow m = \frac{-1}{2}$$.
    • Step 2: Point-Slope form using $$(4, -2)$$: $$y - (-2) = \frac{-1}{2}(x - 4) \Rightarrow y + 2 = \frac{-1}{2} x + 2$$.
    • Step 3: Subtract 2: $$y = \frac{-1}{2} x$$.

    => Correct Option: B ($$y = \frac{-1}{2} x$$)

  3. Problem 12

    Write the equation of the line passing through $$(-3, 5)$$ and perpendicular to $$y = \frac{-3}{4} x + 2$$

    Show solution

    Answer: $$y = \frac{4}{3} x + 9$$

    • Step 1: Given slope = $$\frac{-3}{4}$$ => Perpendicular slope $$= +\frac{4}{3}$$.
    • Step 2: Point-Slope form using $$(-3, 5)$$: $$y - 5 = \frac{4}{3}(x - (-3)) \Rightarrow y - 5 = \frac{4}{3}(x + 3)$$.
    • Step 3: Expand: $$y - 5 = \frac{4}{3} x + 4$$.
    • Step 4: Add 5: $$y = \frac{4}{3} x + 9$$.

    => Correct Option: B ($$y = \frac{4}{3} x + 9$$)

Remember

Parallel lines have the SAME slope $$(m_1 = m_2)$$. Perpendicular lines have NEGATIVE RECIPROCAL slopes $$(m_1 \times m_2 = -1 \Rightarrow m_2 = -1/m_1)$$. Use the new slope and given point to write the equation.