Equations of straight lines
In a nutshell
You can find out the equation of a straight line, y=mx+c, using gradients and points. The equation of a straight line can be found by using a pair of coordinates (x1,y1) and the gradient m. You can use an equation, y−y1=m(x−x1), to find the exact equation for y=mx+c. You can also use equations to find where lines intersect.
Finding y=mx+c using the gradient and a point
If you know the gradient of a line, m, and you know a point on that line, (x1,y1), then you can work out the equation of that line. All you have to do is use the formula y−y1=m(x−x1). This will allow you find the line's equation.
Procedure
1. | Label the gradient and the coordinates of the point on the line. |
2. | Substitute into the equation y−y1=m(x−x1). |
3. | Solve for y=mx+c. |
Example 1
A line has a point (3,4) and a gradient of 2. Find the equation of the line in the form of y=mx+c.
Label the gradient and the coordinates.
m=2, x1=3, y1=4
Substitute y1, m and x1 in the equation y−y1=m(x−x1).
y−4=2(x−3)
Rearrange to give y=mx+c.
y−4=2x−6y=2x−2
Finding y=mx+c using two points
To find the equation of a line using two points (x1,y1) and (x2,y2), first you find the gradient m using the equation from the previous lesson, m=x2−x1y2−y1. Once you find out m, you can then take the (x1,y1) coordinates and solve as above.
Procedure
1. | Label the coordinates (x1,y1) and (x2,y2).
|
2. | Find out the gradient m.
|
3. | Rearrange for y=mx+c.
|
Example 2
A line intersects two points, P1 with coordinates (−2,5) and P2 with coordinates (−6,1). Find the equation of the line in the format y=mx+c.
Label both points.
x1=−2,y1=5,x2=−6,y2=1
Find the gradient m.
mmmm=x2−x1y2−y1=−6−(−2)1−5=−4−4=1
Solve for y=mx+c.
y−y1y−5y=m(x−x1)=1(x−(−2))=x+2+5y=x+7,
Find the intersection between two lines
Finally, sometimes you will be given two line equations and asked to find a point where those lines intersect. This can be solved like simultaneous equations, where you substitute x or y in one equation with an answer from the other. This works mathematically since the point where those lines intersect means that the x and y values in both equations must be equal.
Example 3
The lines y=2x+5 and 5x−2y+12=0 intersect at the point A. Find the coordinates of A.
Substitute y in one equation.
5x−2y+122x+55x−2(2x+5)+12=0=y=0
Solve for x
5x−4x−10+12x+2x=0=0=−2
Use this x value to solve for the corresponding y value to find point A.
yyyy=2x+5=2(−2)+5=−4+5=1∴ A=(−2,1)