9.2: The Definition of a Function
- Page ID
- 173875
\( \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{\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}\)Definitions and Theorems
A function is a relation in which each possible input value leads to exactly one output value. We say the output is a function of the input. The set of input values makes up the domain of the function, and the corresponding set of output values makes up the range of the function.
A symbol that stands for an arbitrary input for a given function is called an independent variable, while a symbol that stands for an arbitrary output for a given function is called a dependent variable.
The defining requirement of a function is that each input is assigned exactly one output. Two different inputs may share the same output—this is permitted. What is never permitted is a single input assigned to two different outputs; a rule that does so is not a function.
An equation in \(x\) and \(y\) defines \(y\) as a function of \(x\) when each allowable value of \(x\) yields exactly one value of \(y\). To test an equation, solve it for \(y\): if the result assigns more than one value of \(y\) to some \(x\)—for instance, through a \(\pm\) produced by an even root—then \(y\) is not a function of \(x\).
A set of points in a rectangular coordinate system is the graph of a function if and only if every vertical line intersects the graph in at most one point.
Examples
Determine whether each set of ordered pairs defines \(y\) as a function of \(x\).
- \(\{(-3,5),(-1,2),(0,5),(4,1)\}\)
- \(\{(2,1),(2,3),(5,4),(7,6)\}\)
- Solutions
-
- The inputs are \(-3,-1,0,\) and \(4\), and each appears exactly once, so every input has a single output. The output \(5\) occurs twice, but repeated outputs are allowed. This set is a function.
- The input \(2\) is paired with both \(1\) and \(3\). Because one input has two different outputs, this set is not a function.
Determine whether each equation defines \(y\) as a function of \(x\).
- \(y=3x-2\)
- \(x=y^2\)
- Solutions
-
- For any chosen value of \(x\), the expression \(3x-2\) produces exactly one number. Each input yields a single output, so the equation defines \(y\) as a function of \(x\).
- Choose \(x=9\). Then \(y^2=9\), so \(y=3\) or \(y=-3\). The single input \(9\) produces two outputs, so the equation does not define \(y\) as a function of \(x\).
Determine whether each equation defines \(y\) as a function of \(x\) by first solving for \(y\).
- \(2x-3y=6\)
- \(x=y^2-1\)
- Solutions
-
- Isolate \(y\):\[2x-3y=6 \quad\Longrightarrow\quad -3y=6-2x \quad\Longrightarrow\quad y=\dfrac{2x-6}{3}.\nonumber\]Each value of \(x\) gives exactly one value of \(y\), so \(y\) is a function of \(x\).
- Isolate \(y\):\[x=y^2-1 \quad\Longrightarrow\quad y^2=x+1 \quad\Longrightarrow\quad y=\pm\sqrt{x+1}.\nonumber\]The \(\pm\) shows that some inputs produce two outputs; for example, \(x=3\) gives \(y=2\) and \(y=-2\). Thus \(y\) is not a function of \(x\).
The table below records several input-output pairs of a relation. Does the relation define \(y\) as a function of \(x\)?
| \(x\) | \(y\) |
|---|---|
| 3 | 1 |
| 5 | 2 |
| 3 | 7 |
| 8 | 4 |
- Solution
- Read down the \(x\)-column and check for repeated inputs. The input \(3\) appears in two rows, once with output \(1\) and once with output \(7\). Because a single input is paired with two different outputs, the relation is not a function.
Figure \(\PageIndex{1}\) shows the graph of \(f(x)=x^2-4\). Use the Vertical Line Test to decide whether the graph represents a function of \(x\).
- Solution
- Every vertical line \(x=a\) meets the parabola at exactly one point, because for each input \(a\) the formula returns the single output \(a^2-4\). The dashed line \(x=1\) in Figure \(\PageIndex{1}\), for instance, crosses the graph only at \((1,-3)\). Since no vertical line meets the graph more than once, the Vertical Line Test confirms that the graph represents a function of \(x\).
Figure \(\PageIndex{2}\) shows the graph of \(x^2+y^2=25\), a circle of radius \(5\) centered at the origin. Use the Vertical Line Test to decide whether the graph represents a function of \(x\).
- Solution
- The dashed vertical line \(x=3\) meets the circle at the two points \((3,4)\) and \((3,-4)\), so the single input \(3\) would correspond to two outputs. Because a vertical line meets the graph more than once, the Vertical Line Test shows that the graph does not represent a function of \(x\).
Sources
Several parts of this text use modifications from the following sources:
- Wikipedia article: "Function (mathematics)"
- Wikipedia article: "Vertical line test"
All of these sources are released under the Creative Commons Attribution-Share-Alike License 4.0.


