This video explains how to find the equation of a line when given 2 points.

Find the slope using the slope formula, $m = \frac{y_2 - y_1}{x_2 - x_1}$.
After finding the slope, plug in the value of your points into either slope-intercept form, or point-slope form, to get the equation of the line.

• [nonmember]
[/nonmember]

## Video-Lesson Transcript

Let’s find an equation of a line, given two points.

How do we do this?

We can solve this by using the slope intercept form: $y = mx + b$

or by using point-slope formula: $y - y_1 = m (x - x_1)$

But in both cases we need to know what the slope (m) is.

So the first step is to find the slope.

The formula for finding the slope is $m = \dfrac{y_2 - y_1}{x_2 - x_1}$

For example:

Find the equation of a line with given points $2, 4$ and $4, 5$

First, let’s find the slope.

Let’s label the given: $x_1 = 2$, $y_1 = 4$ $x_2 = 4$, $y_2 = 5$ $m = \dfrac{y_2 - y_1}{x_2 - x_1}$ $m = \dfrac{5 - 4}{4 - 2}$ $m = \dfrac{1}{2}$

So now, we can find the equation of a line using the slope intercept form or the point slope form.

Let’s do the slope intercept form first. $y = mx + b$ $y = \dfrac{1}{2}x + b$

Now, you can substitute any of the paired coordinates but not both.

I’m going to use the second pair of coordinates $x_2 = 4$, $y_2 = 5$ $5 = \dfrac{1}{2} (4) + b$

Now, let’s solve for $b$ $5 = 2 + b$ $5 - 2 = 2 - 2 + b$ $3 = b$

Now, we know what the y-intercept is and the slope.

So the equation $y = mx + b$ becomes $y = \dfrac{1}{2}x + 3$ Now, let’s solve using the point-slope form. $y - y_1 = m (x - x_1)$

Here, we can choose which pair to use as coordinates.

So let me choose the first set of coordinates $x_1 = 2$, $y_1 = 4$

Also, we already know what the slope is $m = \dfrac{1}{2}$

Now, let’s solve $y - 4 = \dfrac{1}{2} (x - 2)$ $y - 4 = \dfrac{1}{2}x - 1$

Let’s get $y$ by itself by adding $4$ on both sides. $y - 4 + 4 = \dfrac{1}{2}x - 1 + 4$ $y = \dfrac{1}{2}x + 3$