topic badge

3.01 Linear functions

Lesson

Identifying key features

The graph of a linear relationship will create a 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 values remain 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

They all 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 some have $2$2 intercepts, 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 (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-value increases by a constant amount, the $y$y-value also increases 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 often 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 $m$m is undefined
  • It can be read off directly, as the coefficient of $x$x, from the 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-value increases by $1$1 the $y$y-value changes by $m$m
  • Also, the larger the value of $\left|m\right|$|m| the steeper the line

Horizontal lines

On horizontal lines, the $y$y value is always the same for every point on the line. In other words, there is no rise- it's completely flat. 

$A=\left(-4,4\right)$A=(4,4)

$B=\left(2,4\right)$B=(2,4)

$C=\left(4,4\right)$C=(4,4)

All 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 (ie. $\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 for A,B and C on this line.  

$A=\left(5,-4\right)$A=(5,4)

$B=\left(5,-2\right)$B=(5,2)

$C=\left(5,4\right)$C=(5,4)

All the $x$x-coordinates are the same, $x=5$x=5, regardless of the $y$y value.

The equation of this line is $x=5$x=5.

Vertical lines have no "run" (ie. $\text{run }=0$run =0). l If we substituted this into the $\frac{\text{rise }}{\text{run }}$rise run equation, we'd have a $0$0 as the denominator of the fraction. However, fractions with a denominator of $0$0 are undefined.

So, the gradient of vertical lines 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

Examine the graph attached and answer the following questions.

Loading Graph...
A Cartesian coordinate plane, with both x- and y- axes labeled from -10 to 10, has a horizontal line drawn on it. The line intersects the y-axis at point (0, 4).
  1. What is the slope of the line?

    $4$4

    A

    $0$0

    B

    Undefined

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

  3. Does this line have an $x$x-intercept?

    No

    A

    Yes

    B

Finding the equation of a line

Given any two points on a line $\left(x_1,y_1\right)$(x1,y1), $\left(x_2,y_2\right)$(x2,y2) we have seen that we can calculate the gradient $m$musing:

$m$m $=$= $\frac{y_2-y_1}{x_2-x_1}$y2y1x2x1


If we took one of those points and any other point on the line with the coordinates$(x,y)$(x,y) we can set up the following equation:

$m$m $=$= $\frac{y-y_1}{x-x_1}$yy1xx1
 

We can rearrange this to produce a convenient way for finding the equation of a line given the gradient and a point $\left(x_1,y_1\right)$(x1,y1). This is called the point-gradient formula and is stated below.

The point-gradient formula

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)$yy1=m(xx1)

Worked Example

Example 1

Find the equation of the line passing through the two points $\left(-3,7\right)$(3,7) and $\left(5,9\right)$(5,9).

First we need to determine the gradient as follows:

$m$m $=$= $\frac{y_2-y_1}{x_2-x_1}$y2y1x2x1
$m$m $=$= $\frac{9-7}{5--3}$9753
$m$m $=$= $\frac{2}{8}$28
$m$m $=$= $\frac{1}{4}$14

We can use either of the points given but using the point $\left(5,9\right)$(5,9) means we will only have positive integers to deal with.

$y-y_1$yy1 $=$= $m\left(x-x_1\right)$m(xx1)

The point-gradient formula

$y-9$y9 $=$= $\frac{1}{4}(x-5)$14(x5)

Substituting the point and gradient

$y-9$y9 $=$= $\frac{1}{4}x-\frac{5}{4}$14x54

Expanding the brackets

$y$y $=$= $\frac{1}{4}x+\frac{31}{4}$14x+314

Writing the equation gradient-intercept form

Now we have found the equation of the line, which we could also write as $x-4y+7=0$x4y+7=0 in general form.

Practice questions

Question 3

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.

Question 4

A line passes through the points $\left(4,-6\right)$(4,6) and $\left(6,-9\right)$(6,9).

  1. Find the gradient of the line.

  2. Find the equation of the line by substituting the gradient and one point into $y-y_1=m\left(x-x_1\right)$yy1=m(xx1).

 

Sketching the graph of a linear relationship

To graph any linear relationship you only need two points that are on the line.  You can substitute in any two values of $x$x into the equation and solve for corresponding $y$y-value to create your own two points.  Often, using the intercepts is one of the easiest ways to sketch the line.

Sketch 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 picking any two $x$x-values you like, often the $x$x-value of $0$0 is a good one to pick because the calculation for y can be quite simple.  For our example, $y=3x+5$y=3x+5 becomes $y=0+5$y=0+5, $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, $2$2.  I'll pick $x=1$x=1.  Then for $y=3x+5$y=3x+5, we have $y=3\times1+5$y=3×1+5, $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.  

 

Sketch from the intercepts

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

For example, 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 $3$3, and the $y$y intercept $2$2, and draw the line through both.

Sketch 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 5

Consider the equation $-6x+2y-12=0$6x+2y12=0.

  1. Find the $y$y-value of the $y$y-intercept of the line.

  2. Find the $x$x-value of the $x$x-intercept of the line.

  3. Sketch a graph of the line below.

    Loading Graph...

Question 6

Graph the linear equation $y=2x-2$y=2x2 by determining any two points on the line.

  1. Loading Graph...

Parallel and perpendicular lines

Two lines that are parallel have the same gradient.

Thus two lines given by $y=m_1x+b$y=m1x+b and $y=m_2x+c$y=m2x+c will be parallel if and only if $m_1=m_2$m1=m2.

We can explain this feature with the following diagram:

Parallel property $m_1=m_2=\frac{p}{q}$m1=m2=pq

The parallel property is self-evident. If the lines $PQ$PQ and $P'Q'$PQ are parallel, then for a given run $q$q, the rise on both lines are equal. That is to say for both lines the gradient $m=\frac{p}{q}$m=pq

So for example two lines parallel to $y=2x+3$y=2x+3 are $y=2x+7$y=2x+7 and $y=2x-12$y=2x12

Two lines are perpendicular if the product of their respective gradients equals $-1$1. Another way to say this is that the gradient of one line is the negative reciprocal of the other.

So, two lines given by $y=m_1x+b$y=m1x+b and $y=m_2x+c$y=m2x+c will be perpendicular if and only if $m_1=-\frac{1}{m_2}$m1=1m2.

Perpendicular property $m_1=\frac{-b}{a}$m1=ba and $m_2=\frac{a}{b}$m2=ab

For the perpendicular property, let the positive gradient of the line $BA$BA be $m_1=\frac{a}{b}$m1=ab. Now, imagine we rotate $BA$BA $90^\circ$90°  anticlockwise so that the new line $BA'$BA is perpendicular to $BA$BA. From the symmetry in the diagram we see that the gradient of $BA'$BA is negative and given by $m_2=-\frac{b}{a}$m2=ba

Two lines perpendicular to $y=2x+3$y=2x+3 are $y=-\frac{1}{2}x+9$y=12x+9 and $y=-\frac{1}{2}x-1$y=12x1.

Practice questions

Question 7

If the line formed by equation $1$1 is parallel to the line formed by equation $2$2, fill in the missing value below.

  1. Equation $1$1: $0=-3y-5x+6$0=3y5x+6

    Equation $2$2: $y$y$=$= $\editable{}$ $x$x$-$$1$1

Question 8

Consider the line $5x-3y-9=0$5x3y9=0.

  1. Find the $y$y-intercept of the line.

  2. Find the equation of the line that is perpendicular to the given line and has the same $y$y-intercept. Express in general form.

Outcomes

MA11-1

uses algebraic and graphical techniques to solve, and where appropriate, compare alternative solutions to problems

What is Mathspace

About Mathspace