This content is licensed under Creative Commons Attribution/Share-Alike License 3.0 (Unported). That means you may freely redistribute or modify this content under the same license conditions and must attribute the original author by placing a hyperlink from your site to this work https://planetcalc.com/8110/. Also, please do not modify any references to the original work (if any) contained in this content.
These online calculators find the equation of a line from 2 points.
First calculator finds the line equation in slope-intercept form, that is, . It also outputs slope and intercept parameters and displays line on a graph.
Second calculator finds the line equation in parametric form, that is, . It also outputs direction vector and displays line and direction vector on a graph.
A bit of theory can be found below the calculators.
Slope-intercept line equation
Let's find slope-intercept form of line equation from the two known points and .
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
And from there
Note that b can be expressed like this
So, once we have a, it is easy to calculate b simply by plugging or to the expression above.
Parametric line equations
Let's find out parametric form of 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 to , our parametric equations will be
Note that if , then and if , then