topic badge

4.035 Equation of a line

Lesson

Finding the equation of a line

We are often asked to find the equation of describing a linear relationship given certain information about the graph and table of values or the context. 

To find the equation of a line in gradient-intercept form, we need to be able to identify 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.

From a graph

From a graph we will look for two easily identifiable points to find the equation. If it is 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.

 

From a table of values

A linear function is a relationship that has a constant rate of change. This means that the $y$y-values change by the same amount for constant changes in $x$x-values. We can calculate the gradient by analysing the change in $y$y-values with respect to the $x$x-values.

Worked example

Example 1

(a) Determine the gradient for the linear function represented by the following table of values:

$x$x $2$2 $3$3 $4$4 $5$5
$y$y $9$9 $6$6 $3$3 $0$0

Think: The $x$x-values increase by the same amount. We can determine how the $y$y-values change for a given change in $x$x in order to calculate the gradient.

Do:

We see a constant change in $y$y (the rise) of $-3$3 for an equivalent change in $x$x (the run) of $1$1. Therefore, we can calculate the gradient as follows:

$m$m $=$= $\frac{\text{rise}}{\text{run}}$riserun
  $=$= $\frac{-3}{1}$31
  $=$= $-3$3

 

(b) Determine the equation of the line, passing through the points given in the table, in gradient-intercept form.

Think: From part (a) we have that the relationship between $x$x and $y$y is of the form: $y=-3x+c$y=3x+c. For the first value in the table, when $x=2$x=2, $y=9$y=9, what would we have to add to $-3\times2$3×2 to obtain $9$9?

Do: $-6+15=9$6+15=9, so $c=15$c=15. Hence, the linear rule that fits the table of values is $y=-3x+15$y=3x+15.

Reflect: Check the rule matches the other sets of points in the table.

 

Practice questions

QUESTION 1

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 2

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 3

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

ACMEM123

graph linear functions for all values of x with pencil and paper and with graphing software

What is Mathspace

About Mathspace