NZ Level 7 (NZC) Level 2 (NCEA)
topic badge
Find the equation of An Absolute Value Function (|ax+b| only)
Lesson

Given the graph of a linear absolute value function, can we find its equation?

Understanding how the gradients of the two rays, as well as the location of the vertex, are related to the terms of the function definition. Shown below is the general form of the linear absolute value function whose graph is in the shape of a 'V' with the vertex touching the $x$x-axis.

General definition of absolute value function
$\left|ax+b\right|$|ax+b|$=$= $ax+b$ax+b $x\ge-\frac{b}{a}$xba
$-\left(ax+b\right)$(ax+b) $x<-\frac{b}{a}$x<ba

The critical point $x=-\frac{b}{a}$x=ba that separates the two parts of the function is the point where the function value is zero.

Recall that to the right of this point the gradient of the function is $a$a and to the left, it is $-a$a.

Worked Examples

Example 1

We are given the following graph and we wish to write down its equation.

The vertex is at $x=2$x=2. The gradient to the right of $x=2$x=2 is $\frac{5}{2}$52 and to the left, it is $-\frac{5}{2}$52.

Therefore, the coefficient $a$a in the general function definition must be $\frac{5}{2}$52. The critical point, $-\frac{b}{a}$ba is the vertex at $x=2$x=2. So, by substitution, $-\frac{b}{\frac{5}{2}}=2$b52=2 and so, $b=-5$b=5.

The equation we seek is $y=\left|\frac{5}{2}x-5\right|$y=|52x5|. You should check that $y=0$y=0 when $x=2$x=2 (the vertex), and that the gradients are correct. As a further check, it should be true that $y=5$y=5 when $x=0$x=0.

 

Another way to approach the problem of finding the equation from a graph is to make use of a 'transformation technique'. That is, we begin with knowledge about how the simplest linear absolute value function, $y=\left|x\right|$y=|x|, should look, and consider what coefficients are needed to make this graph look like the one given.

The graph of $y=\left|x\right|$y=|x| has its vertex at the origin and gradients of $1$1 and $-1$1 to the right and left respectively.

For any function $f(x)$f(x), the effect of multiplying the function by a constant $m$m is to stretch the vertical scale of the graph by that factor. The effect of adding a constant $c$c to the variable $x$x is to shift the graph to the left by an amount $c$c.

So, a function $m\times f(x+c)$m×f(x+c) has a graph that looks like the graph of $f(x)$f(x) stretched vertically by the factor $m$m and moved to the left by the amount $c$c.

In the case of the linear absolute value function, $\left|ax+b\right|$|ax+b|, with $a$a assumed to be a positive number, we can rewrite the expression as $\left|a(x+\frac{b}{a})\right|$|a(x+ba)| and then as $a\left|x+\frac{b}{a}\right|$a|x+ba|. We see that $a$a corresponds to the stretching factor $m$m and $\frac{b}{a}$ba corresponds to the displacement $c$c to the left.

 

Example 2

Consider again the graph in Example $1$1. Compared with the graph of $y=|x|$y=|x|, the graph has been stretched vertically by a factor of $\frac{5}{2}$52 and moved to the left by the amount $-2$2.

We see from the previous discussion that the equation for the graph must be

$y$y $=$= $a\left|x+\frac{b}{a}\right|$a|x+ba|
  $=$= $\frac{5}{2}\left|x-2\right|$52|x2|

That is, $y=\left|\frac{5}{2}x-5\right|$y=|52x5|, as before.

 

Example 3

Find the equation for the following graph.

This graph is similar to the graph of $y=|x|$y=|x| with a shift to the left of $3$3 and a vertical dilation of $-3$3. So, we have

$y$y $=$= $a\left|x+\frac{b}{a}\right|$a|x+ba|
  $=$= $-3\left|x+3\right|$3|x+3|
  $=$= $-\left|3x+9\right|$|3x+9|

 

Worked Examples

Question 1

Question 2

Consider the function that has been graphed.

Loading Graph...

  1. What is the gradient of the function for $x\ge-3$x3?

  2. What is the gradient of the function for $x<-3$x<3?

  3. What are the coordinates of the vertex of the function $y=\left|x\right|$y=|x|?

  4. What is the vertex of the function that has been graphed?

  5. What transformation is applied to the graph of $y=\left|x\right|$y=|x| to obtain the given graph?

    rotation of $90^\circ$90° clockwise and reflection about the $y$y-axis

    A

    translation of $3$3 units to the left and vertical stretching by a factor of $2$2

    B

    translation of $3$3 units up and reflection about the $x$x-axis

    C

    translation of $3$3 units to the right and vertical stretching by a factor of $\frac{1}{2}$12

    D

    rotation of $90^\circ$90° clockwise and reflection about the $y$y-axis

    A

    translation of $3$3 units to the left and vertical stretching by a factor of $2$2

    B

    translation of $3$3 units up and reflection about the $x$x-axis

    C

    translation of $3$3 units to the right and vertical stretching by a factor of $\frac{1}{2}$12

    D
  6. Hence or otherwise, state the equation of the graph for all real $x$x.

Question 3

The graph of a function of the form $y=\left|ax+b\right|$y=|ax+b| has an $x$x-intercept at $x=7$x=7 and a $y$y-intercept at $y=5$y=5.

  1. State the equation of the function.

Outcomes

M7-2

Display the graphs of linear and non-linear functions and connect the structure of the functions with their graphs

91257

Apply graphical methods in solving problems

What is Mathspace

About Mathspace