Point Slope or Slope Intercept ?
There are a few different ways to write the equation of line .
Point Slope Form is better
Point slope form requires fewer steps and fewer calculations overall. This page will explore both approaches. You can click here to see a side by side comparison of the 2 forms.
In the last lesson, I showed you how to get the equation of a line given a point and a slope using the formula
Anytime we need to get the equation of a line, we need two things
| a point |
| a slope |
ALWAYS!
So, what do we do if we are just given two points and no slope?
No problem -- we'll just use the two points to pop the slope using this guy:
Check it out:
Let's find the equation of the line that passes through the points
This one's a two-stepper...
STEP 1: Find the slope
If you're seeing this message, it means we're having trouble loading external resources on our website.
If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.
You can find an equation of a straight line given two points laying on that line. However, there exist different forms for a line equation. Here you can find two calculators for an equation of a line:
-
first calculator finds the line equation in slope-intercept form, that is,
It also outputs slope and intercept parameters and displays the line on a graph. - second calculator finds the line equation in parametric form, that is,
It also outputs a direction vector and displays line and direction vector on a graph.
Also, the text and formulas below the calculators describe how to find the equation of a line from two points manually.
Calculation precision
Digits after the decimal point: 2
Calculation precision
Digits after the decimal point: 2
How to find the equation of a line in slope-intercept form
Let's find slope-intercept form of a line equation from the two known points
We need to find slope a and intercept b.
For two known points we have two equations in respect to a and b
Let's subtract the first from the second
Note that b can be expressed like this
So, once we have a, it is easy to calculate b simply by plugging
Finally, we use the calculated a and b to write the result as
Equation of a vertical line
Note that in the case of a vertical line, the slope and the intercept are undefined because the line runs parallel to the y-axis. The line equation, in this case, becomes
Equation of a horizontal line
Note that in the case of a horizontal line, the slope is zero and the intercept is equal to the y-coordinate of points because the line runs parallel to the x-axis. The line equation, in this case, becomes
How to find the slope-intercept equation of a line example
Problem: Find the equation of a line in the slope-intercept form given points (-1, 1) and (2, 4)
Solution:
- Calculate the slope a:
- Calculate the intercept b using coordinates of either point. Here we use the coordinates (-1, 1):
- Write the final line equation (we omit the slope, because it equals one):
And here is how you should enter this problem into the calculator above: slope-intercept line equation example
Parametric line equations
Let's find out parametric form of a line equation from the two known points and .
We need to find components of the direction vector also known as displacement vector.
This vector quantifies the distance and direction of an imaginary motion along a straight line from the first point to the second point.
Once we have direction vector from
Note that if
Equation of a vertical line
Note that in the case of a vertical line, the horizontal displacement is zero because the line runs parallel to the y-axis. The line equations, in this case, become
Equation of a horizontal line
Note that in the case of a horizontal line, the vertical displacement is zero because the line runs parallel to the x-axis. The line equations, in this case, become
How to find the parametric equation of a line example
Problem: Find the equation of a line in the parametric form given points (-1, 1) and (2, 4)
Solution:
- Calculate the displacement vector:
- Write the final line equations: