topic badge
Standard Level

3.05 Find and use the equation of a line

Lesson

 

 

In the line $y=mx+c$y=mx+c the values of $m$m and $c$c have specific meanings. Confirm for yourself what these values do by exploring with this interactive.

 

The gradient

What you will have found is that the value of $m$m affects the gradient.

  • 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
  • The larger the magnitude of $m$m the steeper the line

The $y$y-intercept

We also found that the value of $c$c affects the $y$y-intercept.  

  • If $c$c is positive then the line cross the $y$y-axis above the origin.
  • If $c$c is negative then the line cross the $y$y-axis below the origin.

 

Worked examples

EXAMPLE 1

Consider the linear equation $y=3x$y=3x

(a) What is the the gradient?  

Think: For all equations of the form $y=mx+c$y=mx+c, the gradient is the value of $m$m, the coefficient of $x$x.

Do: We can see from the equation that the coefficient of $x$x is $3$3. This means the gradient of this line is $3$3.

(b) What is the $y$y-intercept?  

Think: The $y$y-intercept is the value of $c$c, the constant term.

Do: We can see from the equation that there is no value of $c$c. This is the same as if the equation were $y=3x+0$y=3x+0. This means the $y$y-intercept is $0$0, that is the line crosses the $y$y-axis at the point $\left(0,0\right)$(0,0).

Reflect: All lines of the form $y=mx$y=mx, that is with a $y$y-intercept of $0$0, pass through the origin. This line has a gradient of $3$3, which means it is $3$3 times steeper than the line $y=x$y=x.

 

example 2

Consider the linear equation $y=\frac{x}{2}-3$y=x23.

(a) What is the the gradient?  

Think: For all equations of the form $y=mx+c$y=mx+c, the gradient is the value of $m$m, the coefficient of $x$x.

Do: We can see from the equation that the coefficient of $x$x is $\frac{1}{2}$12, ($\frac{x}{2}$x2 is equivalent to $\frac{1}{2}x$12x) This means the gradient of this line is $\frac{1}{2}$12.

(b) What is the $y$y-intercept?  

Think: The $y$y-intercept is the value of $c$c, the constant term.

Do: We can see from the equation that $c=-3$c=3. This means the $y$y-intercept is $-3$3, that is the line crosses the $y$y-axis at the point $\left(0,-3\right)$(0,3).

Reflect: The line has a gradient of $\frac{1}{2}$12 which means it will be half as steep as the line $y=x$y=x. The $y$y-intercept is $-3$3 which means it will cross the $y$y-axis below the origin.

An equation of the form $y=mx+c$y=mx+c is known as the gradient-intercept form of a line, as we can easily identify both the gradient and the value of the $y$y-intercept.

 

Gradient-intercept form

For all equations of the form $y=mx+c$y=mx+c:

  • the value of $m$m is the gradient
    • This means that as $x$x increases by $1$1, the $y$y-value increases by $m$m (or decreases if $m$m is negative)
  • The value of $c$c is the $y$y-intercept.
    • This means the line passes through the point $0,c$0,c

 

Finding the equation of a line

Sometimes we are given the graph of a line, and we are asked to find the equation of the line.

The first thing we want to do is find the gradient of the line, which we can do by using any two points (usually the intercepts). Using the coordinates of the two points, we can either use the gradient formula, or by calculating the rise and the run.

We can then identify the $y$y-intercept, by looking where the line crosses the $y$y-axis. Once we have identified these two features, we can write the equation of the line in the form $y=mx+c$y=mx+c.

 

Practice questions

Question 1

Find the equation of a line whose gradient is $2$2 and crosses the $y$y-axis at $5$5. Express your answer in the form $y=mx+c$y=mx+c.

Question 2

Consider the line shown on the coordinate-plane:

Loading Graph...

  1. Complete the table of values by using the line shown in the graph.

    $x$x $-1$1 $0$0 $1$1 $2$2
    $y$y $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
  2. Linear relations can be written in the form $y=mx+c$y=mx+c.

    For this relationship, calculate the values of $m$m and $c$c:

    $m=\editable{}$m=

    $c=\editable{}$c=

  3. Write the linear equation expressing the relationship between $x$x and $y$y.

  4. Complete the coordinate value for the point on the line where $x=20$x=20:
    $\left(20,\editable{}\right)$(20,)

Question 3

Consider the line shown on the coordinate-plane:

Loading Graph...

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

  2. By how much does the $y$y-value change as the $x$x-value increases by $1$1?

  3. Write the linear equation expressing the relationship between $x$x and $y$y.

 

Exploration

Consider the following graph. How can we work out its equation?

 

Every linear equation can be written in the form $y=mx+c$y=mx+c so if we can find $m$m and $c$c we can find the equation.

We can see that the $x$x and $y$y-intercepts are clearly marked on the graph and to find the equation of a straight-line graph we actually only need to know two points, so let's use the two intercepts.

The $y$y-intercept is at $\left(0,-6\right)$(0,6) which means $c=-6$c=6.

To find the gradient $m$m we want to work out the rise and run of the line. As we move along the line from the $x$x-intercept to the $y$y-intercept , we have moved from $\left(0,-6\right)$(0,6) to $\left(2,0\right)$(2,0). That is, the $x$x-value has increased by $2$2 and the $y$y-value has increased by $6$6. This means we have a run of $2$2 and a rise of $6$6.

This means the gradient $m$m is equal to $\frac{6}{2}=3$62=3.

We could have chosen any two points on this line, but sometimes the coordinates might not be clear if they are not integer values. In this case, the point that is one unit along the $x$x-axis from the point $\left(0,-6\right)$(0,6) has coordinates of $\left(1,-3\right)$(1,3) which confirms the gradient is $3$3 and as expected.

Did you know?

If the line passes through the origin $\left(0,0\right)$(0,0) the $x$x and $y$y-intercept both occur at this point, so you will need to find a second point to calculate the gradient.

This line passes through the origin, we can see it also passes through the point $\left(2,-1\right)$(2,1)

 

The point-gradient formula

Sometimes we don't know the value of the $y$y-intercept, but if we know the gradient and the coordinates of one point, we can still find the equation of the line. If we don't know the gradient, but know the coordinates of two points, we can first find the gradient and then use the point-gradient formula.

 

Exploration

Let's say we know that the gradient of the line is $-2$2. We also know a point on the line, $\left(2,-8\right)$(2,8).

Now, apart from this point there are infinitely many other points on this line, and we will let $\left(x,y\right)$(x,y) represent each of them.

Well, since $\left(x,y\right)$(x,y) and $\left(2,-8\right)$(2,8) are points on the line, then the gradient between them will be $-2$2.

We know that to find the gradient given two points, we use: 

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

Let's apply the gradient formula to $\left(x,y\right)$(x,y) and $\left(2,-8\right)$(2,8):

$m=\frac{y-\left(-8\right)}{x-2}$m=y(8)x2

But we know that the gradient of the line is $-2$2. So:

$\frac{y-\left(-8\right)}{x-2}=-2$y(8)x2=2

Rearranging this slightly, we get:

$y-\left(-8\right)=-2\left(x-2\right)$y(8)=2(x2)

You may be thinking that we should simplify the equation, and of course if you do you should get $y=-2x-4$y=2x4 What we want to do though, is generalise our steps so that we can apply it to any case where we're given a gradient $m$m, and a point on the line $\left(x_1,y_1\right)$(x1,y1).

In the example above, the point on the line was $\left(2,-8\right)$(2,8). Let's generalise and replace it with $\left(x_1,y_1\right)$(x1,y1).

We were also given the gradient $-2$2. Let's generalise and replace it with $m$m.

$y-\left(-8\right)=-2\left(x-2\right)$y(8)=2(x2) becomes $y-y_1=m\left(x-x_1\right)$yy1=m(xx1)

We call this the point gradient formula, because when we know a point and the gradient using this rule we can easily get the equation of that line.

 

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 3

Find the equation of a line, in point-gradient form, that passes through the point $\left(-4,3\right)$(4,3) and has gradient of $5$5

Think: We know the gradient of the line, and a point that it passes through, so we can use the point-gradient formula to find the equation of the line.

Do: Substitute $m=5$m=5, $x_1=-4$x1=4 and $y_1=3$y1=3 into the equation $y-y_1=m\left(x-x_1\right)$yy1=m(xx1), and rearrange to solve for $y$y.

$y-y_1$yy1 $=$= $m\left(x-x_1\right)$m(xx1)
$y-3$y3 $=$= $5\left(x-\left(-4\right)\right)$5(x(4))
$y-3$y3 $=$= $5\left(x+4\right)$5(x+4)
$y-3$y3 $=$= $5x+20$5x+20
$y$y $=$= $5x+23$5x+23

We can also achieve the same result by substituting the known values straight into the equation $y=mx+c$y=mx+c. We can then rearrange the equation to solve for the unknown $c$c.

In the above case, we know that $m=5$m=5 and the point $\left(-4,3\right)$(4,3) lies on the line. Substituting these values into $y=mx+c$y=mx+c gives us:

$3=5\times\left(-4\right)+c$3=5×(4)+c

Rearranging the equation to solve for $c$c gives us:

$c=23$c=23

We now know the values of $c$c and $m$m and can substitute them into the equation $y=mx+c$y=mx+c, giving us:

$y=5x+23$y=5x+23

Practice questions

Question 4

Consider the following graph.

Loading Graph...

  1. State the value of the $x$x-intercept.

  2. State the value of the $y$y-intercept.

Question 5

The variables $x$x and $y$y are related, and a table of values is given below:

$x$x $1$1 $2$2 $3$3 $4$4 $5$5
$y$y $1$1 $4$4 $7$7 $10$10 $13$13
  1. What is the value of $y$y when $x=0$x=0?

  2. Write the linear equation expressing the relationship between $x$x and $y$y.

  3. What is the value of $y$y when $x=60$x=60?

Question 6

A line passes through Point $A$A $\left(-4,3\right)$(4,3) and has a gradient of $4$4.

  1. Find the value of the $y$y-intercept of the line, denoted by $c$c.

  2. Hence, write the equation of the line in gradient-intercept form.

Question 7

A line passes through the point $A$A$\left(-\frac{4}{5},-4\right)$(45,4) and has a gradient of $2$2. Using the point-gradient formula, express the equation of the line in gradient intercept form.

 

What is Mathspace

About Mathspace