Find the equation with slope and given point

The "point-slope" form of the equation of a straight line is:

y − y1 = m(x − x1)

The equation is useful when we know:

  • one point on the line: (x1,y1)
  • and the slope of the line: m,

and want to find other points on the line.

Have a play with it first (move the point, try different slopes):

Now let's discover more.

What does it stand for?

Find the equation with slope and given point

(x1, y1) is a known point

m is the slope of the line

(x, y) is any other point on the line

Making sense of it

It is based on the slope:

Find the equation with slope and given point

Slope m  =   change in y change in x  =   y − y1 x − x1

Starting with the slope:

we rearrange it like this:

to get this:

 
Find the equation with slope and given point

So, it is just the slope formula in a different way!

Now let us see how to use it.

Example 1:

Find the equation with slope and given point

slope "m"  =  31  =  3

y − y1 = m(x − x1)

We know m, and also know that (x1, y1) = (3,2), and so we have:

y − 2 = 3(x − 3)

That is a perfectly good answer, but we can simplify it a little:

y − 2 = 3x − 9

y = 3x − 9 + 2

y = 3x − 7

Example 2:

m = −3 1 = −3

y − y1 = m(x − x1)

We can pick any point for (x1, y1), so let's choose (0,0), and we have:

y − 0 = −3(x − 0)

Which can be simplified to:

y = −3x

Example 3: Vertical Line

Find the equation with slope and given point

What is the equation for a vertical line?
The slope is undefined!

In fact, this is a special case, and we use a different equation, like this:

x = 1.5

Every point on the line has x coordinate 1.5,
that’s why its equation is x = 1.5

What About y = mx + b ?

You may already be familiar with the "y=mx+b" form (called the slope-intercept form of the equation of a line).

It is the same equation, in a different form!

The "b" value (called the y-intercept) is where the line crosses the y-axis.

So point (x1, y1) is actually at (0, b)

and the equation becomes:

Start withy − y1 = m(x − x1)

(x1, y1) is actually (0, b):y − b = m(x − 0)

Which is:y − b = mx

Put b on other side:y = mx + b

This calculator will find the equation of a line (in the slope-intercept, point-slope, and general forms) given two points or the slope and one point, with steps shown.

Related calculators: Slope Calculator, Parallel and Perpendicular Line Calculator

Solution

Your input: find the equation of a line given two points $$$P=\left(-4, 7\right)$$$ and $$$Q=\left(1, 2\right)$$$.

The slope of a line passing through the two points `P=(x_1, y_1)` and `Q=(x_2, y_2)` is given by `m=(y_2-y_1)/(x_2-x_1)`.

We have that $$$x_1=-4$$$, $$$y_1=7$$$, $$$x_2=1$$$, $$$y_2=2$$$.

Plug the given values into the formula for slope: $$$m=\frac{\left(2\right)-\left(7\right)}{\left(1\right)-\left(-4\right)}=\frac{-5}{5}=-1$$$.

Now, the y-intercept is `b=y_1-m*x_1` (or `b=y_2-m*x_2`, the result is the same).

$$$b=7-\left(-1\right) \cdot \left(-4\right)=3$$$.

Finally, the equation of the line can be written in the form `y=mx+b`.

$$$y=-x+3$$$.

Answer:

The slope of the line is $$$m=-1$$$.

The equation of the line in the slope-intercept form is $$$y=-x+3$$$.

The equation of the line in the point-slope form is $$$y - 7 = - (x + 4)$$$.

The equation of the line in the point-slope form is $$$y - 2 = - (x - 1)$$$.

The general equation of the line is $$$x + y - 3 = 0$$$.