Equation of a Line Passing through Two Points
The equation of a line is an algebraic method to represent a set of points that together form a line in a coordinate system. The various points that together form a line in the coordinate axis can be represented as a set of variables (x, y) in order to form an algebraic equation, also referred to as the equation of a line. By using the equation of a line, it is possible to find whether a given point lies on the line.
The equation of any line is a linear equation having a degree of one. Let us read through the entire article to understand more about the different forms of an equation of a line and how we can determine the equation of a line.
A line segment can be defined as a connection between two points. Any two points, in two-dimensional geometry, can be connected using a line segment or simply, a straight line. The equation of a line can be found in the following three ways.
Slope Intercept Method
Point Slope Method
Standard Method
When two points that lie on a particular line are given, usually, the point-slope method is followed.
The equation of a line is \[y - y_{1} = m(x - x_{1})\] where \[y_{1}\] is the coordinate of the Y-axis, m is the slope, and \[x_{1}\] is the coordinate on the X-axis.
Finding the Slope of the Line Passing through Two Given Points
The slope or gradient of a line is the changing height of the line from the X-axis. For every unit of X, a change in Y on the line is known as the slope of a line.
(Image will be Uploaded Soon)
To calculate the slope, the formula used is \[m = \frac{y_{2} - y_{1}}{x_{2} - x_{1}}\].
Here, the points are (2,5) and (6,7).
So, comparing the point to the general notation of coordinates on a Cartesian plane, i.e., (x, y), we get \[x_{1}, y_{1} = (2, 5) and x_{2}, y_{2} =(6, 7) \]
Substituting the values into the formula,
\[m = \frac{7 - 5}{6 - 2}\]
\[m = \frac{2}{3}\]
Did You Know?
What happens if we interchange the values of \[x_{1}, y_{1} and x_{2}, y_{2}\]?
The value of m remains unchanged. The positioning of the coordinates does not affect the value of the slope.
Taking the same example as above but interchanging the values of \[x_{1}, y_{1} and x_{2}, y_{2}\], we get \[x_{1}, y_{1} = (6,7) and x_{2}, y_{2} = (2,5)\].
\[m = \frac{5 - 7}{ 2 - 6}\]
\[m = \frac{-2}{-3} = \frac{2}{3}\]
Hence, any one of the two coordinates can be used as \[ x_{1}, y_{1} \] and the other as \[ x_{2}, y_{2} \].
Finding the Equation of the Line Passing through Two Given Points
Steps to find the equation of a line passing through two given points is as follows:
Find the slope/gradient of the line.
Substitute the values of the slope and any one of the given points into the formula.
Simplify to obtain an equation resembling the standard equation of the line, i.e., Ax + By + C = 0, where A, B, and C are constants.
Taking the above example, where \[x_{1}, y_{1} and x_{2}, y_{2}\], we get \[x_{1}, y_{1} = (2,5) and x_{2}, y_{2} = (6,7)\] and the slope is calculated as \[m = \frac{2}{3}\], substitute the value of m and any one point in the formula \[y - y_{1} = m(x - x_{1})\].
\[y - y_{1} = m(x - x_{1})\]
\[y - 5 = \frac{2}{3} (x - 2)\]
Cross-multiply and simplify:
\[y - 5 = \frac{2}{3} (x - 2)\]
\[ \Rightarrow 3 (y - 5) = 2 (x - 2)\]
\[ \Rightarrow 3y - 15 = 2x - 4\]
\[ \Rightarrow 3y - 2x = 15 - 4\]
\[ \Rightarrow 3y - 2x = 11\]
The same equation can be expressed in slope-intercept form by making the equations in terms of y as shown below.
\[ \Rightarrow 3y - 2x = 11\]
\[ \Rightarrow 3y = 2x + 11\]
\[ \Rightarrow y = \frac{2}{3}x + \frac{11}{3}\]
Solved Examples
1. Find the equation of the line passing through the points (2,3) and (-1,0).
For calculating the slope, the formula used is \[m = \frac{y_{2} - y_{1}}{x_{2} - x_{1}}\].
Here, the points are (2,3) and (-1,0)
So, comparing the point to the general notation of coordinates on a Cartesian plane, i.e., (x, y), we get (x1,y1) = (2,3) and (x2,y2) = (-1,0).
Substituting the values into the formula,
\[ \Rightarrow m = \frac{0 - 3}{-1 - 2}\].
\[ \Rightarrow m = \frac{-3}{-3}\].
\[ \Rightarrow m = 1 \].
Substitute the value of m and any coordinate into the formula \[y - y_{1} = m(x - x_{1})\].
\[y - y_{1} = m(x - x_{1})\]
\[y - 0 = 1(x - (-1)\]
Simplify the equations:
\[y - 0 = 1(x - (-1)\]
\[ \Rightarrow y = x + 1 \]
\[ \Rightarrow y - x = 1 \]
The same equation can be expressed in slope-intercept form by making the equations in terms of y.
y = x + 1
The equation of the line passing through the points (2,3) and (-1,0) is y = x + 1 or y - x = 1.
2. Find the Equation of the Line Passing through the Point (1,3) and Having a Slope \[\frac{1}{3}\].
Substitute the value of m and the coordinate into the formula \[y - y_{1} = m(x - x_{1})\].
\[y - y_{1} = m(x - x_{1})\]
\[ \Rightarrow y - 3 = m(x - x_{1})\]
\[ \Rightarrow y - 3 = \frac{1}{3}(x - 1)\]
Cross multiply and simplify the equations:
\[ \Rightarrow y - 3 = \frac{1}{3}(x - 1)\]
\[ \Rightarrow 3(y - 3) = 1(x - 1)\]
Simplify the equations further:
\[ \Rightarrow 3(y - 3) = 1(x - 1)\]
\[ \Rightarrow 3y - 9 = x - 1\]
\[ \Rightarrow 3y - x = 8\]
The same equation can be expressed in slope-intercept form by making the equations in terms of y.
\[ \Rightarrow 3y - x = 8\]
\[ \Rightarrow 3y = x + 8\]
\[ \Rightarrow y = \frac{1}{3}x + \frac{8}{3} \]
The equation of the line passing through the point (1,3) and having a slope of \[\frac{1}{3}\] is \[ \Rightarrow 3y - x = 8 or \frac{1}{3}x + \frac{8}{3}\].
Conclusion
The equation of a line can be easily understood as a single representation for numerous points on the same line. The equation of a line has a general form, that is, ax + by + c = 0, and it must be noted that any point on this line satisfies this equation. There are two absolutely necessary requirements for forming the equation of a line, which are the slope of the line and any point on the line.
FAQs on Equation Line
1. Can we find the equation of a line, if only one coordinate is given? If not, what additional inputs are required to find the equation of the line passing through the given point?
Finding the equation of the line when only one coordinate is given is not possible because when a point is existing in space, an infinite number of lines can be passing through it. So, finding the one particular equation will be like finding a needle in a haystack.
For finding the correct or desired equation, we must have either the slope of the line or the second set of coordinates. The slope will help us get an idea about the height of the line and the other coordinate can give an estimate about the length of the line.
Moreover, as the formula to calculate the equation of the line is known, \[ y - y_{1} = m (x - x_{1})\], it can be seen that the equation of the line can be found with any two of the factors mentioned.
2. How can we find the equation of a line passing through two points in 3D?
Like in the two-dimensional plane, we need a slope and a point through which the line passes, in a three-dimensional plane, a point through which the line passes is needed, along with a direction vector to entail the direction of the line.
In two-dimensional geometry, the slope gives the depth or height of the line. Similarly, in three-dimensional geometry, the idea of the direction of the line whose equation has to be derived is given by the direction vector.
The formula to find the equation passing through two points in 3d is \[ \frac{x - x_{1}}{l} = \frac{y - y_{1}}{m} = \frac{z - z_{1}}{n}\], where the direction vector is (l, m, n) and the point through which the line is passing is \[(x_{1}, y_{1}, z_{1})\].
3. How can we determine the slope using the equation of a line?
If a line has an equation ax + by + c = 0, then its slope will be \[ -(\frac{a}{b}) \]. Now the given equation of this line can easily be converted into the slope-intercept form, which we have discussed previously. The coefficient of the x-axis will be the slope of this line. Let us understand this better by using an example. If we are to obtain the slope of a line having an equation 5x - 6y + 11 = 0, then we can use the mentioned formula to determine the slope to be \[ -(\frac{5}{-6}) \], which is 5/6.