The graph of a linear relationship will create a straight line. All linear functions can be written in either of these two common forms:
Gradient intercept form | General form |
---|---|
$y=mx+c$y=mx+c | $ax+by+c=0$ax+by+c=0 |
If we sketch a linear relationship on a plane, the straight line formed will be one of the following types:
Regardless of all different shapes all linear functions have some common characteristics.
All linear functions have at least one intercept. Linear functions might have:
The $x$x-intercept occurs at the point where $y=0$y=0.
The $y$y-intercept occurs at the point where $x=0$x=0.
The gradient (or slope) of a line is a measure of how steep the line is. For a linear function the gradient is constant. That is, as the $x$x-values increase by a constant amount, the $y$y-values also increase (or decrease) by a constant amount. The gradient of a line is defined as the vertical change in the $y$y-coordinates (the 'rise') between two points on the line, divided by the horizontal change in the corresponding $x$x-coordinates (the 'run'). And we can calculate the gradient from any two points $\left(x_1,y_1\right)$(x1,y1), $\left(x_2,y_2\right)$(x2,y2) on a line:
$m$m | $=$= | $\frac{rise}{run}$riserun |
$=$= | $\frac{y_2-y_1}{x_2-x_1}$y2−y1x2−x1 |
The gradient is usually represented by the letter $m$m and has the following properties:
Find the gradient of the line below:
Think: We begin by choosing any two points on the line and use them to create a right-angled triangle, where the line itself forms the hypotenuse of the triangle.
Do: In this case we have chosen the points $\left(-1,0\right)$(−1,0) and $\left(0,2\right)$(0,2). The 'run' (highlighted red) and the 'rise' (highlighted blue) form the sides of the right-angled triangle.
If we start at the left most point, we see that the run is $1$1 and the rise is $2$2. Both values are positive because we move first to the right $1$1 unit, then up $2$2 units. We calculate the gradient as follows:
$\text{Gradient }$Gradient | $=$= | $\frac{\text{rise }}{\text{run }}$rise run |
$=$= | $\frac{2}{1}$21 | |
$=$= | $2$2 |
Remember: the run is how many units we move across from left to right. The rise is how many units we move up (positive) or down (negative).
A gradient of $\frac{2}{1}$21 means move across $1$1, up $2$2 from a starting point.
A gradient of $-\frac{1}{2}$−12 means move across $2$2, down $1$1 from a starting point.
A gradient of $\frac{2}{3}$23 means move across $3$3, up $2$2 from a starting point.
A gradient of $\frac{-3}{5}$−35 means move across $5$5, down $3$3 from a starting point.
On horizontal lines, the $y$y-value is always the same at every point on the line. In other words, there is no rise - it's completely flat.
$A=\left(-4,4\right),B=\left(2,4\right),C=\left(4,4\right)$A=(−4,4),B=(2,4),C=(4,4)
All of the $y$y-coordinates are the same. Every point on the line has a $y$y-value equal to $4$4, regardless of the $x$x-value.
The equation of this line is $y=4$y=4.
Since gradient is calculated by $\frac{\text{rise }}{\text{run }}$rise run and there is no rise (i.e. $\text{rise }=0$rise =0), the gradient of a horizontal line is always zero.
On vertical lines, the $x$x value is always the same for every point on the line.
Let's look at the coordinates of points $A$A, $B$B, and $C$C on this line.
$A=\left(5,-4\right),B=\left(5,-2\right),C=\left(5,4\right)$A=(5,−4),B=(5,−2),C=(5,4)
All of the $x$x-coordinates are the same. Every point on the line has an $x$x-value equal to $5$5, regardless of the $y$y-value.
The equation of this line is $x=5$x=5.
Vertical lines have no "run" (i.e. $\text{run }=0$run =0). If we tried to substitute this into the $\frac{\text{rise }}{\text{run }}$rise run expression, we'd have a fraction with $0$0 as the denominator, which is undefined. So, the gradient of a vertical line is always undefined.
State the gradient and $y$y-value of the $y$y-intercept of the equation, $y=2x+3$y=2x+3
Gradient | $\editable{}$ |
$y$y-value of the $y$y-intercept | $\editable{}$ |
A line has the equation $3x-y-4=0$3x−y−4=0.
Express the equation of the line in gradient-intercept form.
What is the gradient of the line?
What is the $y$y-value of the $y$y-intercept of the line?
What is the gradient of the line going through A $\left(-1,1\right)$(−1,1) and B $\left(5,2\right)$(5,2)?
We have seen we can use a table of values to graph a linear function. In fact, to graph any liner relationship we only need two points that are on the line. We can use any two points from a table of values, or substitute in any two values of $x$x into the equation and solve for the corresponding $y$y-values. Using the intercepts is often the most convenient way to sketch the line.
If we are given the equation of a linear relationship, like $y=3x+5$y=3x+5, then to sketch it we need two points. We can pick any two points we like.
Start by choosing any two $x$x-values - often the $x$x-value of $0$0 is a good choice, as the calculation for $y$y will be simpler. For our example, $y=3x+5$y=3x+5 becomes $y=0+5$y=0+5, and so $y=5$y=5. This gives us the point $\left(0,5\right)$(0,5)
Similarly look for other easy values to calculate such as $1$1, $10$10, or $2$2. Let's choose $x=1$x=1 for our other point. Then for $y=3x+5$y=3x+5 we have $y=3\times1+5$y=3×1+5, and so $y=8$y=8. This gives us the point $\left(1,8\right)$(1,8)
Now we plot the two points and create a line.
A special case of graphing a line from two points is to use the axes intercepts as the given points. This is particularly useful when graphing from a line in the general form, where both the $x$x- and $y$y-intercepts can be found quite efficiently.
For example, consider the line $3y+2x-6=0$3y+2x−6=0.
The $x$x-intercept happens when the $y$y-value is $0$0:
$3y+2x-6$3y+2x−6 | $=$= | $0$0 |
$0+2x-6$0+2x−6 | $=$= | $0$0 |
$2x$2x | $=$= | $6$6 |
$x$x | $=$= | $3$3 |
The $y$y-intercept happens when the $x$x-value is $0$0:
$3y+2x-6$3y+2x−6 | $=$= | $0$0 |
$3y+0-6$3y+0−6 | $=$= | $0$0 |
$3y$3y | $=$= | $6$6 |
$y$y | $=$= | $2$2 |
From here it is pretty straightforward to sketch, we plot the $x$x intercept at $\left(3,0\right)$(3,0) and the $y$y intercept at $\left(0,2\right)$(0,2), and draw the line that passes through both.
Start by plotting the single point that you are given.
Remembering that gradient is a measure of change in the rise per change in run, we can step out one measure of the gradient from the original point given.
A line with gradient $4$4. Move $1$1 unit across and $4$4 units up. | A line with gradient $-3$−3. Move $1$1 unit across and $3$3 units down. | A line with gradient $\frac{1}{2}$12. Move $2$2 units across and $1$1 unit up. |
The point can be any point $\left(x,y\right)$(x,y), or it could be an intercept. Either way, plot the point, step out the gradient and draw your line!
For example, plot the line with gradient $-2$−2 and has $y$y-intercept of $4$4.
First, plot the $y$y-intercept that has coordinates $\left(0,4\right)$(0,4) |
Step out the gradient, ($-2$−2 means $1$1 unit across, $2$2 units down) |
Connect the points and draw the line.
|
Consider the equation $2x-y-2=0$2x−y−2=0
Complete the table of values for this equation:
$x$x | $-1$−1 | $0$0 | $1$1 |
---|---|---|---|
$y$y | $\editable{}$ | $\editable{}$ | $\editable{}$ |
Plot the line on the graph.
What are the coordinates of the $y$y intercept?
$\left(0,\editable{}\right)$(0,)
What are the coordinates of the $x$x intercept?
$\left(\editable{},0\right)$(,0)
What is the $y$y value when $x=-2$x=−2?
Plot the graph of the linear equation $8x+2y-16=0$8x+2y−16=0 by plotting both the $x$x-intercept, labelled $X$X, and the $y$y-intercept, labelled $Y$Y.
Consider the linear equation $y=3x+1$y=3x+1.
State the $y$y-value of the $y$y-intercept of this line.
Using the point $Y$Y as the $y$y-intercept, sketch a graph of the equation $y=3x+1$y=3x+1.
Plot the line $x=-8$x=−8 on the number plane.