Skip to content

The absolute value, operations on functions and composition

The absolute value, operations on functions and composition

The absolute value function

The absolute value of a number is its distance from 0 on the number line: ∣5∣=5\displaystyle {|5|}={5}, ∣−5∣=5\displaystyle {|-5|}={5}, ∣0∣=0\displaystyle {|0|}={0}.

∣a∣={aa≥0−aa<0\displaystyle |a|=\begin{cases}a & a\geq0\\-a & a<0\end{cases}

The graph of y=∣x∣\displaystyle {y}={|x|} is made of two straight pieces:

  • Where x≥0\displaystyle x\geq0 it is the line y=x\displaystyle {y}={x}, and where x<0\displaystyle x<0 – the line y=−x\displaystyle {y}={-x}.
  • ∣−x∣=∣x∣\displaystyle {|-x|}={|x|}: the function is even, and the graph is symmetric about the y\displaystyle y-axis.
  • (0,0)\displaystyle (0,0) is a minimum point, and the graph makes a sharp corner there.
y=∣x∣\displaystyle y=|x|
The graph of ∣f(x)∣\displaystyle |f(x)|

The graph of y=∣f(x)∣\displaystyle {y}={|f(x)|} comes from the graph of f\displaystyle f:

  • Where f(x)≥0\displaystyle f(x)\geq0, the graph does not change.
  • Where f(x)<0\displaystyle f(x)<0, the part below the x\displaystyle x-axis is reflected above it.
  • The zeros stay where they are, and ∣f(x)∣\displaystyle |f(x)| is never negative.

The board below shows y=x2−4\displaystyle {y}={x^2-4} (dashed) and y=∣x2−4∣\displaystyle {y}={|x^2-4|}. The part between −2\displaystyle -2 and 2 went up above the axis, and the minimum point (0,−4)\displaystyle (0,-4) became a maximum point (0,4)\displaystyle (0,4).

y=x2−4\displaystyle y=x^{2}-4
y=∣x2−4∣\displaystyle y=|x^{2}-4|
Equations and inequalities with an absolute value

∣A∣=c\displaystyle {|A|}={c} (where c>0\displaystyle c>0) says that the distance of A\displaystyle A from 0 is c\displaystyle c, so A=c\displaystyle {A}={c} or A=−c\displaystyle {A}={-c}. ∣A∣<c\displaystyle |A|<c says that A\displaystyle A is closer to 0 than c\displaystyle c: −c<A<c\displaystyle -c<A<c.

The examples below solve an equation and an inequality:

  • ∣x−3∣=5\displaystyle {|x-3|}={5}: x−3=5\displaystyle {x-3}={5} or x−3=−5\displaystyle {x-3}={-5}, so x=8\displaystyle {x}={8} or x=−2\displaystyle {x}={-2}.
  • ∣2x+1∣<5\displaystyle |2x+1|<5: −5<2x+1<5\displaystyle -5<2x+1<5, that is −6<2x<4\displaystyle -6<2x<4, so −3<x<2\displaystyle -3<x<2.
Operations on functions

From two functions f\displaystyle f and g\displaystyle g, each of the four operations of arithmetic builds a new function: f(x)+g(x)\displaystyle f(x)+g(x), f(x)−g(x)\displaystyle f(x)-g(x), f(x)⋅g(x)\displaystyle f(x)\cdot g(x) and f(x)g(x)\displaystyle \frac{f(x)}{g(x)}.

  • The sign of a product and of a quotient comes from the signs: the same sign – positive, different signs – negative.
  • f(x)g(x)\displaystyle \frac{f(x)}{g(x)} is not defined where g(x)=0\displaystyle {g(x)}={0}.

In the example below, f(x)=x−1\displaystyle {f(x)}={x-1} and g(x)=x+2\displaystyle {g(x)}={x+2}:

  • f(x)⋅g(x)=(x−1)(x+2)\displaystyle {f(x)\cdot g(x)}={(x-1)(x+2)} is negative where −2<x<1\displaystyle -2<x<1, where f\displaystyle f and g\displaystyle g have different signs.
  • f(x)g(x)=x−1x+2\displaystyle {\frac{f(x)}{g(x)}}={\frac{x-1}{x+2}} is defined where x≠−2\displaystyle x\neq-2, and has the same signs as the product.
Composing functions

Composing functions puts one function inside the other: f(g(x))\displaystyle f(g(x)). First work out g(x)\displaystyle g(x) – the inner function – and put the result into f\displaystyle f – the outer function.

In the example below, f(x)=x2\displaystyle {f(x)}={x^2} and g(x)=x−3\displaystyle {g(x)}={x-3}:

  • f(g(x))=(x−3)2\displaystyle {f(g(x))}={(x-3)^2}: first subtract 3, then square.
  • g(f(x))=x2−3\displaystyle {g(f(x))}={x^2-3}: first square, then subtract 3.
  • At x=0\displaystyle {x}={0}: f(g(0))=9\displaystyle {f(g(0))}={9} and g(f(0))=−3\displaystyle {g(f(0))}={-3}. The order of composing changes the result.

The power of a function and the absolute value of a function are compositions too: (x2−5)3\displaystyle (x^2-5)^3 is x3\displaystyle x^3 with x2−5\displaystyle x^2-5 put in it, and ∣x2−4∣\displaystyle |x^2-4| is ∣x∣\displaystyle |x| with x2−4\displaystyle x^2-4 put in it.

Exercise 1

The function is h(x)=∣x2−2x−3∣\displaystyle {h(x)}={|x^2-2x-3|}.

a

Mark the zeros of h\displaystyle h on the graph.

h(x)=∣x2−2x−3∣\displaystyle h(x)=|x^{2}-2x-3|

b

Where is h(x)=−(x2−2x−3)\displaystyle {h(x)}={-(x^2-2x-3)}?
Explain why (1,4)\displaystyle (1,4) is a maximum point of h\displaystyle h.

Exercise 2

Solve the equation and the inequality.

a
    b
      Exercise 3

      The functions are f(x)=x2+1\displaystyle {f(x)}={x^2+1} and g(x)=2x−3\displaystyle {g(x)}={2x-3}.

      a

      Write f(g(x))\displaystyle f(g(x)) without brackets.

      f(x)=x2+1,g(x)=2x−3\displaystyle f(x)=x^{2}+1,\qquad g(x)=2x-3

        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

        b

        Write g(f(x))\displaystyle g(f(x)) without brackets.

        f(x)=x2+1,g(x)=2x−3\displaystyle f(x)=x^{2}+1,\qquad g(x)=2x-3

          / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

          / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

          c

          In each composition, which is the inner function and which the outer?
          Is f(g(x))=g(f(x))\displaystyle {f(g(x))}={g(f(x))}?

          Exercise 4

          The functions are f(x)=x−2\displaystyle {f(x)}={x-2} and g(x)=x+4\displaystyle {g(x)}={x+4}.

          a

          Solve the inequality f(x)⋅g(x)<0\displaystyle f(x)\cdot g(x)<0.

            b

            What is the domain of f(x)g(x)\displaystyle \frac{f(x)}{g(x)}?
            Solve the inequality f(x)g(x)≥0\displaystyle \frac{f(x)}{g(x)}\geq0.

              Exercise 5

              Each function is a composition of two functions.
              Write the inner function and the outer function of each.

              • h(x)=(x2−5)3\displaystyle {h(x)}={(x^2-5)^3}
              • k(x)=∣x3−8∣\displaystyle {k(x)}={|x^3-8|}
              • m(x)=(2x+1)2+3(2x+1)\displaystyle {m(x)}={(2x+1)^2+3(2x+1)}
              Exercise 6

              The function is f(x)=∣x2−4∣\displaystyle {f(x)}={|x^2-4|}.

              a

              Mark on the board the points where the graph of f\displaystyle f meets the line y=3\displaystyle {y}={3}.

              f(x)=∣x2−4∣\displaystyle f(x)=|x^{2}-4|
              g(x)=3\displaystyle g(x)=3

              b

              Solve the equation f(x)=3\displaystyle {f(x)}={3}.

                c

                Solve the inequality f(x)<3\displaystyle f(x)<3.
                Check on the board: where is the graph below the line?