In this topic of IBDP Mathematics, we will be talking about absolute value, and absolute value functions. This topic covers content required for both HL Analysis and Approaches (AA) and Applications and Interpretations (AI), but some will only be required for those taking AA.

**Absolute Value**

In IBDP Mathematics, the **absolute value** (or **modulus**) of a real number is given by its distance from 0 on the number line. The absolute value of* x* (with *x* being any real number) is written as *| x |.*

- Example 1: Say we are asked to find the absolute value of 8. Since the distance from 0 to 8 is 8, then we can write
*|8| = 8* - Example 2: Say we are asked to find the absolute value of -2. Since the distance from 0 to -2 is 2 (we move 2 steps in the negative direction on the number line), then we can write
*|-2| = 2*

Given that absolute values are distances, they can never be negative. Thus, the absolute value of a positive number is simply just that number (as in example 1), but the absolute value of a negative number is given by that same number, but with the sign flipped (as in example 2). This can be formally defined as:

It is important to remember this formal definition, as this can be useful further on.

**Absolute Value Functions**

In IBDP Mathematics, the relation *y = |x|* is a piecewise linear function (to learn more, click __here__). This is also known as the simplest absolute value function. The graph of the absolute value function is shown below.

The absolute value function can further be transformed.

- Relations such as
*y = |x+8|*and*y = |x-6| + |x|*are also absolute value functions - they are simply transformed. - You can try drawing the graphs for these two relations by plotting some points of each relation and connecting the lines.

The function can be generalised *y = |x-a|*, where a is a known real number. The value of |x-a| can also be described as giving the distance between x and a on the number line. This can be algebraically defined similar to how we defined |x|.

- We can use the definition of |x| to get the definition of |x-a|, by simply substituting x-a into the definition instead of x.
- The algebraic definition of |x-a| is:

You can further use these algebraic definitions to determine the linear functions for each domain. Below are two examples of how we can use this to help figure out the graph for the absolute value functions.

__Example 1__: *y = |x+8|*

- This question is fairly simple. We can see that the relation follows a similar structure to y = |x-a|, so we can utilise the definition given above.
- In order to use the definition to determine the functions for each domain, we can determine the value of a.
- We can do this by setting x+8 = x-a. Subtracting both sides by x gives us 8 = -a, thus a = -8.
- So, we can algebraically write out this relation:

- As a result, we can sketch the graph:

__Example 2__: *y = |x-6| + |x|*

- This example is a little more tricky, because it consists of not one, but two absolute value functions added together.
- In order to make it a little easier, we can break it down by writing out the algebraic definition of each part of the function.
- First, starting with
*y = |x-6|*:

- Next, writing out
*y = |x|*:

- Now, lets consider the domains we have when we look at both functions.
- One way to do this would be to look for the turning points (i.e. the points at which the functions change).
- In y = |x-6|, the turning point is at x=6, since that is where the function changes. The function on the left of x=6 is different to the function on the right of x=6.
- In y = |x|, the turning point is at x=0.
- So, when the two absolute value functions are added, both turning points will need to be incorporated - we need to split the domain based on these turning points.
- Thus, there will be three domains: x ≥ 6, 0 ≤ x < 6, and x < 0.
- Now that we have figured out the domains and how the function is separated, we need to figure out each function. We can do this by simply taking the function from each absolute value function that is within the domains given and add them together.
- For values of x ≥ 6, we can first take the function x-6 from y = |x-6| as that is the function which falls into the domain. From y= |x|, we take the function x, as this function is for values greater than 0, and since all values of x ≥ 6 are greater than 0, we can use this function . Then, we can simply add the two functions to find the function for x ≥ 6 - if x ≥ 6, then |x-6| + |x| = x-6+x = 2x-6
- For values of 0 ≤ x < 6, again, we can take the function x from y = |x|, because that function is for if x ≥ 0, which it is in this domain. However, for y = |x-6|, we should take the function 6-x, as the values of x are less than 6 within this domain. Thus, if 0 ≤ x < 6, then |x-6| + |x| = x+6-x = 6.
- For values x < 0, we take the function -x from y= |x| as that is the function that falls into this domain. From y=|x-6|, we can take the function 6-x, as this function is for values less than 6, and since all values of x < 0 are less than 6, we can use this function. Thus, if x < 0, then |x-6| + |x| = -x+6-x = 6-2x.
- Thus, this relation can be algebraically written as:

- This can then be sketched out:

**The Absolute Value of f(x) - AA Only**

In IBDP Mathematics (Analysis and Approaches only), you will also need to know how to draw the graphs for the absolute value of different functions.

- You will not only need to know how to draw the graph of |f(x)|, but you will also need to be able to draw the graph of f(|x|).

Luckily, there are simply some rules you have to follow to draw any function which has been transformed in such ways.

**The Graph of y= |f(x)|**

The absolute value of the function can be defined as:

To sketch the graph of the absolute value of a function from the original function, simply

- keep the graph for f(x) ≥ 0
- reflect the graph over the x-axis for f(x) < 0, and discard what was originally there.
- the x-intercepts are invariant (i.e. they do not change under the transformation).

Example: Say f(x) = x2+5x-6. Draw the graph of y = |f(x)|

- First, we can sketch the graph of f(x). This is shown below.

- In this graph, we can see that most of the graph is above the x-axis, thus those parts stay the same. However, between the two x-intercepts, f(x) is less than 0 (as the function is below the x-axis).
- In the absolute function of this function, we will have to reflect this part over the x-axis, and discard the parts that are below the x-axis. You can try picturing this in your head.
- The absolute function of f(x) should look like this:

**The Graph of y=f(|x|)**

We already know the definition of |x|, thus we can apply this to write out f(|x|):

To transform y=f(x) into y=f(|x|), simply:

- discard the graph for x < 0
- reflect the graph for x ≥ 0 over the y-axis, keeping what was originally there as well.
- points on the y-axis are invariant.

Example: Say f(x) = x2+5x-6. Draw the graph of f(|x|).

- Again, we can sketch the graph of f(x).

- Now, we can discard the parts of the graph on the left side of the y-axis.
- We can then reflect the remaining parts of the graph over the y-axis, keeping the remaining parts of the graph (i.e. the graph to the right of the y-axis) as well. You can try picturing this in your head.
- The graph of f(|x|) looks like this:

This is the end of this topic.