topic badge

2.05 Using linear functions

Lesson

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 a particular form of a line might be more convenient. Here are some useful forms:

Equation of Lines
  • $y=mx+c$y=mx+c  (gradient-intercept form)
  • $y-y_1=m\left(x-x_1\right)$yy1=m(xx1)   (point-gradient formula)
  • $\frac{y-y_1}{x-x_1}=\frac{y_2-y_1}{x_2-x_1}$yy1xx1=y2y1x2x1 (two point formula)
  • $ay+bx-c=0$ay+bxc=0   (general form)

Let's look at examples where the different forms may be convenient. 

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 you are not given the gradient or $y$y-intercept directly, such as being given the gradient and a different point, you can still use this method by substituting the gradient and known point to find the unknown $y$y-intercept. Alternatively, to achieve this in one step we can use the point-gradient formula. 

Practice question

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.

We may be given this information in context, remember the gradient represents the rate of change, for each increase in the $x$x-value by $1$1 we will see a change in the $y$y-value by $m$m. The $y$y-intercept is the value of $y$y when $x$x is zero, in context this is often the initial value. 

Practice question

QUESTION 2

A carpenter charges a callout fee of $\$150$$150 plus $\$45$$45 per hour.

  1. Write an equation to represent the total amount charged, $y$y, by the carpenter as a function of the number of hours worked, $x$x.

  2. What is the gradient of the function?

  3. What does this gradient represent?

    The total amount charged increases by $\$45$$45 for each additional hour of work.

    A

    The minimum amount charged by the carpenter.

    B

    The total amount charged increases by $\$1$$1 for each additional $45$45 hours of work.

    C

    The total amount charged for $0$0 hours of work.

    D
  4. What is the value of the $y$y-intercept?

  5. What does this $y$y-intercept represent?

    Select all that apply.

    The total amount charged increases by $\$150$$150 for each additional hour of work.

    A

    The maximum amount charged by the carpenter.

    B

    The callout fee.

    C

    The minimum amount charged by the carpenter.

    D
  6. Find the total amount charged by the carpenter for $6$6 hours of work.

 

Point-gradient formula

If we don't know the $y$y-intercept of the line but we do know a point on the line, we can use the point-gradient formula, which is:

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

Practice question

Question 3

A line passes through the point $A$A$\left(-4,3\right)$(4,3) and has a gradient of $-9$9. Using the point-gradient formula, express the equation of the line in gradient intercept form.

 

The two point formula

If we are given two points, $\left(x_1,y_1\right)$(x1,y1) and $\left(x_2,y_2\right)$(x2,y2), we can use the two point formula to find the equation of a line. If we compare this to the point-gradient formula, this one is actually the same but is calculating the gradient on the right-hand side since we have not been given it. To find the equation substitute the coordinates into the formula:

$\frac{y-y_1}{x-x_1}=\frac{y_2-y_1}{x_2-x_1}$yy1xx1=y2y1x2x1

Practice question

Question 4

Find the equation of the line which passes through Point A $\left(8,1\right)$(8,1) and Point B $\left(-6,-2\right)$(6,2).

Use the two point formula and give your answer in gradient-intercept form.

Loading Graph...

 

General form

Another way of writing the equation of a straight line is called general form. A straight line is in general form when it is written with all terms on one side of the equation and zero on the other, with integer coefficients. In particular, the coefficient of $x$x should be positive (the sign can be easily changed by multiplying the whole equation by $-1$1).

That is, a straight line is in general form when it is of the form

$ax+by+c=0$ax+by+c=0

for integers $a$a, $b$b and $c$c with $a>0$a>0. We can be asked to write our final answer in this form or it may be convenient to use this form to find the equation of a line parallel to another line given in this form.

 

Practice question

Question 5

Use the two point formula to derive the equation of the line that passes through the points $A$A$\left(6,5\right)$(6,5) and $B$B$\left(-16,11\right)$(16,11). Give your answer in general form.

 

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 6

Consider the graph of the line.

Loading Graph...

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

  2. What is the slope of the line?

  3. Find the equation of the line in the form $y=mx+c$y=mx+c.

  4. Rewrite the equation of the line in general form $ax+by+c=0$ax+by+c=0.

Question 7

After Mae starts running, her heartbeat increases at a constant rate.

  1. Complete the table.

    Number of minutes passed ($x$x) $0$0 $2$2 $4$4 $6$6 $8$8 $10$10 $12$12
    Heart rate ($y$y) $49$49 $55$55 $61$61 $67$67 $73$73 $79$79 $\editable{}$
  2. What is the constant rate the heart beat is increasing at?

  3. Which one of the following equations describes the relationship between the number of minutes passed ($x$x) and Mae’s heartbeat ($y$y)?

    $y=49x-3$y=49x3

    A

    $y=49x+3$y=49x+3

    B

    $y=3x-49$y=3x49

    C

    $y=3x+49$y=3x+49

    D
  4. In the equation, $y=3x+49$y=3x+49, what does $3$3 represent?

    The change in one minute of Mae’s heartbeat.

    A

    The total time Mae has run.

    B

    The total distance Mae has run.

    C

 

Outcomes

ACMMM002

examine examples of direct proportion and linearly related variables

ACMMM003

recognise features of the graph of y=mx+c, including its linear nature, its intercepts and its slope or gradient

ACMMM004

find the equation of a straight line given sufficient information; parallel and perpendicular lines

What is Mathspace

About Mathspace