Skip to main content
Mathematics LibreTexts

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

    Definition: Function

    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.

    Definition: Independent and Dependent Variables

    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.

    Caution: One Input, One Output

    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.

    Testing an Equation

    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\).

    Theorem: Vertical Line Test

    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

    Example \(\PageIndex{1}\): Identifying a Function from a List

    Determine whether each set of ordered pairs defines \(y\) as a function of \(x\).

    1. \(\{(-3,5),(-1,2),(0,5),(4,1)\}\)
    2. \(\{(2,1),(2,3),(5,4),(7,6)\}\)
    Solutions
    1. 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.
    2. The input \(2\) is paired with both \(1\) and \(3\). Because one input has two different outputs, this set is not a function.
    Example \(\PageIndex{2}\): Identifying a Function from an Equation

    Determine whether each equation defines \(y\) as a function of \(x\).

    1. \(y=3x-2\)
    2. \(x=y^2\)
    Solutions
    1. 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\).
    2. 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\).
    Example \(\PageIndex{3}\): Solving for \(y\) to Test for a Function

    Determine whether each equation defines \(y\) as a function of \(x\) by first solving for \(y\).

    1. \(2x-3y=6\)
    2. \(x=y^2-1\)
    Solutions
    1. 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\).
    2. 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\).
    Example \(\PageIndex{4}\): Identifying a Function from a Table

    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.
    Example \(\PageIndex{5}\): Applying the Vertical Line Test

    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\).

    Graph of a parabola shown on a Cartesian plane with a vertex at (1, -3) and a dashed vertical line at x=1.
    Figure \(\PageIndex{1}\): The graph of \(f(x)=x^2-4\) on the window \([-5,5]\times[-6,6]\), together with the dashed vertical line \(x=1\), which meets the graph only at the point \((1,-3)\).
    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\).
    Example \(\PageIndex{6}\): A Graph That Fails the Vertical Line Test

    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\).

    Circle centered at origin on a Cartesian plane, with points (3, 4) and (3, -4) marked.
    Figure \(\PageIndex{2}\): The graph of \(x^2+y^2=25\), together with the dashed vertical line \(x=3\), which meets the graph at the two points \((3,4)\) and \((3,-4)\).
    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:

    All of these sources are released under the Creative Commons Attribution-Share-Alike License 4.0.


    This page titled 9.2: The Definition of a Function was last modified on Wed, 15 Jul 2026 16:00:06 GMT and is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Roy Simpson, Cosumnes River College.

    • Was this article helpful?