y=mx+c
In a nutshell
y=mx+c is the equation for a straight line, where m is the gradient of the line and c is the y-axis intercept. m tells you how steep a line is by tracking the change in y over the change in x. c tells you where the line intercepts the y-axis. This is a handy equation because it allows you to learn a lot about a line with only a pair of coordinates. Once you understand it intuitively, you can plot out lines without graph paper.
The gradient formula
A gradient tells you how steep a line is between two points (x1,y1) and (x2,y2). It's calculated as:
m=ΔxΔy=x2−x1y2−y1
Intuitively, you can see that a greater change in y or x would lead to a steeper line on paper. Therefore, a higher m value means a greater gradient.
Three lines with the equations y=x+4, y=5x+4 and y=−5x+4.
Once you have the coordinates of a line, you can work out the gradient easily.
Procedure
1.
| Assign coordinates to (x1,y1) and (x2,y2).
|
2. | Plug those numbers into the formula for m. |
3. | Solve for m.
|
Example 1
Find the gradient for a line between points (2,3) and (6,7).
Assign values for (x1,y1) and (x2,y2).
x1=2, y1=3, x2=6 and y2=7
Substitute into the formula for m and solve.
mmm=x2−x1y2−y1=6−27−3=44
m=1
Working backwards
You can works backwards if you are given just the gradient of a line and some coordinates. This can let you find where a line terminates.
Example 2
A line has coordinates (4,8) and (−1,a). The gradient of the line is −2.5. What is the value of coordinate a?
Assign values to (x1,y1) and (x2,y2)
(4,8)(x1,y1)x1=4,x2m(−1,a)(x2,y2)=−1,y1=8,y2=a=−2.5
Substitute into the formula for m
m−2.5=x2−x1y2−y1=−1−4a−8
Solve for a
−5a−8a=−2.5=12.5+8a=20.5
The y-intercept, c
c is known as the y-intercept. It is the point where the line has an x value of zero. Visually, this is the point where the line hits the y-axis, as the y-axis lies where x=0. To find the intercept from a complete line equation, all you need to do is make x=0, i.e, remove the m and x from the equation.
Three lines with equations y=x+4, y=x+2 and y=x−4.
The x-intercept is needed less often. It is simply where the line hits the x-axis. To find it, you make y=0 and solve accordingly.
Example 3
What is the gradient and the y-intercept of line 3y+9x−12=6?
Rearrange the equation into the form y=mx+c and solve.
3y+9x−123y3yy=6=−9x+12+6=−9x+18=−3x+6m=−3,c=6