Skip to main content
Mathematics LibreTexts

1.3: Introduction to Functions

  • Page ID
    80757
  • \( \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}}\)

    One of the core concepts in College Algebra is the function. There are many ways to describe a function and we begin by defining a function as a special kind of relation.

    Definition 1.6

    A relation in which each \(x\)-coordinate is matched with only one \(y\)-coordinate is said to describe \(y\) as a function of \(x\).

    Example 1.3.1

    Which of the following relations describe \(y\) as a function of \(x\)?

    1. \(R_{1} = \{ (-2,1), (1,3), (1,4), (3,-1) \}\)
    2. \(R_{2} = \{ (-2,1), (1,3), (2,3), (3,-1) \}\)

    Solution

    A quick scan of the points in \(R_{1}\) reveals that the \(x\)-coordinate \(1\) is matched with two different \(y\)-coordinates: namely \(3\) and \(4\). Hence in \(R_{1}\), \(y\) is not a function of \(x\). On the other hand, every \(x\)-coordinate in \(R_{2}\) occurs only once which means each \(x\)-coordinate has only one corresponding \(y\)-coordinate. So, \(R_{2}\) does represent \(y\) as a function of \(x\).

    Note that in the previous example, the relation \(R_{2}\) contained two different points with the same \(y\)-coordinates, namely \((1,3)\) and \((2,3)\). Remember, in order to say \(y\) is a function of \(x\), we just need to ensure the same \(x\)-coordinate isn’t used in more than one point.1

    To see what the function concept means geometrically, we graph \(R_{1}\) and \(R_{2}\) in the plane.

    Screen Shot 2022-03-09 at 12.38.51 AM.png

    The fact that the \(x\)-coordinate \(1\) is matched with two different \(y\)-coordinates in \(R_{1}\) presents itself graphically as the points \((1,3)\) and \((1,4)\) lying on the same vertical line, \(x=1\). If we turn our attention to the graph of \(R_{2}\), we see that no two points of the relation lie on the same vertical line. We can generalize this idea as follows

    Definition 1.1. The Vertical Line Test

    A set of points in the plane represents \(y\) as a function of \(x\) if and only if no two points lie on the same vertical line.

    It is worth taking some time to meditate on the Vertical Line Test; it will check to see how well you understand the concept of ‘function’ as well as the concept of ‘graph’.

    Example 1.3.2

    Use the Vertical Line Test to determine which of the following relations describes \(y\) as a function of \(x\).

    Screen Shot 2022-03-09 at 12.42.30 AM.png

    Solution

    Looking at the graph of \(R\), we can easily imagine a vertical line crossing the graph more than once. Hence, \(R\) does not represent \(y\) as a function of \(x\). However, in the graph of \(S\), every vertical line crosses the graph at most once, so \(S\) does represent \(y\) as a function of \(x\).

    In the previous test, we say that the graph of the relation \(R\) fails the Vertical Line Test, whereas the graph of \(S\) passes the Vertical Line Test. Note that in the graph of \(R\) there are infinitely many vertical lines which cross the graph more than once. However, to fail the Vertical Line Test, all you need is one vertical line that fits the bill, as the next example illustrates.

    Example 1.3.3

    Use the Vertical Line Test to determine which of the following relations describes \(y\) as a function of \(x\).

    Screen Shot 2022-03-09 at 12.44.40 AM.png

    Solution

    Both \(S_{1}\) and \(S_{2}\) are slight modifications to the relation \(S\) in the previous example whose graph we determined passed the Vertical Line Test. In both \(S_{1}\) and \(S_{2}\), it is the addition of the point \((1,2)\) which threatens to cause trouble. In \(S_{1}\), there is a point on the curve with \(x\)-coordinate 1 just below \((1,2)\), which means that both \((1,2)\) and this point on the curve lie on the vertical line \(x=1\). (See the picture below and the left.) Hence, the graph of \(S_{1}\) fails the Vertical Line Test, so \(y\) is not a function of \(x\) here. However, in \(S_{2}\) notice that the point with \(x\)-coordinate 1 on the curve has been omitted, leaving an ‘open circle’ there. Hence, the vertical line \(x=1\) crosses the graph of \(S_{2}\) only at the point \((1,2)\). Indeed, any vertical line will cross the graph at most once, so we have that the graph of \(S_{2}\) passes the Vertical Line Test. Thus it describes \(y\) as a function of \(x\).

    Screen Shot 2022-03-09 at 12.46.02 AM.png

    Suppose a relation \(F\) describes \(y\) as a function of \(x\). The sets of \(x\)- and \(y\)-coordinates are given special names which we define below.

    Definition 1.7

    Suppose \(F\) is a relation which describes \(y\) as a function of \(x\).

    • The set of the \(x\)-coordinates of the points in \(F\) is called the domain of \(F\).
    • The set of the \(y\)-coordinates of the points in \(F\) is called the range of \(F\).

    We demonstrate finding the domain and range of functions given to us either graphically or via the roster method in the following example.

    Example 1.3.4

    Find the domain and range of the function \(F = \{ (-3, 2), (0, 1), (4, 2), (5, 2) \}\) and of the function \(G\) whose graph is given above on the right.

    Solution

    The domain of \(F\) is the set of the \(x\)-coordinates of the points in \(F\), namely \(\{ -3, 0, 4, 5 \}\) and the range of \(F\) is the set of the \(y\)-coordinates, namely \(\{ 1,2 \}.\)

    To determine the domain and range of \(G\), we need to determine which \(x\) and \(y\) values occur as coordinates of points on the given graph. To find the domain, it may be helpful to imagine collapsing the curve to the \(x\)-axis and determining the portion of the \(x\)-axis that gets covered. This is called projecting the curve to the \(x\)-axis. Before we start projecting, we need to pay attention to two subtle notations on the graph: the arrowhead on the lower left corner of the graph indicates that the graph continues to curve downwards to the left forever more; and the open circle at \((1,3)\) indicates that the point \((1,3)\) isn’t on the graph, but all points on the curve leading up to that point are.

    Screen Shot 2022-03-09 at 12.51.21 AM.png

    We see from the figure that if we project the graph of \(G\) to the \(x\)-axis, we get all real numbers less than \(1\). Using interval notation, we write the domain of \(G\) as \((-\infty, 1)\). To determine the range of \(G\), we project the curve to the \(y\)-axis as follows:

    Screen Shot 2022-03-09 at 12.53.32 AM.png

    Note that even though there is an open circle at \((1,3)\), we still include the \(y\) value of \(3\) in our range, since the point \((-1,3)\) is on the graph of \(G\). We see that the range of \(G\) is all real numbers less than or equal to \(4\), or, in interval notation, \((-\infty, 4]\).

    All functions are relations, but not all relations are functions. Thus the equations which described the relations in Section 1.2 may or may not describe \(y\) as a function of \(x\). The algebraic representation of functions is possibly the most important way to view them so we need a process for determining whether or not an equation of a relation represents a function. (We delay the discussion of finding the domain of a function given algebraically until Section 1.4.)

    Example 1.3.5

    Determine which equations represent \(y\) as a function of \(x\).

    1. \(x^3 + y^2 = 1\)
    2. \(x^2 + y^3 = 1\)
    3. \(x^2y = 1 - 3y\)

    Solution

    For each of these equations, we solve for \(y\) and determine whether each choice of \(x\) will determine only one corresponding value of \(y\).

    1. \[\begin{array}{rclr} x^3 + y^2 & = & 1 & \\ y^2 & = & 1 - x^3 & \\ \sqrt{y^2} & = & \sqrt{1 - x^3} & \mbox{extract square roots} \\ y & = & \pm \sqrt{1 - x^3} & \\ \end{array}\]
    2. \[\begin{array}{rclr} x^2 + y^3 & = & 1 & \\ y^3 & = & 1 - x^2 & \\ \sqrt[3]{y^3} & = & \sqrt[3]{1 - x^2} & \\ y & = & \sqrt[3]{1 - x^2} & \\ \end{array}\]
    3. \[\begin{array}{rclr} x^2y & = & 1 - 3y & \\ x^2y + 3y & = & 1 & \\ y \left(x^2 + 3\right) & = & 1 & \mbox{factor} \\ y & = & \dfrac{1}{x^2 + 3} & \\ \end{array}\]

    For each choice of \(x\), there is only one value for \(y\), so this equation describes \(y\) as a function of \(x\).

    We could try to use our graphing calculator to verify our responses to the previous example, but we immediately run into trouble. The calculator’s “Y=” menu requires that the equation be of the form ‘\(y\) = some expression of \(x\)’. If we wanted to verify that the first equation in Example 1.3.5 does not represent \(y\) as a function of \(x\), we would need to enter two separate expressions into the calculator: one for the positive square root and one for the negative square root we found when solving the equation for \(y\). As predicted, the resulting graph shown below clearly fails the Vertical Line Test, so the equation does not represent \(y\) as a function of \(x\).

    Screen Shot 2022-03-09 at 12.58.33 AM.png

    Thus in order to use the calculator to show that \(x^3 + y^2 = 1\) does not represent \(y\) as a function of \(x\) we needed to know analytically that \(y\) was not a function of \(x\) so that we could use the calculator properly. There are more advanced graphing utilities out there which can do implicit function plots, but you need to know even more Algebra to make them work properly. Do you get the point we’re trying to make here? We believe it is in your best interest to learn the analytic way of doing things so that you are always smarter than your calculator.

    1.3.1 Exercises

    In Exercises 1-12, determine whether or not the relation represents \(y\) as a function of \(x\). Find the domain and range of those relations which are functions.

    1. {\((-3, 9)\), \(\;(-2, 4)\), \(\;(-1, 1)\), \(\;(0, 0)\), \(\;(1, 1)\), \(\;(2, 4)\), \(\;(3, 9)\}\)
    2. \(\left\{ (-3,0), (1,6), (2, -3), (4,2), (-5,6), (4, -9), (6,2) \right\}\)
    3. \(\left\{ (-3,0), (-7,6), (5,5), (6,4), (4,9), (3,0) \right\}\)
    4. \(\left\{ (1,2), (4,4), (9,6), (16,8), (25,10), (36, 12), \ldots \right\}\)
    5. {(\(x, y) \, | \, x\) is an odd integer, and \(y\) is an even integer}
    6. {\((x, 1) \, | \, x\) is an irrational number}
    7. {\((1, 0)\), \(\;(2, 1)\), \(\;(4, 2)\), \(\;(8, 3)\), \(\;(16, 4)\), \(\;(32, 5), \;\) …}
    8. {\(\ldots, \; (-3, 9)\), \(\;(-2, 4)\), \(\;(-1, 1)\), \(\;(0, 0)\), \(\;(1, 1)\), \(\;(2, 4)\), \(\;(3, 9), \;\) …}
    9. \(\{ (-2, y) \, | \, -3 < y < 4\}\)
    10. \(\{ (x,3) \, | \, -2 \leq x < 4\}\)
    11. \(\ \left\{\left(x, x^{2}\right) \mid x \text { is a real number }\right\}\)
    12. \(\ \left\{\left(x^{2}, x\right) \mid x \text { is a real number }\right\}\)

    In Exercises 13-32, determine whether or not the relation represents \(y\) as a function of \(x\). Find the domain and range of those relations which are functions.

    1. Screen Shot 2022-03-09 at 1.03.49 AM.png
    2. Screen Shot 2022-03-09 at 1.04.11 AM.png
    3. Screen Shot 2022-03-09 at 1.04.47 AM.png
    4. Screen Shot 2022-03-09 at 1.07.19 AM.png
    5. Screen Shot 2022-03-09 at 1.09.30 AM.png
    6. Screen Shot 2022-03-09 at 1.09.57 AM.png
    7. Screen Shot 2022-03-09 at 1.10.48 AM.png
    8. Screen Shot 2022-03-09 at 1.11.28 AM.png
    9. Screen Shot 2022-03-09 at 1.12.08 AM.png
    10. Screen Shot 2022-03-09 at 1.13.18 AM.png
    11. Screen Shot 2022-03-09 at 1.13.51 AM.png
    12. Screen Shot 2022-03-09 at 1.14.48 AM.png
    13. Screen Shot 2022-03-09 at 1.15.26 AM.png
    14. Screen Shot 2022-03-09 at 1.15.49 AM.png
    15. Screen Shot 2022-03-09 at 1.16.20 AM.png
    16. Screen Shot 2022-03-09 at 1.17.03 AM.png
    17. Screen Shot 2022-03-09 at 1.18.13 AM.png
    18. Screen Shot 2022-03-09 at 1.18.44 AM.png
    19. Screen Shot 2022-03-09 at 1.19.27 AM.png
    20. Screen Shot 2022-03-09 at 1.19.53 AM.png

    In Exercises 33-37, determine whether or not the equation represents \(y\) as a function of \(x\).

    1. \(y = x^{3} - x\)
    2. \(y = \sqrt{x - 2}\)
    3. \(x^{3}y = -4\)
    4. \(x^{2} - y^{2} = 1\)
    5. \(y = \dfrac{x}{x^{2} - 9}\)
    6. \(x = -6\)
    7. \(x = y^2 + 4\)
    8. \(y = x^2 + 4\)
    9. \(x^2 + y^2 = 4\)
    10. \(y = \sqrt{4-x^2}\)
    11. \(x^2 - y^2 = 4\)
    12. \(x^3 + y^3 = 4\)
    13. \(2x + 3y = 4\)
    14. \(2xy = 4\)
    15. \(x^2 = y^2\)
    16. Explain why the population \(P\) of Sasquatch in a given area is a function of time \(t\). What would be the range of this function?
    17. Explain why the relation between your classmates and their email addresses may not be a function. What about phone numbers and Social Security Numbers?

    The process given in Example 1.3.5 for determining whether an equation of a relation represents \(y\) as a function of \(x\) breaks down if we cannot solve the equation for \(y\) in terms of \(x\). However, that does not prevent us from proving that an equation fails to represent \(y\) as a function of \(x\). What we really need is two points with the same \(x\)-coordinate and different \(y\)-coordinates which both satisfy the equation so that the graph of the relation would fail the Vertical Line Test 1.1. Discuss with your classmates how you might find such points for the relations given in Exercises 50-53.

    1. \(x^{3} + y^{3} - 3xy = 0\)
    2. \(x^{4} = x^{2} + y^{2}\)
    3. \(y^{2} = x^{3} + 3x^{2}\)
    4. \((x^{2} + y^{2})^{2} = x^{3} + y^{3}\)

    1.3.2 Answers

    1. Function
      domain = {\(-3\), \(-2\), \(-1\), \(0\), \(1\), \(2\),\(3\)}
      range = {\(0\), \(1\), \(4\), \(9\)}

    2. Not a function
    3. Function
      domain = \(\left\{ -7, -3, 3, 4, 5, 6 \right\}\)
      range = \(\left\{ 0,4,5,6,9 \right\}\)

    4. Function
      domain =\(\ \{1,4,9,16,25,36, \ldots\}
      =\{x \mid x \text { is a perfect square }\}\)
      range=\(\ \{2,4,6,8,10,12, \ldots\}
      =\{y \mid y \text { is a positive even integer }\}\)

    5. Not a function
    6. Function
      domain=\(\ \{x \mid x \text { is irrational }\}\)
      range = {\(1\)}

    7. Function
      domain = \(\ \left\{x \mid x=2^{n} \text { for some whole number } n\right\}\)
      range = \(\ \{y \mid y \text { is any whole number }\}\)

    8. Function
      domain = \(\ \{x \mid x \text { is any integer }\}\)
      range = \(\ \left\{y \mid y=n^{2} \text { for some integer } n\right\}\)

    9. Not a function
    10. Function
      domain = \([-2, 4)\), range = {\(3\)}

    11. Function
      domain = \((-\infty, \infty)\)
      range = \([0,\infty)\)

    12. Not a function
    13. Function
      domain = {\(-4\), \(-3\), \(-2\), \(-1\), \(0\), \(1\)}
      range = {\(-1\), \(0\), \(1\), \(2\), \(3\), \(4\)}

    14. Not a function
    15. Function
      domain = \((-\infty, \infty)\)
      range = \([1, \infty)\)

    16. Not a function
    17. Function
      domain = \([2, \infty)\)
      range = \([0, \infty)\)

    18. Function
      domain = \((-\infty, \infty)\)
      range = \((0, 4]\)

    19. Not a function
    20. Function
      domain = \([-5,-3) \cup(-3, 3)\)
      range = \((-2, -1) \cup [0, 4)\)

    21. Function
      domain = \([-2, \infty)\)
      range = \([-3, \infty)\)

    22. Not a function
    23. Function
      domain = \([-5,4)\)
      range = \([-4,4)\)

    24. Function
      domain = \([0,3) \cup (3,6]\)
      range = \((-4,-1] \cup [0,4]\)

    25. Function
      domain = \((-\infty, \infty)\)
      range = \((-\infty, 4]\)

    26. Function
      domain = \((-\infty, \infty)\)
      range = \((-\infty, 4]\)

    27. Function
      domain = \([-2, \infty)\)
      range = \((-\infty, 3]\)

    28. Function
      domain = \((-\infty, \infty)\)
      range = \((-\infty, \infty)\)

    29. Function
      domain = \((-\infty, 0] \cup (1, \infty)\)
      range = \((-\infty, 1] \cup \{ 2\}\)

    30. Function
      domain = \([-3,3]\)
      range = \([-2,2]\)

    31. Not a function
    32. Function
      domain = \((-\infty, \infty)\)
      range = \(\{2\}\)

    33. Function
    34. Function
    35. Function
    36. Not a function
    37. Function
    38. Not a function
    39. Not a function
    40. Function
    41. Not a function
    42. Function
    43. Not a function
    44. Function
    45. Function
    46. Function
    47. Not a function

    Reference

    1 We will have occasion later in the text to concern ourselves with the concept of \(\ x\) being a function of \(\ y\). In this case, \(\ R_{1}\) represents x as a function of \(\ y\); \(\ R_{2}\) does not.


    This page titled 1.3: Introduction to Functions is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Carl Stitz & Jeff Zeager via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.