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.

    Examples

    Example: Determining if Sets of Ordered Pairs Represent a Function (state domain and range)

    Use the set of ordered pairs to determine whether the relation is a function, and find the domain and range of the relation.

    1. \({\{(−3,27),(−2,8),(−1,1),(0,0),(1,1),(2,8),(3,27)}\}\)
    2. \({\{(9,−3),(4,−2),(1,−1),(0,0),(1,1),(4,2),(9,3)}\}\)
    Solutions
    1. \(\{(−3,27),(−2,8),(−1,1),(0,0),(1,1),(2,8),(3,27)\}\)
      (i) Each \(x\)-value is matched with only one \(y\)-value. So this relation is a function.
      (ii) The domain is the set of all \(x\)-values in the relation.
      The domain is: \({\{−3,−2,−1,0,1,2,3}\}\).
      (iii) The range is the set of all \(y\)-values in the relation. Notice we do not list range values twice.
      The range is: \({\{27,8,1,0}\}\).
    2. \(\{(9,−3),(4,−2),(1,−1),(0,0),(1,1),(4,2),(9,3)\}\)
      (i) The \(x\)-value 9 is matched with two \(y\)-values, both 3 and \(−3\). So this relation is not a function.
      (ii) The domain is the set of all \(x\)-values in the relation. Notice we do not list domain values twice.
      The domain is: \({\{0,1,2,4,9}\}\).
      (iii) The range is the set of all \(y\)-values in the relation.
      The range is: \({\{−3,−2,−1,0,1,2,3}\}\).
    Checkpoint: Determining if Sets of Ordered Pairs Represent a Function (state domain and range)

    Use the set of ordered pairs to determine whether the relation is a function, and find the domain and range of the relation.

    1. \({\{(−3,−6),(−2,−4),(−1,−2),(0,0),(1,2),(2,4),(3,6)}\}\)
    2. \({\{(8,−4),(4,−2),(2,−1),(0,0),(2,1),(4,2),(8,4)}\}\)
    3. \({\{(27,−3),(8,−2),(1,−1),(0,0),(1,1),(8,2),(27,3)}\}\)
    4. \({\{(7,−3),(−5,−4),(8,−0),(0,0),(−6,4),(−2,2),(−1,3)}\}\)
    Answers

    1. (i) Yes
      (ii) \(\{−3,−2,−1,0,1,2,3\}\)
      (iii) \(\{−6,−4,−2,0,2,4,6\}\)

    2. (i) No
      (ii) \(\{0,2,4,8\}\)
      (iii) \(\{−4,−2,−1,0,1,2,4\}\)

    3. (i) No
      (ii) \(\{0,1,8,27\}\)
      (iii) \(\{−3,−2,−1,0,2,2,3\}\)

    4. (i) Yes
      (ii) \(\{7,−5,8,0,−6,−2,−1\}\)
      (iii) \(\{−3,−4,0,4,2,3\}\)
    Example: Determining If Menu Price Lists Are Functions

    The coffee shop menu, shown in the figure below, consists of items and their prices.

    1. Is price a function of the item?
    2. Is the item a function of the price?

    A menu of donut prices from a coffee shop where a plain donut is $1.49 and a jelly donut and chocolate donut are $1.99.

    Solutions
    1. Let’s begin by considering the input as the items on the menu. The output values are then the prices. Each item on the menu has only one price, so the price is a function of the item.
    2. Two items on the menu have the same price. If we consider the prices to be the input values and the items to be the output, then the same input value could have more than one output associated with it (see the figure below).

      Association of the prices to the donuts.

    Example: Determining If Class Grade Rules Are Functions

    In a particular math class, the overall percent grade corresponds to a grade point average. Is grade point average a function of the percent grade? Is the percent grade a function of the grade point average? The following table shows a possible rule for assigning grade points.

    Percent grade 0–56 57–61 62–66 67–71 72–77 78–86 87–91 92–100
    Grade point average 0.0 1.0 1.5 2.0 2.5 3.0 3.5 4.0
    Solution

    For any percent grade earned, there is an associated grade point average, so the grade point average is a function of the percent grade. In other words, if we input the percent grade, the output is a specific grade point average.

    In the grading system given, there is a range of percent grades that correspond to the same grade point average. For example, students who receive a grade point average of 3.0 could have a variety of percent grades ranging from 78 all the way to 86. Thus, percent grade is not a function of grade point average.

    Checkpoint: Determining if Rankings are Functions

    The following table lists the five greatest baseball players of all time in order of rank.

    Player Rank
    Babe Ruth 1
    Willie Mays 2
    Ty Cobb 3
    Walter Johnson 4
    Hank Aaron 5
    1. Is the rank a function of the player name?
    2. Is the player name a function of the rank?
    Example: Determining if Mappings Represent a Function (state domain and range)

    Use the mapping to determine whether the relation is a function, and find the domain and range of the relation.

    NAME PHONE
    Lydia 321-549-3327
    427-658-2314
    Eugene 321-964-7324
    Janet 684-358-7961
    Rick  
    Marty 684-369-7231
    798-367-8541
    Solution

    Both Lydia and Marty have two phone numbers. So each \(x\)-value is not matched with only one \(y\)-value. So this relation is not a function. The domain is the set of all \(x\)-values in the relation. The domain is: {Lydia, Eugene, Janet, Rick, Marty}. The range is the set of all \(y\)-values in the relation. The range is: \(\{321-549-3327, 427-658-2314, 321-964-7324, 684-358-7961, 684-369-7231, 798-367-8541\}\).

    Checkpoint: Determining if Mappings Represent a Function (state domain and range)

    Use the mapping to determine whether the relation is a function, and find the domain and range of the relation.

    This figure shows two table that each have one column. The table on the left has the header “Network” and lists the television stations “NBC”, “HGTV”, and “HBO”. The table on the right has the header “Program” and lists the television shows “Ellen Degeneres Show”, “Law and Order”, “Tonight Show”, “Property Brothers”, “House Hunters”, “Love it or List it”, “Game of Thrones”, “True Detective”, and “Sesame Street”. There are arrows that start at a network in the first table and point toward a program in the second table. The first arrow goes from NBC to Ellen Degeneres Show. The second arrow goes from NBC to Law and Order. The third arrow goes from NBC to Tonight Show. The fourth arrow goes from HGTV to Property Brothers. The fifth arrow goes from HGTV to House Hunters. The sixth arrow goes from HGTV to Love it or List it. The seventh arrow goes from HBO to Game of Thrones. The eighth arrow goes from HBO to True Detective. The ninth arrow goes from HBO to Sesame Street.

    Answer

    Not a function. The domain is {NBC, HGTV, HBO}. The range is {Ellen Degeneres Show, Law and Order, Tonight Show, Property Brothers, House Hunters, Love it or List it, Game of Thrones, True Detective, Sesame Street}.

    Example: Determining if Equations Represent a Function

    Determine whether each equation is a function.

    1. \(2x+y=7\)
    2. \(y=x^2+1\)
    3. \(x+y^2=3\)
    Solutions
    1. For each value of \(x\), we multiply it by \(−2\) and then add 7 to get the \(y\)-value
        .
      For example, if \(x=3\): .
        .
      We have that when \(x=3\), then \(y=1\). It would work similarly for any value of \(x\). Since each value of \(x\), corresponds to only one value of \(y\) the equation defines a function.
    2. For each value of \(x\), we square it and then add 1 to get the \(y\)-value.
        .
      For example, if \(x=2\): .
        .
      We have that when \(x=2\), then \(y=5\). It would work similarly for any value of \(x\). Since each value of \(x\), corresponds to only one value of \(y\) the equation defines a function.
    3.   .
      Isolate the \(y\) term. .
      Let’s substitute \(x=2\). .
        .
      This give us two values for \(y\). \(y=1\space y=−1\)
      We have shown that when \(x=2\), then \(y=1\) and \(y=−1\). It would work similarly for any value of \(x\). Since each value of \(x\) does not corresponds to only one value of \(y\) the equation does not define a function.
    Checkpoint: Determining if Equations Represent a Function

    Determine whether each equation is a function.

    1. \(4x+y=−3\)
    2. \(x+y^2=1\)
    3. \(y−x^2=2\)
    Answers
    1. yes
    2. no
    3. yes


    9.2: The Definition of a Function is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?