topic badge

9.02 Linear graphs

Lesson

Identifying key features

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:

  • An increasing graph means that as $x$x-values increase, the $y$y-values increase.
  • A decreasing graph means that as $x$x-values increase, the $y$y-values decrease.
  • A horizontal graph means that as $x$x-values change the $y$y-value remains the same
  • In a vertical graph the $x$x-value is constant.

Regardless of all different shapes all linear functions have some common characteristics.

 

Intercepts

All linear functions have at least one intercept. Linear functions might have

  • an $x$x-intercept only (in the case of a vertical line)
  • a $y$y-intercept only (in the case of horizontal lines)
  • or both an $x$x and a $y$y (in the case of increasing or decreasing functions)
Intercepts

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.

 

Gradient

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. 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:

Gradient
$m$m $=$= $\frac{rise}{run}$riserun
  $=$= $\frac{y_2-y_1}{x_2-x_1}$y2y1x2x1

The gradient is usually represented by the letter $m$m and has the following properties:

  • if $m<0$m<0, the gradient is negative and the line is decreasing
  • if $m>0$m>0, the gradient is positive and the line is increasing
  • if $m=0$m=0 the gradient is $0$0 and the line is horizontal
  • for vertical lines, we say that the gradient $m$m is undefined
  • the gradient can be read directly, as the coefficient of $x$x, from a linear equation in gradient intercept form ($y=mx+c$y=mx+c)
  • by rearranging general form ($ax+by+c=0$ax+by+c=0) we can see the gradient will be $m=-\frac{a}{b}$m=ab
  • the gradient tells us as the $x$x-values increase by $1$1, the $y$y-values change by $m$m
  • the larger the size of $m$m (if we ignore the sign) then the steeper the line

 

With this interactive tool, we can see how the intercept and gradient affect the position of the line on the coordinate plane.

 

Horizontal lines

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.

 

Vertical lines

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.

 

Practice questions

Question 1

A line has the following equation: $y=6\left(3x-2\right)$y=6(3x2)

  1. Rewrite $y=6\left(3x-2\right)$y=6(3x2) in the form $y=mx+c$y=mx+c.

  2. State the gradient and $y$y-value of the $y$y-intercept of the equation.

    Gradient $\editable{}$
    Value at $y$y-intercept $\editable{}$

Question 2

What is the gradient of the line going through A $\left(-1,1\right)$(1,1) and B $\left(5,2\right)$(5,2)?

Loading Graph...
A number plane with the line passing through the points A(-1, 1) and B(5, 2) plotted. The points A(-1, 1) and B(5, 2) are also plotted on the number plane as solid dots.

 

Plotting the graph of a linear relationship

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.

 

Sketching from a table of values

$x$x $1$1 $2$2 $3$3 $4$4
$y$y $3$3 $5$5 $7$7 $9$9

To sketch from a table of values, we need just any two points from the table. From this table we have $4$4 coordinate pairs; $\left(1,3\right)$(1,3), $\left(2,5\right)$(2,5), $\left(3,7\right)$(3,7), $\left(4,9\right)$(4,9).

Drag two of the points in the following applet to the correct positions and create a graph of this linear relationship.


 

Sketching from any two points

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.

 

Sketching from the intercepts

The general form of a line is great for identifying both the $x$x- and $y$y-intercepts easily.

For example, consider the line $3y+2x-6=0$3y+2x6=0.

The $x$x-intercept happens when the $y$y-value is $0$0:

$3y+2x-6$3y+2x6 $=$= $0$0
$0+2x-6$0+2x6 $=$= $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+2x6 $=$= $0$0
$3y+0-6$3y+06 $=$= $0$0
$3y$3y $=$= $6$6
$y$y $=$= $2$2

From here it is pretty easy to sketch, we find 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.

 

Sketching from the gradient and a point

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.

 

 

Practice questions

Question 3

Consider the linear equation $y=3x+1$y=3x+1.

  1. State the $y$y-value of the $y$y-intercept of this line.

  2. Using the point $Y$Y as the $y$y-intercept, sketch a graph of the equation $y=3x+1$y=3x+1.

    Loading Graph...

Question 4

Graph the linear equation $y=\frac{x}{3}+3$y=x3+3 by determining any two points on the line.

  1. Loading Graph...

question 5

Plot the graph of the linear equation $8x+2y-16=0$8x+2y16=0 by plotting both the $x$x-intercept, labelled $X$X, and the $y$y-intercept, labelled $Y$Y.

  1. Loading Graph...

 

Finding the equation of a line

We are often asked to find the equation of a line given certain information about the graph or the context. Depending on the information given, we may need to first calculate the gradient and then find the $y$y-intercept using a given point.

 

Gradient-intercept form

To use the gradient-intercept rule, we need to be able to find the gradient and the $y$y-intercept of a line. Then substitute these values into the form

$y=mx+c$y=mx+c,

where $m$m is the gradient and $c$c is the $y$y-intercept.

If we do not know the gradient or $y$y-intercept directly (we might instead know the gradient and a different point, for instance) we can still use this method - we just need to use the information we have to find the gradient and $y$y-intercept first.

 

Practice question

QUESTION 6

Write the equation of a line which has gradient $\frac{2}{3}$23 and goes through the point $\left(0,3\right)$(0,3).

  1. Express the equation in gradient-intercept form.

question 7

A line has gradient $-2$2 and passes through the point $\left(-6,-\frac{4}{3}\right)$(6,43).

  1. By substituting into the equation $y=mx+c$y=mx+c, find the value of $c$c for this line.

  2. Write the equation of the line in general form $ax+by+c=0$ax+by+c=0, where $a$a is a positive integer.

question 8

A line goes through the points $\left(0,-3\right)$(0,3) and $\left(1,4\right)$(1,4).

  1. What is the gradient of the line?

  2. Write the equation of the line in the form $y=mx+c$y=mx+c.

 

From a graph or table

From a graph or table we will look for two easily identifiable points and use one of the methods above to find the equation. If it is in the table or clear on a graph one convenient point would be the $y$y-intercept. Then the gradient can be found using $m=\frac{rise}{run}$m=riserun.

 

Practice questions

Question 9

Write an equation for $y$y in terms of $x$x.

$x$x $0$0 $\ldots$ $8$8 $9$9 $10$10 $11$11
$y$y $-6$6 $\ldots$ $18$18 $21$21 $24$24 $27$27

Question 10

Consider the function in the graph.

Loading Graph...

  1. What is the gradient?

     
  2. What is the value of the $y$y-intercept?

  3. Write the equation of the line in gradient-intercept form.

Outcomes

ACMGM040

construct straight-line graphs both with and without the aid of technology

ACMGM041

determine the slope and intercepts of a straight-line graph from both its equation and its plot

What is Mathspace

About Mathspace