# 2.4: Absolute Value

- Page ID
- 26495

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

\( \newcommand{\Span}{\mathrm{span}}\)

\( \newcommand{\id}{\mathrm{id}}\)

\( \newcommand{\Span}{\mathrm{span}}\)

\( \newcommand{\kernel}{\mathrm{null}\,}\)

\( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\)

\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\)

\( \newcommand{\norm}[1]{\| #1 \|}\)

\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)

\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)

\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vectorC}[1]{\textbf{#1}} \)

\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Now that we have the fundamentals of piecewise-defined functions in place, we are ready to introduce the absolute value function. First, let’s state a trivial reminder of what it means to take the absolute value of a real number.

In a sense, the absolute value of a number is a measure of its magnitude, sans (without) its sign. Thus,

\[|7|=7 \qquad \text { and } \qquad |-7| =7 \nonumber \]

Here is the formal definition of the absolute value of a real number.

To find the absolute value of any real number, first locate the number on the real line.

The absolute value of the number is defined as its distance from the origin.

For example, to find the absolute value of 7, locate 7 on the real line and then find its distance from the origin.

To find the absolute value of −7, locate −7 on the real line and then find its distance from the origin.

Some like to say that taking the absolute value “produces a number that is always positive.” However, this ignores an important exception, that is,

\[|0|=0 \nonumber \]

Thus, the correct statement is “the absolute value of any real number is either positive or it is zero,” i.e., the absolute value of a real number is “not negative.”2 Instead of using the phrase “not negative,” mathematicians prefer the word “nonnegative.” When we take the absolute value of a number, the result is always nonnegative; that is, the result is either positive or zero. In symbols,

\[|x| \geq 0 \text { for all real numbers } x \nonumber \]

This makes perfect sense in light of Definition 2. Distance is always nonnegative.

However, the discussion above is not of sufficient depth to handle more sophisticated problems involving absolute value.

## A Piecewise Definition of Absolute Value

Because absolute value is intimately connected with distance, mathematicians and scientists find it an invaluable tool for measurement and error analysis. However, we will need a formulaic definition of the absolute value if we want to use this tool in a meaningful way. We need to develop a piecewise definition of the absolute value function, one that will define the absolute value for any arbitrary real number x.

We begin with a few observations. Remember, the absolute value of a number is always nonnegative (positive or zero).

- If a number is negative, negating that number will make it positive. | − 5| = −(−5) = 5, and similarly, | − 12| = −(−12) = 12. Thus, if x < 0 (if x is negative), then |x| = −x.
- If x = 0, then |x| = 0.
- If a number is positive, taking the absolute value of that number will not change a thing.

\[|5|=5, \text { and similarly, }|12|=12 \nonumber \]

Thus, if \(x>0\) (if \(x\) is positive), then \(|x|=x\).

We can summarize these three cases with a piecewise definition.

\[|x|=\left\{\begin{array}{ll}{-x,} & {\text { if } x<0} \\ {0,} & {\text { if } x=0} \\ {x,} & {\text { if } x>0}\end{array}\right. \nonumber \]

It is the first line in our piecewise definition (4) that usually leaves students scratching their heads. They might say “I thought absolute value makes a number positive (or zero), yet you have \(|x| = −x\); that is, you have the absolute value of x equal to a negative x.” Try as they might, this seems contradictory. Does it seem so to you?

However, there is no contradiction. If x < 0, that is, if x is a negative number, then −x is a positive number, and our intuitive notion of absolute value is not dissimilar to that of our piecewise definition (4). For example, if x = −8, then −x = 8, and even though we say “negative x,” in this case −x is a positive number.

If this still has you running confused, consider the simple fact that x and −x must have “opposite signs.” If one is positive, the other is negative, and vice versa. Consequently,

- if x is positive, then −x is negative, but
- if x is negative, then −x is positive.

Let’s summarize what we’ve learned thus far.

We like to use a number line to help summarize the definition of the absolute value of x.

Some remarks are in order for this summary on the number line.

- We first draw the real line then mark the “critical value” for the expression inside the absolute value bars on the number line. The number zero is a critical value for the expression x, because x changes sign as you move from one side of zero to the other.
- To the left of zero, x is a negative number. We indicate this with the minus sign below the number line. To the right of zero, x is a positive number, indicated with a plus sign below the number line.
- Above the number line, we simplify the expression |x|. To the left of zero, x is a negative number (look below the line), so |x| = −x. Note how the result −x is placed above the line to the left of zero. Similarly, to the right of zero, x is a positive number (look below the line), so |x| = x. Note how the result x is placed above the line to the right of zero.

In the piecewise definition of |x| in (4), note that we have three distinct pieces, one for each case discussed above. However, because |0| = 0, we can include this case with the piece |x| = x, if we adjust the condition to include zero.

\[|x|=\left\{\begin{array}{ll}{-x,} & {\text { if } x<0} \\ {x,} & {\text { if } x \geq 0}\end{array}\right. \nonumber \]

Note that this piecewise definition agrees with our discussion to date.

- In the first line of equation (6), if x is a negative number (i.e., if \(x < 0\)), then the absolute value must change x to a positive number by negating. That is, |x| = −x.
- In the second line of equation (6), if x is positive or zero (i.e., if \(x \geq 0\)), then there’s nothing to do except remove the absolute value bars. That is, |x| = x.

Because |0| = −0, we could just as well include the case for zero on the left, defining the absolute value with

\[|x|=\left\{\begin{array}{ll}{-x,} & {\text { if } x \leq 0} \\ {x,} & {\text { if } x>0}\end{array}\right. \nonumber \]

However, in this text we will always include the critical value on the right, as shown in Definition 5.

## Constructing Piecewise Definitions

Let’s see if we can determine piecewise definitions for other expressions involving absolute value.

Determine a piecewise definition for |x − 2|.

###### Solution

First, set the expression inside the absolute value bars equal to zero and solve for x.

\[\begin{aligned} x-2 &=0 \\ x &=2 \end{aligned} \nonumber \]

Note that x − 2 = 0 at x = 2. This is the “critical value” for this expression. Draw a real line and mark this critical value of x on the line. Place the expression x − 2 below the line at its left end.

Next, determine the sign of x − 2 for values of x on each side of 2. This is easily done by “testing” a point on each side of 2 in the expression x − 2.

- Take x = 1, which lies to the left of the critical value 2 on our number line. Substitute this value of x in the expression x − 2, obtaining

\[x-2=1-2=-1 \nonumber \]

which is negative. Indeed, regardless of which x-value you pick to the left of 2, when inserted into the expression x − 2, you will get a negative result (you should check this for other values of x to the left of 2). We indicate that the expression x − 2 is negative for values of x to the left of 2 by placing a minus (−) sign below the number line to the left of 2.

- Next, pick x = 3, which lies to the right of the critical value 2 on the number line. Substitute this value of x into the expression x − 2, obtaining

\[x-2=3-2=1 \nonumber \]

which is positive. Indeed, regardless of which x-value you pick to the right of 2, when inserted into the expression x − 2, you will get a positive result (you should check this for other values of x to the right of 2). We indicate that the expression x − 2 is positive for values of x to the right of 2 by placing a plus (+) sign below the number line to the right of 2 (see the number line above).

The next step is to remove the absolute value bars from the expression |x−2|, depending on the sign of x − 2.

- To the left of 2, the expression x − 2 is negative (note the minus sign (−) below the number line), so |x − 2| = −(x − 2). That is, we have to negate x − 2 to make it positive. This is indicated by placing −(x − 2) above the line to the left of 2.

- To the right of 2, the expression x − 2 is positive (note the plus sign (+) below the line), so |x − 2| = x − 2. That is, we simply remove the absolute value bars because the quantity inside is already positive. This is indicated by placing x − 2 above the line to the right of 2 (see the number line above).

We can use this last number line summary to construct a piecewise definition of the expression |x − 2|.

\[|x-2|=\left\{\begin{array}{ll}{-(x-2),} & {\text { if } x<2,} \\ {x-2,} & {\text { if } x \geq 2}\end{array}=\left\{\begin{array}{ll}{-x+2,} & {\text { if } x<2} \\ {x-2,} & {\text { if } x \geq 2}\end{array}\right.\right. \nonumber \]

Our number line and piecewise definition agree: |x − 2| = −(x − 2) to the left of 2 and |x − 2| = x − 2 to the right of 2. Further, note how we’ve included the critical value of 2 “on the right” in our piecewise definition.

Let’s summarize the method we followed to construct the piecewise function above.

When presented with the absolute value of an algebraic expression, perform the following steps to remove the absolute value bars and construct an equivalent piecewise definition.

- Take the expression that is inside the absolute value bars, and set that expression equal to zero. Then solve for x. This value of x is called a “critical value.” (Note: The expression inside the absolute value bars could have more than one critical value. We will not encounter such problems in this text.)
- Place your critical value on a number line.
- Place the expression inside the absolute value bars below the number line at the left end.
- Test the sign of the expression inside the absolute value bars by inserting a value of x from each side of the critical value and marking the result with a plus (+) or minus (−) sign below the number line.
- Place the original expression, the one including the absolute value bars, above the number line at the left end.
- Use the sign of the expression inside the absolute value bars (indicated by the plus and minus signs below the number line) to remove the absolute value bars, placing the results above the number line on each side of the critical value.
- Construct a piecewise definition that mimics the results on the number line.

Let’s apply this technique to another example.

Determine a piecewise definition for |3 − 2x|.

###### Solution

**Step 1**: First set the expression inside the absolute value bars equal to zero and solve for x.

\[\begin{aligned} 3-2 x &=0 \\ x &=3 / 2 \end{aligned} \nonumber \]

Note that 3 − 2x = 0 at x = 3/2. This is the “critical value” for this expression.

**Steps 2 and 3**: Draw a number line and mark this critical value on the line. The next step requires that we place the expression inside the absolute value bars, namely 3 − 2x, underneath the line at its left end.

**Step 4**: Next, determine the sign of 3 − 2x for values of x on each side of 3/2. This is easily done by “testing” a point on each side of 3/2 in the expression 3 − 2x.

- Take x = 1, which lies to the left of 3/2. Substitute this value of x into the expression 3 − 2x, obtaining \[3-2 x=3-2(1)=1 \nonumber \] which is positive. Indicate this result by placing a plus sign (+) below the number line to the left of 3/2.

- Next, pick x = 2, which lies to the right of 3/2. Substitute this value of x into the expression 3 − 2x, obtaining \[3-2 x=3-2(2)=-1 \nonumber \] which is negative. Indicate this result by placing a negative sign (−) below the line to the right of 3/2 (see the number line above).

**Steps 5 and 6**: Place the original expression, namely |3 − 2x|, above the number line at the left end. The next step is to remove the absolute value bars from the expression |3 − 2x|.

- To the left of 3/2, the expression 3 − 2x is positive (note the plus sign (+) below the number line), so |3−2x| = 3−2x. Indicate this result by placing the expression 3 − 2x above the number line to the left of 3/2.

- To the right of 3/2, the expression 3−2x is negative (note the minus sign (−) below the numberline), so |3−2x| = −(3−2x). That is, we have to negate 3−2x to make it positive. This is indicated by placing the expression −(3 − 2x) above the line to the right of 3/2 (see the number line above).

**Step 7**: We can use this last number line summary to write a piecewise definition for the expression |3 − 2x|.

\[|3-2 x|=\left\{\begin{array}{ll}{3-2 x,} & {\text { if } x<3 / 2 .} \\ {-(3-2 x),} & {\text { if } x \geq 3 / 2}\end{array}=\left\{\begin{array}{ll}{3-2 x,} & {\text { if } x<3 / 2} \\ {-3+2 x,} & {\text { if } x \geq 3 / 2}\end{array}\right.\right. \nonumber \]

Again, note how we’ve included the critical value of 3/2 “on the right.”

## Drawing the Graph of an Absolute Value Function

Now that we know how to construct a piecewise definition for an expression containing absolute value bars, we can use what we learned in the previous section to draw the graph.

Sketch the graph of the function f(x) = |3 − 2x|.

###### Solution

In Example \(\PageIndex{2}\), we constructed the following piecewise definition.

\[f(x)=|3-2 x|=\left\{\begin{array}{ll}{3-2 x,} & {\text { if } x<3 / 2} \\ {-3+2 x,} & {\text { if } x \geq 3 / 2}\end{array}\right. \nonumber \]

We now sketch each piece of this function.

- If x < 3/2, then f(x) = 3 − 2x (see equation (10)). This is a ray, starting at x = 3/2 and extending to the left. At x = 3/2,

\[f(3 / 2)=3-2(3 / 2)=3-3=0 \nonumber \]

Thus, the endpoint of the ray is located at (3/2, 0).

Next, pick a value of x that lies to the left of 3/2. At x = 0,

\[f(0)=3-2(0)=3-0=3 \nonumber \]

Thus, a second point on the ray is (0, 3).

A table containing the two evaluated points and a sketch of the accompanying ray are shown in Figure \(\PageIndex{1}\). Because f(x) = 3 − 2x only if x is strictly less than 3/2, the point at (3/2, 0) is unfilled.

Figure \(\PageIndex{1}\). f(x) = 3 − 2x when x < 3/2.- If x ≥ 3/2, then f(x) = −3 + 2x (see equation (10)). This is a ray, starting at x = 3/2 and extending to the right. At x = 3/2, \[f(3 / 2)=-3+2(3 / 2)=-3+3=0 \nonumber \]

Thus, the endpoint of the ray is located at (3/2, 0).

Next, pick a value of x that lies to the right of 3/2. At x = 3, \[f(3)=-3+2(3)=-3+6=3 \nonumber \]

Thus, a second point on the ray is (3, 3). A table containing the two evaluated points and a sketch of the accompanying ray are shown in Figure \(\PageIndex{2}\). Because f(x) = −3 + 2x for all values of x that are greater than or equal to 3/2, the point at (3/2, 0) is filled in this plot.

Figure \(\PageIndex{2}\). f(x) = −3 + 2x when \(x \geq 3/2\).- To sketch the graph of f(x) = |3 − 2x|, we need only combine the two pieces from Figures \(\PageIndex{1}\) and \(\PageIndex{2}\). The result is shown in Figure \(\PageIndex{3}\).

Note the “V-shape” of the graph. We will refer to the point at the tip of the “V” as the vertex of the absolute value function.

In Figure \(\PageIndex{3}\), the equation of the left-hand branch of the “V” is y = 3 − 2x. An alternate approach to drawing this branch is to note that its graph is contained in the graph of the full line y = 3 − 2x, which has slope −2 and y-intercept at (0, 3). Thus, one could draw the full line using the slope and y-intercept, then erase that part of the line that lies to the right of x = 3/2. A similar strategy would work for the right-hand branch of y = |3 − 2x|.

## Using Transformations

Consider again the basic definition of the absolute value of x.

\[f(x)=|x|=\left\{\begin{array}{ll}{-x,} & {\text { if } x<0} \\ {x,} & {\text { if } x \geq 0}\end{array}\right. \nonumber \]

Some basic observations are:

- If x < 0, then f(x) = −x. This ray starts at the origin and extends to the left with slope −1. Its graph is pictured in Figure \(\PageIndex{4}\)(a).
- If \(x \geq 0\), then f(x) = x. This ray starts at the origin and extends to the right with slope 1. Its graph is pictured in Figure \(\PageIndex{4}\)(b).
- We combine the graphs in Figures \(\PageIndex{4}\)(a) and \(\PageIndex{4}\)(b) to produce the graph of f(x) = |x| in Figure \(\PageIndex{4}\)(c).

You should commit the graph of f(x) = |x| to memory. Things to note:

- The graph of f(x) = |x| is “V-shaped.”
- The vertex of the graph is at the point (0, 0).
- The left-hand branch has equation y = −x and slope −1.
- The right-hand branch has equation y = x and slope 1.
- Each branch of the graph of f(x) = |x| forms a perfect 45◦ angle with the x-axis.

Now that we know how to draw the graph of f(x) = |x|, we can use the transformations we learned in Chapter 2 (sections 5 and 6) to sketch a number of simple graphs involving absolute value.

Sketch the graph of f(x) = |x − 3|.

###### Solution

First, sketch the graph of y = f(x) = |x|, as shown in Figure \(\PageIndex{5}\)(a). Note that if f(x) = |x|, then

\[y=f(x-3)=|x-3| \nonumber \]

To sketch the graph of y = f(x − 3) = |x − 3|, shift the graph of y = f(x) = |x| three units to the right, producing the result shown in Figure \(\PageIndex{5}\)(b).

Figure \(\PageIndex{5}\). To draw the graph of y = |x − 3|, shift the graph of y = |x| three units to the right.We can check this result using the graphing calculator. Load the function f(x) = |x − 3| into Y1 in the Y= menu on your graphing calculator as shown in Figure \(\PageIndex{6}\)(a). Push the MATH button, right-arrow to the NUM menu, then select 1:abs( (see Figure \(\PageIndex{6}\)(b)) to enter the absolute value in Y1. Push the ZOOM button, then select 6:ZStandard to produce the image shown in Figure \(\PageIndex{6}\)(c).

Figure \(\PageIndex{6}\). Using the graphing calculator to draw the graph of f(x) = |x − 3|.Let’s look at another simple example.

Sketch the graph of f(x) = |x| − 4.

###### Solution

First, sketch the graph of y = f(x) = |x|, as shown in Figure \(\PageIndex{7}\)(a). Note that if f(x) = |x|, then \[y=f(x)-4=|x|-4 \nonumber \]

To sketch the graph of y = f(x) − 4 = |x| − 4, shift the graph of y = f(x) = |x| downward 4 units, producing the result shown in Figure \(\PageIndex{5}\)(b).

Figure \(\PageIndex{7}\). To draw the graph of y = |x| − 4, shift the graph of y = |x| downward 4 units.Let’s look at one final example.

Sketch the graph of f(x) = −|x| + 5. State the domain and range of this function.

###### Solution

- First, sketch the graph of y = f(x) = |x|, as shown in Figure \(\PageIndex{8}\)(a).
- Next, sketch the graph of y = −f(x) = −|x|, which is a reflection of the graph of y = f(x) = |x| across the x-axis and is pictured in Figure \(\PageIndex{8}\)(b).
- Finally, we will want to sketch the graph of y = −f(x) + 5 = −|x| + 5. To do this, we shift the graph of y = −f(x) = −|x| in Figure \(\PageIndex{8}\)(b) upward 5 units to produce the result in Figure \(\PageIndex{8}\)(c).

To find the domain of f(x) = −|x| + 5, project all points on the graph onto the x-axis, as shown in Figure \(\PageIndex{9}\)(a). Thus, the domain of f is \((-\infty, \infty)\). To find the range, project all points on the graph onto the y-axis, as shown in Figure \(\PageIndex{9}\)(b). Thus, the range is \((-\infty, 5]\).

## Exercise

For each of the functions in **Exercises 1**-**8**, as in Examples 7 and 8 in the narrative, mark the “critical value” on a number line, then mark the sign of the expression inside of the absolute value bars below the number line. Above the number line, remove the absolute value bars according to the sign of the expression you marked below the number line. Once your number line summary is finished, create a piecewise definition for the given absolute value function.

f(x) = |x+1|

**Answer**-
\[f(x)=\left\{\begin{array}{ll}{-x-1,} & {\text { if } x<-1} \\ {x+1,} & {\text { if } x \ge -1} \nonumber \end{array}\right. \nonumber \]

f(x) = |x−4|

g(x) = |4−5x|

**Answer**-
\[g(x)=\left\{\begin{array}{ll}{4-5x,} & {\text { if } x<\frac{4}{5}} \\ {-4+5x,} & {\text { if } x \ge \frac{4}{5}} \nonumber \end{array}\right. \nonumber \]

g(x) = |3−2x|

h(x) = |−x−5|

**Answer**-
\[h(x)=\left\{\begin{array}{ll}{-x-5,} & {\text { if } x<-5} \\ {x+5,} & {\text { if } x \ge -5} \nonumber \end{array}\right. \nonumber \]

h(x) = |−x−3|

f(x) = x+|x|

**Answer**-
\[f(x)=\left\{\begin{array}{ll}{0,} & {\text { if } x<0} \\ {2x,} & {\text { if } x \ge 0} \nonumber \end{array}\right. \nonumber \]

\(f(x) = \frac{|x|}{x}\)

For each of the functions in **Exercises 9**-**16**, perform each of the following tasks.

- Create a piecewise definition for the given function, using the technique in
**Exercises****1**-**8**and Examples 7 and 8 in the narrative. - Following the lead in Example 9 in the narrative, use your piecewise definition to sketch the graph of the given function on a sheet of graph paper. Please place each exercise on its own coordinate system.

f(x) = |x−1|

**Answer**-
\[f(x)=\left\{\begin{array}{ll}{-x+1,} & {\text { if } x<1} \\ {x-1,} & {\text { if } x \ge 1} \nonumber \end{array}\right. \nonumber \]

f(x) = |x+2|

g(x) = |2x−1|

**Answer**-
\[g(x)=\left\{\begin{array}{ll}{-2x+1,} & {\text { if } x<\frac{1}{2}} \\ {2x-1,} & {\text { if } x \ge \frac{1}{2}} \nonumber \end{array}\right. \nonumber \]

g(x) = |5−2x|

h(x) = |1−3x|

**Answer**-
\[h(x)=\left\{\begin{array}{ll}{1-3x,} & {\text { if } x<\frac{1}{3}} \\ {-1+3x,} & {\text { if } x \ge \frac{1}{3}} \nonumber \end{array}\right. \nonumber \]

h(x) = |2x+1|

f(x) = x−|x|

**Answer**-
\[f(x)=\left\{\begin{array}{ll}{2x,} & {\text { if } x<0} \\ {0,} & {\text { if } x \ge 0} \nonumber \end{array}\right. \nonumber \]

f(x) = x+|x−1|

Use a graphing calculator to draw the graphs of y = |x|, y = 2|x|, y = 3|x|, and y = 4|x| on the same viewing window. In your own words, explain what you learned in this exercise.

**Answer**-
Multiplying by a factor of a > 1, as in y = a|x|, stretches the graph of y = |x| vertically by a factor of a. The higher the value of a, the more it stretches vertically.

Use a graphing calculator to draw the graphs of y = |x|, y = (1/2)|x|, y = (1/3)|x|, and y = (1/4)|x| on the same viewing window. In your own words, explain what you learned in this exercise.

Use a graphing calculator to draw the graphs of y = |x|, y = |x−2|, y =|x−4|, and y = |x−6| on the same viewing window. In your own words, explain what you learned in this exercise.

**Answer**-
Subtracting a positive value of a, as in y = |x−a|, shifts the graph a units to the right.

Use a graphing calculator to draw the graphs of y = |x|, y = |x+2|, y = |x+4|, and y = |x+6| on the same view- ing window. In your own words, explain what you learned in this exercise.

In **Exercises 21**-**36**, perform each of the following tasks. Feel free to check your work with your graphing calculator, but you should be able to do all of the work by hand.

- Set up a coordinate system on a sheet of graph paper. Label and scale each axis. Create an accurate plot of the function y = |x| on your coordinate system and label this graph with its equation.
- Use the technique of Examples 12,13, and 14 in the narrative to help select the appropriate geometric transformations to transform the equation y = |x| into the form of the function given in the exercise. On the same coordinate system, use a different colored pencil or pen to draw the graph of the function resulting from your applied transformation. Label the resulting graph with its equation.
- Use interval notation to describe the domain and range of the given function.

f(x) = |−x|

**Answer**-
The graphs of y = |x| and y = |−x| coincide. The domain is \((−\infty, \infty)\) and the range is \([0, \infty)\).

f(x) = −|x|

\(f(x) = \frac{1}{2}|x|\)

**Answer**-
The domain is \((−\infty, \infty)\) and the range is \([0, \infty)\).

f(x) = −2|x|

f(x) = |x+4|

**Answer**-
The domain is \((−\infty, \infty)\) and the range is \([0, \infty)\).

f(x) = |x−2|

f(x) = |x|+2

**Answer**-
The domain is \((−\infty, \infty)\) and the range is \([2, \infty)\).

f(x) = |x|−3

f(x) = |x+3|+2

**Answer**-
The domain is \((−\infty, \infty)\) and the range is \([2, \infty)\).

f(x) = |x−3|−4

f(x) = −|x−2|

**Answer**-
The domain is \((−\infty, \infty)\) and the range is \((−\infty, 0]\).

f(x) = −|x|−2

f(x) = −|x|+4

**Answer**-
The domain is \((−\infty, \infty)\) and the range is \((−\infty, 4]\).

f(x) = −|x+4|

f(x) = −|x−1|+5

**Answer**-
The domain is \((−\infty, \infty)\) and the range is \((−\infty, 5]\).

f(x) = −|x+5|+2