# 4.2: Understanding the Basic Functions

$$\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}$$

Learning Objectives

• Define and graph seven basic functions.
• Define and graph piecewise functions.
• Evaluate piecewise defined functions.

Prerequisite Skills

Before you get started, take this prerequisite quiz.

1. Simplify $$(-3)^2$$ without using a calculator.

$$9$$

If you missed this problem, review here. (Note that this will open a different textbook in a new window.)

2. Simplify $$(-3)^3$$ without using a calculator.

$$-27$$

If you missed this problem, review here. (Note that this will open a different textbook in a new window.)

3. Simplify $$|-3|$$.

$$3$$

If you missed this problem, review here. (Note that this will open a different textbook in a new window.)

4. Simplify $$\sqrt{4}$$.

$$2$$

If you missed this problem, review here. (Note that this will open a different textbook in a new window.)

5. Simplify $$\dfrac{1}{1/3}$$.

$$3$$

If you missed this problem, review here. (Note that this will open a different textbook in a new window.)

## Basic Functions

In this section we graph seven basic functions that will be used throughout this course. Each function is graphed by plotting points. Remember that $$f (x) = y$$ and thus $$f (x)$$ and $$y$$ can be used interchangeably.

Any function of the form $$f (x) = c$$, where $$c$$ is any real number, is called a constant function43. Constant functions are linear and can be written $$f (x) = 0x + c$$. In this form, it is clear that the slope is $$0$$ and the $$y$$-intercept is $$(0, c)$$. Evaluating any value for $$x$$, such as $$x = 2$$, will result in $$c$$.

The graph of a constant function is a horizontal line. The domain is $$(-\infty,\infty)$$ and the range consists of the single value $$\{c\}$$.

We next define the identity function44 $$f (x) = x$$. Evaluating any value for $$x$$ will result in that same value. For example, $$f (0) = 0$$ and $$f (2) = 2$$. The identity function is linear, $$f (x) = 1x + 0$$, with slope $$m = 1$$ and $$y$$-intercept $$(0, 0)$$.

The domain and range both consist of all real numbers, $$(-\infty,\infty)$$.

The squaring function45, defined by $$f (x) = x^{2}$$, is the function obtained by squaring the values in the domain. For example, $$f (2) = (2)^{2} = 4$$ and $$f (−2) = (−2)^{2} = 4$$.The result of squaring nonzero values in the domain will always be positive.

The resulting curved graph is called a parabola46. The domain is $$(-\infty,\infty)$$ and the range is $$[0, ∞)$$.  We will look at parabolas more in depth in Section 2.4.

The cubing function47, defined by $$f (x) = x^{3}$$, raises all of the values in the domain to the third power. The results can be either negative, zero, or positive. For example, $$f (-1) = (-1)^{3} = -1, f (0) = (0)^{3} = 0$$, and $$f (1) = (1)^{3} = 1$$.

The domain and range both consist of all real numbers, $$(-\infty,\infty)$$.

Note that the constant, identity, squaring, and cubing functions are all examples of basic polynomial functions. The next three basic functions are not polynomials.

The absolute value function48, defined by $$f (x) = |x|$$, is a function where the output represents the distance to the origin on a number line. The result of evaluating the absolute value function for any nonzero value of $$x$$ will always be positive. For example, $$f (−2) = |−2| = 2$$ and $$f (2) = |2| = 2$$.

Like the parabola, the domain is $$(-\infty,\infty)$$ and the range is $$[0, ∞)$$.

The square root function49, defined by $$f (x) = \sqrt{x}$$, is not defined to be a real number if the $$x$$-values are negative. Therefore, the smallest value in the domain is zero. For example, $$f (0) = \sqrt{0}= 0$$ and $$f (4) = \sqrt{4}= 2$$.

The domain and range both consist of real numbers greater than or equal to zero $$[0, ∞)$$.

The reciprocal function50, defined by $$f (x) = \frac{1}{x}$$, is a rational function with one restriction on the domain, namely $$x ≠ 0$$. The reciprocal of an $$x$$-value very close to zero is very large. For example,

\begin{aligned} f ( 1 / 10 ) &= \frac { 1 } { \left( \frac { 1 } { 10 } \right) } = 1 \cdot \frac { 10 } { 1 } = 10 \\ f ( 1 / 100 ) &= \frac { 1 } { \left( \frac { 1 } { 100 } \right) } = 1 \cdot \frac { 100 } { 1 } = 100 \\ f ( 1 / 1,000 )& = \frac { 1 } { \left( \frac { 1 } { 1,000 } \right) } = 1 \cdot \frac { 1,000 } { 1 } = 1,000 \end{aligned}

In other words, as the $$x$$-values approach zero their reciprocals will tend toward either positive or negative infinity. This describes a vertical asymptote51 at the $$y$$-axis. Furthermore, where the $$x$$-values are very large the result of the reciprocal function is very small.

\begin{aligned} f ( 10 ) & = \frac { 1 } { 10 } = 0.1 \\ f ( 100 ) & = \frac { 1 } { 100 } = 0.01 \\ f ( 1000 ) & = \frac { 1 } { 1,000 } = 0.001 \end{aligned}

In other words, as the $$x$$-values become very large the resulting $$y$$-values tend toward zero. This describes a horizontal asymptote52 at the $$x$$-axis. After plotting a number of points the general shape of the reciprocal function can be determined.

Both the domain and range of the reciprocal function consists of all real numbers except $$0$$,or $$(−∞, 0) ∪ (0, ∞)$$.  We will look at the reciprocal function more in depth in Section 2.6.

In summary, the basic polynomial functions are:

Figure 2.4.8

The basic nonpolynomial functions are:

## Piecewise Defined Functions

A piecewise function53, or split function54, is a function whose definition changes depending on the value in the domain. For example, we can write the absolute value function $$f(x) = |x|$$ as a piecewise function:

$$f ( x ) = | x | = \left\{ \begin{array} { c l } { x } & { \text { if } x \geq 0 } \\ { - x } & { \text { if } x < 0 } \end{array} \right.$$

In this case, the definition used depends on the sign of the $$x$$-value. If the $$x$$-value is positive, $$x ≥ 0$$, then the function is defined by $$f(x) = x$$. And if the $$x$$-value is negative, $$x < 0$$, then the function is defined by $$f(x) = −x$$.

Following is the graph of the two pieces on the same rectangular coordinate plane:

Example $$\PageIndex{1}$$:

Graph: $$g ( x ) = \left\{ \begin{array} { c c c } { x ^ { 2 } } & { \text { if } } & { x < 0 } \\ { \sqrt { x } } & { \text { if } } & { x \geq 0 } \end{array} \right.$$.

Solution

In this case, we graph the squaring function over negative $$x$$-values and the square root function over positive $$x$$-values.

Notice the open dot used at the origin for the squaring function and the closed dot used for the square root function. This was determined by the inequality that defines the domain of each piece of the function. The entire function consists of each piece graphed on the same coordinate plane.

When evaluating, the value in the domain determines the appropriate definition to use.

Example $$\PageIndex{2}$$:

Given the function $$h ( t ) = \left\{ \begin{array} { l l } { 7t + 3 } & { \text { if } t < 0 } \\ { −16t^{2} + 32t } & { \text { if } t \geq 0 } \end{array} \right.$$, find $$h(−5), h(0),$$ and $$h(3)$$.

Solution

Use $$h(t) = 7t + 3$$ where $$t$$ is negative, as indicated by $$t < 0$$.

\begin{aligned} h ( t ) & = 7 t + 5 \\ h ( \color{Cerulean}{- 5}\color{Black}{ )} & = 7 ( \color{Cerulean}{- 5}\color{Black}{)} + 3 \\ & = - 35 + 3 \\ & = - 32 \end{aligned}

Where $$t$$ is greater than or equal to zero, use $$h(t) = −16t^{2} + 32t$$.

\begin{aligned} h ( \color{Cerulean}{0}\color{Black}{ )} & = - 16 ( \color{Cerulean}{0}\color{Black}{ )} + 32 ( \color{Cerulean}{0}\color{Black}{ )} \text { and } h ( \color{Cerulean}{3}\color{Black}{ )} = 16 ( \color{Cerulean}{3}\color{Black}{ )} ^ { 2 } + 32 ( \color{Cerulean}{3}\color{Black}{ )} \\ & = 0 + 0 \quad\quad\quad\quad\quad\:\quad = -144 +96 \\ & = 0 \quad\quad\quad\quad\quad\quad\quad\quad = - 48 \end{aligned}

$$h(−5) = −32, h(0) = 0,$$ and $$h(3) = −48$$

Exercise $$\PageIndex{1}$$

Graph: $$f ( x ) = \left\{ \begin{array} { l l } { \frac { 2 } { 3 } x + 1 } & { \text { if } x < 0 } \\ { x ^ { 2 } } & { \text { if } x \geq 0 } \end{array} \right.$$.

The definition of a function may be different over multiple intervals in the domain.

Example $$\PageIndex{3}$$:

Graph: $$f ( x ) = \left\{ \begin{array} { l l } { x ^ { 3 } } & { \text { if } x < 0 } \\ { x } & { \text { if } 0 \leq x \leq 4 } \\ { 6 } & { \text { if } x > 4 } \end{array} \right.$$.

Solution

In this case, graph the cubing function over the interval $$(−∞,0)$$. Graph the identity function over the interval $$[0,4]$$. Finally, graph the constant function $$f(x)=6$$ over the interval $$(4,∞)$$. And because $$f(x)=6$$ where $$x>4$$, we use an open dot at the point $$(4,6)$$. Where $$x=4$$, we use $$f(x)=x$$ and thus $$(4,4)$$ is a point on the graph as indicated by a closed dot.

Many applications can be represented by a piecewise function.

Example $$\PageIndex{4}$$:

A drive-in movie theater charges $3 per person if there are fewer than 4 people in the car, or a flat fee of$10 if there are 4 or more people in the car.

This can be modeled by $$C( p ) = \left\{ \begin{array} { l l } { 3p } & { \text { if } p < 4 } \\ { 10 } & { \text { if } p \geq 4 } \end{array} \right.$$ where $$C$$ is the cost for $$p$$ people.  Find and interpret each of the following.

a. $$C(5)$$

b. $$C(4)$$

c. $$C(3)$$

Solution

a.  $$C(5)$$ tells us to find the cost when $$p=5$$, or when there are 5 people in the car.  Since $$p \geq 4$$, we will use the bottom equation.

$$C(5)=10$$ so the cost will be $10. b. $$C(4)$$ tells us to find the cost when $$p=4$$, or when there are 4 people in the car. Again, since $$p \geq 4$$, we will use the bottom equation. $$C(4)=10$$ so the cost will be$10.

c.  $$C(3)$$ tells us to find the cost when $$p=3$$, or when there are 3 people in the car.  Since $$p < 4$$, we will use the top equation.

$$C(3)=3(3)$$ so the cost will be \$9.

## Key Takeaways

• Plot points to determine the general shape of the basic functions. The shape, as well as the domain and range, of each should be memorized.
• The basic polynomial functions are: $$f(x) = c, f(x) = x , f(x) = x^{2}$$, and $$f(x) = x^{3}$$.
• The basic nonpolynomial functions are: $$f(x) = |x|, f(x) = \sqrt{x}$$, and $$f(x) = \frac{1}{x}$$.
• A function whose definition changes depending on the value in the domain is called a piecewise function. The value in the domain determines the appropriate definition to use.

## Footnotes

43Any function of the form $$f(x) = c$$ where $$c$$ is a real number.

44The linear function defined by $$f(x) = x$$.

45The quadratic function defined by $$f(x) = x^{2}$$.

46The curved graph formed by the squaring function.

47The cubic function defined by $$f(x) = x^{3}$$.

48The function defined by $$f(x) = |x|$$.

49The function defined by $$f(x) = \sqrt{x}$$.

50The function defined by $$f(x) = \frac{1}{x}$$.

51A vertical line to which a graph becomes infinitely close.

52A horizontal line to which a graph becomes infinitely close where the $$x$$-values tend toward $$±∞$$.

53A function whose definition changes depending on the values in the domain.

54A term used when referring to a piecewise function.

55The function that assigns any real number $$x$$ to the greatest integer less than or equal to $$x$$ denoted $$f(x) = \left[\!\![x]\!\!\right]$$.

56A term used when referring to the greatest integer function.

4.2: Understanding the Basic Functions is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by LibreTexts.