Skip to main content
Mathematics LibreTexts

19.1: The Absolute Value Function

  • Page ID
    180402
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

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

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \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{\longvect}{\overrightarrow}\)

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

    \(\newcommand{\ket}[1]{\left| #1 \right>}\)
    \(\newcommand{\bra}[1]{\left< #1 \right|}\)
    \(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
    \(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
    \(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
    \(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
    \(\newcommand{\expect}[1]{\langle #1 \rangle}\)
    \(\newcommand{\dfn}[1]{\emph{\textbf{#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}\)

    Videos

    Example: Graph Absolute Value Functions Using a Table

    Example: Domain and Range of an Absolute Value Function

    Example: Find the Equation of a Transformed Absolute Value Function From a Graph

    Example: Find the Equation of a Transformed Absolute Value Function From a Graph

    Definitions and Theorems

    Definition: Absolute Value (as a number)

    The absolute value (or modulus) of a real number \(x\), denoted \(|x|\), is its distance from zero on the real number line. It is defined by\[|x| = \begin{cases} x & \text{if } x \geq 0, \\ -x & \text{if } x \lt 0. \end{cases}\nonumber\]

    Definition: Absolute Value (as a function)

    The absolute value function is defined to be \( f(\blacksquare) = |\blacksquare| \), where\[ |\blacksquare| = \begin{cases}
    \blacksquare, & \text{ if } \blacksquare \geq 0 \\[6pt]
    -\blacksquare, & \text{ if } \blacksquare < 0 \\[6pt]
    \end{cases} \nonumber \]Its domain is all real numbers, and its range is \([0,\infty)\). When written in its fundamental form, \(f(x) = |x|\), its graph is the V-shaped curve formed by the two rays \(y=x\) (for \(x\geq 0\)) and \(y=-x\) (for \(x\lt 0\)), meeting at a single sharp corner called the vertex. For the parent function the vertex is the origin, \((0,0)\).

    Theorem: Radical Form of Absolute Value

    For every real number \(x\),\[|x| = \sqrt{x^2}.\nonumber\]Equivalently, for every real number \(x\), \(\sqrt{x^2} = |x|\).

    Caution: \(\sqrt{x^2}\) Is Not Always \(x\)

    A common error is to simplify \(\sqrt{x^2}\) to \(x\). This is valid only when \(x \geq 0\). Because the radical symbol denotes the nonnegative square root, the correct simplification for every real number \(x\) is \(\sqrt{x^2} = |x|\). For instance, \(\sqrt{(-5)^2} = \sqrt{25} = 5 = |-5|\), not \(-5\).

    Theorem: Properties of Absolute Value

    For all real numbers \(x\) and \(y\), the absolute value satisfies\[|x| \geq 0, \qquad |-x| = |x|, \qquad |x|^2 = x^2.\nonumber\]The absolute value is multiplicative and respects quotients:\[|xy| = |x|\,|y| \qquad \text{and} \qquad \left|\dfrac{x}{y}\right| = \dfrac{|x|}{|y|} \quad (y \neq 0).\nonumber\]For every integer \(n \geq 0\),\[|x^n| = |x|^n.\nonumber\]

    19_02_01.png

    Figure \(\PageIndex{1}\): Graph of \(f(x)=|x|\). The two arms have slopes \(1\) and \(-1\).
    The Sharp Vertex

    The vertex of an absolute value graph is a corner, not a smooth turning point: the graph changes direction abruptly rather than curving. This corner is the lowest point of the graph when it opens upward and the highest point when it opens downward.

    Definition: Transformed Absolute Value Function

    A transformed absolute value function is a function of the form\[f(x)=a|x-h|+k, \nonumber\]where \(a\), \(h\), and \(k\) are constants and \(a\neq 0\). The point \((h,k)\) is the vertex of its graph.

    Theorem: Graph of \(f(x)=a|x-h|+k\)

    Let \(f(x)=a|x-h|+k\) with \(a\neq 0\). Then the graph of \(f\) is a V-shaped curve with the following features.

    • The vertex is \((h,k)\).
    • The graph opens upward if \(a\gt 0\) and downward if \(a\lt 0\).
    • The right arm (for \(x\geq h\)) has slope \(a\), and the left arm (for \(x\leq h\)) has slope \(-a\).
    • The larger \(|a|\) is, the narrower the graph; the smaller \(|a|\) is, the wider the graph.
    Theorem: Piecewise Form of \(f(x)=a|x-h|+k\)

    The function \(f(x)=a|x-h|+k\) can be written without absolute value bars as\[f(x) = \begin{cases} a(x-h)+k & \text{if } x \geq h \\ -a(x-h)+k & \text{if } x \lt h \end{cases} \nonumber\]

    Caution: The Sign of the Horizontal Shift

    The vertex occurs at the value of \(x\) that makes the expression inside the bars equal to zero. Because the form is \(x-h\), a function such as \(f(x)=|x-3|+1\) has vertex \((3,1)\), shifted to the right. To read the vertex of \(f(x)=|x+2|+1\), first rewrite it as \(f(x)=|x-(-2)|+1\); the vertex is \((-2,1)\), shifted to the left.

    Examples

    Example \(\PageIndex{1}\): Reading the Features from the Equation

    For \(f(x)=2|x-3|-1\), state the vertex, the direction the graph opens, and the slope of each arm.

    Solution
    Compare with \(f(x)=a|x-h|+k\): here \(a=2\), \(h=3\), and \(k=-1\). The vertex is \((h,k)=(3,-1)\). Since \(a=2\gt 0\), the graph opens upward. The right arm has slope \(a=2\), and the left arm has slope \(-a=-2\).
    Example \(\PageIndex{2}\): A Downward-Opening Graph

    For \(f(x)=-|x+4|+5\), state the vertex, the direction the graph opens, and the slope of each arm.

    Solution
    Rewrite the inside as \(x-h\): \(f(x)=-|x-(-4)|+5\), so \(a=-1\), \(h=-4\), and \(k=5\). The vertex is \((-4,5)\). Since \(a=-1\lt 0\), the graph opens downward. The right arm has slope \(a=-1\), and the left arm has slope \(-a=1\).
    Example \(\PageIndex{3}\): A Fractional Value of \(a\)

    For \(f(x)=\dfrac{1}{2}|x+2|-3\), state the vertex, the direction the graph opens, and the slope of each arm. Compare its width to that of the parent function.

    Solution
    Writing the inside as \(x-h\) gives \(f(x)=\dfrac{1}{2}|x-(-2)|-3\), so \(a=\dfrac{1}{2}\), \(h=-2\), and \(k=-3\). The vertex is \((-2,-3)\). Since \(a=\dfrac{1}{2}\gt 0\), the graph opens upward. The right arm has slope \(\dfrac{1}{2}\), and the left arm has slope \(-\dfrac{1}{2}\). Because \(|a|=\dfrac{1}{2}\lt 1\), the graph is wider than the parent function \(f(x)=|x|\).
    Example \(\PageIndex{4}\): Graphing with a Table of Values

    Graph \(f(x)=|x-2|-3\). Identify the vertex, the \(x\)-intercepts, and the \(y\)-intercept.

    Solution

    Here \(a=1\), \(h=2\), and \(k=-3\), so the vertex is \((2,-3)\) and the graph opens upward with arms of slope \(1\) and \(-1\). Building a table of values centered at the vertex gives the following points.

    \(x\) \(f(x)\) \((x,f(x))\)
    \(-1\) \(0\) \((-1,0)\)
    \(0\) \(-1\) \((0,-1)\)
    \(2\) \(-3\) \((2,-3)\)
    \(4\) \(-1\) \((4,-1)\)
    \(5\) \(0\) \((5,0)\)

    The \(y\)-intercept is \((0,-1)\). To find the \(x\)-intercepts, set \(f(x)=0\):\[|x-2|-3=0 \quad\Longrightarrow\quad |x-2|=3 \quad\Longrightarrow\quad x-2=\pm 3. \nonumber\]Thus \(x=5\) or \(x=-1\), giving the \(x\)-intercepts \((-1,0)\) and \((5,0)\).

    19_02_02.png

    Figure \(\PageIndex{2}\): Graph of \(f(x)=|x-2|-3\).
    Example \(\PageIndex{5}\): Writing the Function in Piecewise Form

    Write \(f(x)=-2|x+1|+4\) as a piecewise-defined function.

    Solution

    Here \(a=-2\) and the vertex is at \(h=-1\), so the two pieces split at \(x=-1\). Using the piecewise form \(f(x)=a(x-h)+k\) for \(x\geq h\) and \(f(x)=-a(x-h)+k\) for \(x\lt h\):

    For \(x\geq -1\):\[f(x)=-2(x+1)+4=-2x-2+4=-2x+2. \nonumber\]For \(x\lt -1\):\[f(x)=2(x+1)+4=2x+2+4=2x+6. \nonumber\]Therefore,\[f(x) = \begin{cases} -2x+2 & \text{if } x \geq -1 \\ 2x+6 & \text{if } x \lt -1 \end{cases} \nonumber\]As a check, both pieces give \(f(-1)=4\), which matches the vertex \((-1,4)\).

    Example \(\PageIndex{6}\): Finding the Equation from a Graph

    The graph below is an absolute value function that opens upward. Use its vertex and one other point to write the function in the form \(f(x)=a|x-h|+k\).

    19_02_03.png

    Figure \(\PageIndex{3}\): Graph of an upward-opening absolute value function.
    Solution
    Reading the graph, the vertex is \((-3,2)\), so \(h=-3\) and \(k=2\), which gives \(f(x)=a|x+3|+2\). The graph also passes through the marked point \((-1,6)\). Substitute this point to solve for \(a\):\[6=a|-1+3|+2 \quad\Longrightarrow\quad 6=a(2)+2 \quad\Longrightarrow\quad 2a=4 \quad\Longrightarrow\quad a=2. \nonumber\]Therefore \(f(x)=2|x+3|+2\).

    MyOpenMath Practice


    Sources

    Several parts of this text use modifications from the following source:

    This source is released under the Creative Commons Attribution-Share-Alike License 4.0.


    19.1: The Absolute Value Function is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?