Forms of the Equation of a Line

Two standard forms and when to use each: slope with y-intercept, or slope with any point. Plus what to do when you are given two points instead.

--

There are two standard ways to write the equation of a line, and the right choice depends entirely on what you are given. Know the slope and the  y -intercept, and one form is immediate. Know the slope and any point, and the other form fits.

Form 1 Slope and y-intercept

 y = mx + b

 m is the slope.
 b is where the line crosses the  y -axis.

If a line has slope 3 and crosses the  y -axis at  -2 :

⟹ y = 3x − 2
Form 2 Slope and a point

 y - y_1 = m(x - x_1)

Here  (x_1,\ y_1) is any known point on the line. Use this form when the  y -intercept is not given.

For a line with slope  -\frac{3}{4} passing through  (-2,\ 5) :

 y - 5 = -\dfrac{3}{4}\big(x - (-2)\big)
⟹ y − 5 = −¾(x + 2)

Subtracting a negative turned into a plus inside the bracket — the most common slip with this form.

Concept When you are given two points

Neither form applies directly, so start by finding the slope:

 m = \frac{y_2 - y_1}{x_2 - x_1}

Then substitute that slope and either one of the two points into the point-slope form. Both points lead to the same final equation.

Example From two points to an equation

Find the equation of the line through  (0,\ 3) and  (-2,\ -1) .

Slope:  m = \dfrac{3 - (-1)}{0 - (-2)} = \dfrac{4}{2} = 2 .
Take the point  (0,\ 3) :  y - 3 = 2(x - 0) .
Simplify:  y - 3 = 2x , so  y = 2x + 3 .
⟹ y = 2x + 3
Example The other point gives the same answer

Repeat the previous example using  (-2,\ -1) instead.

 y - (-1) = 2\big(x - (-2)\big)
 y + 1 = 2(x + 2)
Expand:  y + 1 = 2x + 4 .
Subtract 1 from both sides:  y = 2x + 3 .
⟹ y = 2x + 3, exactly as before

Either point works because both lie on the same line. Choosing the one with simpler numbers — often a zero coordinate — saves effort.

Note Mistakes to avoid
Treating a point's  y -value as the intercept  b when the point is not on the  y -axis.
Mishandling a double negative:  x - (-2) becomes  x + 2 .
Trying to use a form before finding the slope, when two points are given.
Reversing the subtraction order in the slope formula.
Forgetting to simplify the final equation into a clean form.
Summary
  1. Use y = mx + b when the slope and the y-intercept are known.
  2. Use y − y₁ = m(x − x₁) when the slope and any point are known.
  3. Given two points, find the slope first, then substitute either point.
  4. Both points give the same final equation, so pick the simpler one.
  5. Watch the double negatives: x − (−2) becomes x + 2.