Equation of a Line
In Basic 7, we learnt about the rule of a relation. For instance, consider the ordered pairs below:
\[(1, 3), (2, 5), (3, 7), (4, 9), (5, 11)\]
You would say that the rule of the relation is "the sum of twice \(x\) and 1", or "two times \(x\) added to 1," in words, and in algebra:
\[y = 2x + 1\]
Slope-Intercept Form
This rule of the relation is also known as the equation of the line. The equation of any line can be written in the form:
\[y = mx + c\]
Where:
The formular above is termed the slope-intercept form of the equation of a line, as it contains the slope (also known as the gradient, m) and the y-intercept (c) of the given line.
When the slope-intercept form of the equation is given, we can use it to find the set of all the possible coordinates on the path of the line.
Consider the examples below:
Example 1
a. Find the equation of a line with slope 2 and y-intercept -3.
b. Use the equation to find the value of y, when x is 4.
Solution
a. slope \(\Rightarrow\) gradient, \(m=2\)
\(\hspace{0.6cm}y-intercept \Rightarrow c= -3\)
\(\hspace{0.5cm}\) Gradient of a line is given as: \(y=mx+c\)
\(\hspace{0.5cm}\) Subtituting \(m\) and \(c\)
\(\hspace{0.6cm} \Rightarrow y=2x-3\)
\(\hspace{0.6cm} \therefore\) the equation of the line is \(y=2x-3\)
b. Equation of the line \( \Rightarrow y=2x-3\)
\(\hspace{0.6cm} when \ x=4\)
\(\hspace{0.6cm} \Rightarrow y=2(4)-3\)
\(\hspace{0.6cm} \Rightarrow y=8-3\)
\(\hspace{0.6cm} \Rightarrow y=5\)
\(\hspace{0.6cm} \therefore\) when \(x=4\), \(y=5\)
Example 2
Find the equation of a line in slope-intercept form having y-intercept \(\frac{7}{2}\) and slope \(-\frac{5}{2}\)
Solution
slope \(\Rightarrow\) gradient, \(m= -\frac{5}{2}\)
y-intercept, \(c=\frac{7}{2}\)
Gradient of a line is given as: \(y=mx+c\)
Subtituting \(m\) and \(c\)
\(\Rightarrow y=-\frac{5}{2}x+\frac{7}{2}\)
\(\therefore\) the equation of the line is \(y=-\frac{5}{2}x+\frac{7}{2}\)
Example 3
Find the equation of a line with slope \(\frac{1}{2}\) and y-intercept 4.
Solution
slope \(\Rightarrow\) gradient, \(m= \frac{1}{2}\)
y-intercept, \(c=4\)
Gradient of a line is given as: \(y=mx+c\)
Subtituting \(m\) and \(c\)
\(\Rightarrow y=\frac{1}{2}x+4\)
\(\therefore\) the equation of the line is \(y=\frac{1}{2}x+4\)
The Point-Slope Form
We learnt in our lesson on gradient of a line that to be able to draw a line, you need either two points or one point and a gradient.
When given one point (or coordinate), say (\(x_1, y_1\)) and a gradient, \(m\), we use the point-slope form of the equation of a straight line to find the equation of the line.
The point-slope form is given as below:
\[y-y_1 = m\left( x-x_1 \right)\]
Where:
\(x_1 \Rightarrow \) the \(x\) component of the point given.
\(y_1 \Rightarrow\) the \(y\) component of the point given.
\(m \Rightarrow \) the gradient of the line.
Notice how the formular looks similar to the formular for finding the gradient of a line?
This is because, the point-slope form of the equation of a line is actually derived from the formular for finding the gradient of a line.
\[m = \frac{y_2 - y_1}{x_2-x_1}\]
Watch the video below to see why that is true:
Let's now look at some questions that require the use of the point-slope form of the equation of a line.
Example 1
Find the equation of a line with the slope \(\frac{2}{3}\) that passes through the point \((3, -1)\)
Solution
Point given \(\Rightarrow \ \left(3, -1\right)\)
slope \(\Rightarrow\) gradient, \(m = \frac{2}{3}\)
Equation of a line is given as:
\(y - y_1 = m\left(x- x_1\right)\)
\(y - (-1) = \frac{2}{3}\left(x- 3\right)\)
\(\hspace{1cm} y + 1 = \frac{2}{3}x- 2\)
\(\hspace{2cm} y = \frac{2}{3}x- 2 - 1 \)
\(\hspace{2cm} y = \frac{2}{3}x- 3 \)
\(\therefore\) the equation of the line is \(y = \frac{2}{3}x- 3 \)
Example 2
Find the equation of a line that passes through the point \((3, -7)\) and has the slope \(m = \frac{5}{4}\)
Solution
Point given \(\Rightarrow \ \left(3, -7\right)\)
slope \(\Rightarrow\) gradient, \(m = \frac{5}{4}\)
Equation of a line is given as:
\(y - y_1 = m\left(x- x_1\right)\)
\(y - (-7) = \frac{5}{4}\left(x- 3\right)\)
\(\hspace{1cm} y + 7 = \frac{5}{4}x- \frac{15}{4}\)
\(\hspace{2cm} y = \frac{5}{4}x- \frac{15}{4} - 7 \)
\(\hspace{2cm} y = \frac{5}{4}x- \left(\frac{15}{4} + 7\right) \)
\(\hspace{2cm} y = \frac{5}{4}x- \left(\frac{1(15) + 4(7)}{4}\right) \)
\(\hspace{2cm} y = \frac{5}{4}x- \left(\frac{15 + 28}{4}\right) \)
\(\hspace{2cm} y = \frac{5}{4}x- \frac{43}{4} \)
\(\therefore\) the equation of the line is \(y = \frac{5}{4}x- \frac{43}{4} \)
Example 3
Find the equation of a line which passes through the points \((5, 4)\) and \((-10, -2)\)
Solution
Points given \(\Rightarrow \ \left(5, 4\right)\) and \(\left(-10, -2\right)\)
Gradient, \(m = \frac{y_2 - y_1}{x_2 - x_1}\)
\(\hspace{2.4cm} m = \frac{4 - (-2)}{5 - (-10)}\)
\(\hspace{2.4cm} m = \frac{4 + 2}{5 + 10}\)
\(\hspace{2.4cm} m = \frac{6}{15}\)
\(\hspace{2.4cm} m = \frac{2}{5}\)
Equation of a line:
\(\Rightarrow y - y_1 = m\left(x- x_1\right)\)
Using \(\left(5, 4\right)\) and \(m=\frac{2}{5}\)
\(\Rightarrow y - 4 = \frac{2}{5}\left(x - 5\right)\)
\(\Rightarrow y - 4 = \frac{2}{5}x - \frac{2}{5} \times 5\)
\(\Rightarrow y - 4 = \frac{2}{5}x - 2\)
\(\hspace{1.8cm} y = \frac{2}{5}x - 2 + 4\)
\(\hspace{1.8cm} y = \frac{2}{5}x + 2\)
\(\therefore\) the equation of the line is \(y = \frac{2}{5}x + 2 \)
Example 4
Write the equation \(5x + 4y - 3 = 0\) in the form \(y = mx + c\). State the gradient and the y-intercept.
Solution
\(5x + 4y - 3 = 0\)
\(4y - 3 = -5x\)
\(\frac{4y}{4} = \frac{-5x}{4} + \frac{3}{4}\)
\(y = \frac{-5}{4}x + \frac{3}{4}\)
Comparing \(y = mx + c\) and \(y = \frac{-5}{4}x + \frac{3}{4}\)
\(\Rightarrow\) gradient, \(m = \frac{-5}{4}\) and
\(\Rightarrow\) y-intercept, \(c = \frac{3}{4}\)
\(\therefore\) the gradient is \(\frac{-5}{4}\) and the y-intercept is \(\frac{3}{4}\)