How to Find a Line's Equation
We'll often need to find the equation of a line given two points it passes through.
For instance, we may be asked to find the equation of the line passing through the points:
Remember that the equation of a line is written: \[y = mx+c\] Where:
- \(m\) is the gradient (also called slope) it equals the amount the line goes-up (or down if \(m<0\)) for each unit-step in the positive \(x\) direction.
- \(c\) is the \(y\)-intercept. Its value equals to the \(y\)-coordinate of the point at which the line crosses/cuts the \(y\)-axis.
To learn how to find a line's equation, the method is explained in a step-by-step tutorial. The method is then written for us and a detailed example given.
Finally, we work our way through a practice exercise for which each solution is explained in a video tutorial.
Tutorial 1
Method 1: finding the equation of a line
Given two points with coordinates:
- Step 1: calculate the gradient \(m\) using the gradient formula: \[m = \frac\]
- Step 2: find the \(y\)-intercept \(c\).
Do this substituting the coordinates of either of the two points we have, \(\begin x_1,y_1\end\) or \(\begin x_2,y_2\end\), into the line equation \(y=mx+c\) and solving for \(c\).
Example
Find the equation of the line passing through the two points:
Solution
Looking at the line passing through the two points \(\begin - 1, -5 \end\) and \(\begin4,5 \end\), we can see that the line is going upwards, as we go from left to right, this tells us that the gradient we're looking for should be positive!
We can also see that the \(y\)-intercept seems to equal to \(3\).
We now use our two-step method to find this line's equation:
If we call point \(1\) the point \(\begin-1,-5\end\), then \(x_1 = -1\) and \(y_1 = -5\) and calling point \(2\) the point \(\begin 4,5\end\) so that \(x_2 = 4\) and \(y_2 = 5\), then the formula becomes: \[\begin m & = \frac\\ & = \frac\\ & = \frac\\ & = \frac\\ m & = 2 \end\] Since the gradient is \(m=2\), at this stage we can state that the equation must look something like: \[y = 2x+c\] All we need to find now is the \(y\)-intercept \(c\).
- Step 2: find the \(y\)-intercept \(c\).
To do this we choose either of the two points, \(\begin - 1, -5 \end\) or \(\begin4,5 \end\) (it doesn't matter which one) and plug its coordinates into the line equation \(y=mx+c\).
Let's say we choose the point \(\begin4,5 \end\) then we replace \(x\) by \(4\) and \(y\) by \(5\) in the line equation \(y=2x+c\).
Exercise
- Consider the two points \(\begin2,-4\end\) and \(\begin7,6\end\).
- Draw the line passing through these two points.
- Find the gradient of the line passing through these two points.
- Find the \(y\)-intercept of the line and state the line's equation.
- Draw the line passing through these two points.
- Find the gradient of the line passing through these two points.
- Find the \(y\)-intercept of the line and state the line's equation.
- Draw the line passing through these two points.
- Find the gradient of the line passing through these two points.
- Find the \(y\)-intercept of the line and state the line's equation.
Answers w/out Working
Answers with Working
Answers Without Working
- The gradient is \(m=2\).
- The \(y\)-intercept is \(c = -8\) and the line's equation is: \[y = 2x - 8\]
- The gradient is \(m = -1\).
- The \(y\)-intercept is \(c = 4\) and the line's equation is: \[y = -x+4\]
- The gradient is \( m = 3\).
- The \(y\)-intercept is \(c = -1\) and the line's equation is: \[ y = 3x - 1\]
Answers with Working
Select the question number you'd like to see the working for:
Qu. 1 Qu. 2 Qu. 3 Qu. 4 Qu. 5
Answers w/out Working
Answers with Working
Solution Without Working
Solution With Working
END OF EXERCISE 2-->
Tutorial 2
Method 2: finding the equation of a line
Given two points with coordinates:
- Step 1: calculate the gradient \(m\) using the gradient formula: \[m = \frac\]
- Step 2: find the \(y\)-interept.
Do this by making \(y\) the subject in either: \[y - y_1 = m\beginx - x_1 \end\] or \[y - y_2 = m\beginx - x_2 \end\] which ever one you choose does not matter.
Exercise 2
- Consider the points \(\begin0,12\end\) and \(\begin5,-3\end\).
- Plot these two points on an \(xy\) grid and draw the line passing through these two points.
- Find the equation of the line passing through these two points.
- Plot these two points on an \(xy\) grid and draw the line passing through these two points.
- Find the equation of the line passing through these two points.
- Plot these two points on an \(xy\) grid and draw the line passing through these two points.
- Find the equation of the line passing through these two points.
- Plot these two points on an \(xy\) grid and draw the line passing through these two points.
- Find the equation of the line passing through these two points.
Answers w/out Working
Answers with Working
Answers Without Working
- This line's equation is \(y = -3x+12\)
- This line's equation is \(y = 2x+12\)
- This line's equation is \(y = 3x+2\)
- This line's equation is \(y = \frac+4\), which can also be written \(y = 0.5x + 4\).
- This line's equation is \(y = 4x\)