So far we have two different forms of the equation for a straight line.
We have:
$y=mx+b$y=mx+b (gradient intercept form)
$ax+by+c=0$ax+by+c=0 (general form)
What if the information given is a point on the line and the gradient of the line?
We have a couple of options.
We could use this information and construct an equation in gradient intercept form.
Find the equation of a line that passes through the point $\left(2,-8\right)$(2,−8) and has gradient of $-2$−2.
Think: We can instantly identify the $m$m value in $y=mx+b$y=mx+b: $m=-2$m=−2
If the point $\left(2,-8\right)$(2,−8) is on the line, then it will satisfy the equation.
Do: $y=mx+b$y=mx+b
$y=-2x+b$y=−2x+b
To find $b$b: we can substitute the values of the point $\left(2,-8\right)$(2,−8)
$-8=-2\times2+b$−8=−2×2+b and we can now solve for $b$b.
$-8=-4+b$−8=−4+b
$-4=b$−4=b
So the equation of the line is $y=-2x-4$y=−2x−4
Using the same values as the question in Method 1, we know that the gradient of the line is $-2$−2. We also know a point on the line, $\left(2,-8\right)$(2,−8).
Now, apart from this point there are infinitely many other points on this line, and we will let $\left(x,y\right)$(x,y) represent each of them.
Well, since $\left(x,y\right)$(x,y) and $\left(2,-8\right)$(2,−8) are points on the line, then the gradient between them will be $-2$−2.
We know that to find the gradient given two points, we use:
$m=\frac{y_2-y_1}{x_2-x_1}$m=y2−y1x2−x1
Let's apply the gradient formula to $\left(x,y\right)$(x,y) and $\left(2,-8\right)$(2,−8):
$m=\frac{y-\left(-8\right)}{x-2}$m=y−(−8)x−2
But we know that the gradient of the line is $-2$−2. So:
$\frac{y-\left(-8\right)}{x-2}=-2$y−(−8)x−2=−2
Rearranging this slightly, we get:
$y-\left(-8\right)=-2\left(x-2\right)$y−(−8)=−2(x−2)
You may be thinking that we should simplify the equation, and of course if you do you should get $y=-2x-4$y=−2x−4 What we want to do though, is generalise our steps so that we can apply it to any case where we're given a gradient $m$m, and a point on the line $\left(x_1,y_1\right)$(x1,y1).
In the example above, the point on the line was $\left(2,-8\right)$(2,−8). Let's generalise and replace it with $\left(x_1,y_1\right)$(x1,y1). We were also given the gradient $-2$−2. Let's generalise and replace it with $m$m.
$y-\left(-8\right)=-2\left(x-2\right)$y−(−8)=−2(x−2) becomes $y-y_1=m\left(x-x_1\right)$y−y1=m(x−x1)
Given a point on the line $\left(x_1,y_1\right)$(x1,y1) and the gradient $m$m, the equation of the line is:
$y-y_1=m\left(x-x_1\right)$y−y1=m(x−x1)
We know that the gradient formula for $m$m is
$m=\frac{y_2-y_1}{x_2-x_1}$m=y2−y1x2−x1
In this case, our ($x_2$x2, $y_2$y2) is any of the points $\left(x,y\right)$(x,y) and ($x_1$x1, $y_1$y1) is the point we are given.
So,
$m$m | $=$= | $\frac{y_2-y_1}{x_2-x_1}$y2−y1x2−x1 |
$m$m | $=$= | $\frac{y-y_1}{x-x_1}$y−y1x−x1 |
$m\left(x-x_1\right)$m(x−x1) | $=$= | $y-y_1$y−y1 |
$y-y_1$y−y1 | $=$= | $m\left(x-x_1\right)$m(x−x1) |
We call this the point gradient formula, because when we know a point and the gradient using this rule we can easily get the equation of that line.
Find the equation of a line that passes through the point $\left(-4,3\right)$(−4,3) and has gradient of $5$5.
$y-y_1$y−y1 | $=$= | $m\left(x-x_1\right)$m(x−x1) |
$y-3$y−3 | $=$= | $5\left(x-\left(-4\right)\right)$5(x−(−4)) |
$y-3$y−3 | $=$= | $5\left(x+4\right)$5(x+4) |
$y-3$y−3 | $=$= | $5x+20$5x+20 |
$y$y | $=$= | $5x+23$5x+23 |
A much tidier method than the method used in the previous example!
Let's have a look at some worked solutions.
A line passes through Point $A$A $\left(8,2\right)$(8,2) and has a gradient of $2$2. Find the value of the $y$y-intercept of the line, denoted by $b$b.
Hence, write the equation of the line in gradient-intercept form.
A line passes through the point $A$A$\left(-4,3\right)$(−4,3) and has a gradient of $-9$−9. Using the point-gradient formula, express the equation of the line in gradient intercept form.