maths.freeAlgebra › 5. Algebra › Functions and graphs

Functions and graphs

Zeros, slope, symmetry — reading a graph from its formula.

A function is a rule that turns each input into one output; its graph draws every pair. From the formula you can find where it crosses the axis (zeros), how steep it is (derivative) and how it looks (the plot). Type any y = … to graph and analyse it.

Learning Objectives

After completing this section, you should be able to:

  1. Use function notation.
  2. Determine if a relation is a function with different representations.
  3. Apply the vertical line test.
  4. Determine the domain and range of a function.

Use Function Notation

It is very convenient to name a function; most often functions are named \(f\), \(g\), \(h\), \(F\), \(G\), or \(H\). In any function, for each \(x\)-value from the domain, we get a corresponding \(y\)-value in the range. In the function \(f\), we write this range value \(y\) as \(f\)(\(x\)). This notation \(f\)(\(x\)) is called function notation and is read "f of \(x\)" or "the value of f at \(x\)." In this case the parentheses do not indicate multiplication.

We call \(x\) the independent variable as it can be any value in the domain. We call \(y\) the dependent variable as its value depends on \(x\). Much like when you first encountered the variable \(x\), function notation may be rather unsettling. But the more you use the notation, the more familiar you become with the notation, and the more comfortable you will be with it.

Let’s review the equation \(y=4x-5\). To find the value of \(y\) when \(x=2\), we know to substitute \(x=2\) into the equation and then simplify.

\(y=4x-5\)
Let \(x=2\).\(\begin{array}{lll}y & = & 4⋅2-5 \\ y & = & 3\end{array}\)

The value of the function at \(x=2\) is 3. We do the same thing using function notation, the equation \(y=4x-5\) can be written as \(f(x)=4x-5\). To find the value when \(x=2\), we write:

\(f(x)=4x-5\)
Let \(x=2\).\(\begin{array}{lll}f(2) & = & 4⋅2-5 \\ f(2) & = & 3\end{array}\)

The value of the function at \(x=2\) is 3. This process of finding the value of \(f(x)\) for a given value of \(x\) is called evaluating the function.

Evaluating the Function

Try it.

For the function \(f(x)=2{x}^{2}+3x-1\), evaluate the function.

  1. \(f(3)\)
  2. \(f(-2)\)
  3. \(f(a)\)
Solution
  1. To evaluate \(f(3)\), substitute 3, for \(x\).
    Simplify. \[\begin{array}{lll}f(x) & = & 2{x}^{2}+3x-1 \\ f(3) & = & 2{(3)}^{2}+3⋅3-1 \\ f(3) & = & 2⋅9+3⋅3-1 \\ f(3) & = & 18+9-1 \\ f(3) & = & 26\end{array}\]
  2. To evaluate \(f(-2)\), substitute \(-2\) for \(x\).
    Simplify. \[\begin{array}{lll}f(x) & = & 2{x}^{2}+3x-1 \\ f(-2) & = & 2{(-2)}^{2}+3(-2)-1 \\ f(-2) & = & 2⋅4+(-6)-1 \\ f(-2) & = & 8+(-6)-1 \\ f(-2) & = & 1\end{array}\]
  3. To evaluate \(f(a)\), substitute \(a\) for \(x\).
    Simplify. \[\begin{array}{lll}f(x) & = & 2{x}^{2}+3x-1 \\ f(a) & = & 2{(a)}^{2}+3⋅a-1 \\ f(a) & = & 2{a}^{2}+3a-1\end{array}\]

Condensed — the full section is in OpenStax Contemporary Mathematics.

Determining If a Relation Is a Function with Different Representations

We can determine whether a relation is a function by identifying the input and the output values. If each input value leads to only one output value, classify the relation as a function. If any input value leads to two or more outputs, do not classify the relation as a function.

We will review three different representations of relations and determine if they are functions: ordered pairs, mapping, and equations.

Determining If a Relation Is a Function with a Set of Ordered Pairs

Try it.

Use the set of ordered pairs to determine whether the relation is a function.

  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)\}\)
Solution

  1. Each \(x\)-value is matched with only one \(y\)-value. This relation is a function.
  2. The \(x\)-value 9 is matched with two \(y\)-values, both 3 and \(-3\). This relation is not a function.

A mapping is sometimes used to show a relation. The arrows show the pairing of the elements of the domain with the elements of the range. Consider the example of the relation between your friends and their birthdays used in . In this particular example, the domain is the set of people’s names, and the range is the set of their birthdays. This mapping was a function because everybody’s name maps to exactly one birthday.

Determining If a Relation Is a Function with Mapping

Try it.

Use the mapping in to determine whether the relation is a function.

Solution

Both Lydia and Marty have two phone numbers. Each \(x\)-value is not matched with only one \(y\)-value. This relation is not a function.

In algebra functions will usually be represented by an equation. It is easiest to see if the equation is a function when it is solved for \(y\). If each value of \(x\) results in only one value of \(y\), then the equation defines a function.

Condensed — the full section is in OpenStax Contemporary Mathematics.

Applying the Vertical Line Test

We reviewed how to determine if a relation is a function. The relations we looked at were expressed as a set of ordered pairs, a mapping, or an equation. We will now cover how to tell if a graph is that of a function.

An ordered pair \((x,y)\) is a solution of a linear equation, if the equation is a true statement when the \(x\)-values and \(y\)-values of the ordered pair are substituted into the equation. The graph of a linear equation is a straight line where every point on the line is a solution of the equation, and every solution of this equation is a point on this line. we can see that in the graph of the equation \(y=2x-3\), for every \(x\)-value there is only one \(y\)-value, as shown in the accompanying table.

A relation is a function if every element of the domain has exactly one value in the range. The relation defined by the equation \(y=2x-3\) is a function. If we look at the graph, each vertical dashed line only intersects the solid line at one point. This makes sense as in a function, for every \(x\)-value there is only one \(y\)-value. If the vertical line hit the graph twice, the \(x\)-value would be mapped to two \(y\)-values, and so the graph would not represent a function. This leads us a graphical method of determining functions called the vertical line test, which states that a set of points in a rectangular coordinate system is the graph of a function if every vertical line intersects the graph in at most one point. If any vertical line intersects the graph in more than one point, the graph does not represent a function.

Applying the Vertical Line Test

Try it.

Determine whether the graph () is the graph of a function applying the vertical line test.

Solution

On the graph (), only three vertical dashed lines are drawn. However, it can be determined that any vertical dashed line that is drawn will intersect the solid line at exactly one point. It is the graph of a function.

Applying the Vertical Line Test to a Parabola

Try it.

Determine whether the graph is the graph of a function ().

Solution

does not represent a function since the vertical dashed lines shown on the graph below intersect the solid line at two points.

Determining the Domain and Range of a Function

For the function \(y=f(x),x\) is the independent variable as it can be any value in the domain, and \(y\) is the dependent variable since its value depends on \(x\). For the function \(y=f(x)\), the values of \(x\) make up the domain and the values of \(y\) make up the range.

Finding the Domain and Range of Ordered Pairs

Try it.

For \(\{(1,1),(2,4),(3,9),(4,16),(5,25)\}\):

  1. Find the domain of the relation.
  2. Find the range of the relation.
Solution
  1. The domain is the set of all \(x\)-values of the relation: \(\{1,2,3,4,5\}\)
  2. The range is the set of all \(y\)-values of the relation: \(\{1,4,9,16,25\}\)
Finding the Domain and Range on a Graph

Try it.

Use to:

  1. List the ordered pairs of the relation.
  2. Find the domain of the relation.
  3. Find the range of the relation.
Solution
  1. The ordered pairs of the relation are: \(\{(1,5),(-3,-1),(4,-2),(0,3),(2,-2),(-3,4)\}\).
  2. The domain is the set of all \(x\)-values of the relation: \(\{-3,0,1,2,4\}\). Notice that while \(-3\) repeats, it is only listed once.
  3. The range is the set of all \(y\)-values of the relation: \(\{-2,-1,3,4,5\}.\) Notice that while \(-2\) repeats, it is only listed once.

Key Concepts

  • A relation is any set of ordered pairs \((x,y)\). All of the \(x\)-values of the set are the domain, and all of the \(y\)-values of the set are the range.
  • A relation is a function if each \(x\)-value in the domain is assigned to exactly one element in the range. A \(y\)-value in the range can have more than one \(x\)-value assigned to it; but each \(x\)-value can only be assigned to one \(y\)-value.
  • For the function \(y=f(x),f\) is the name of the function, \(x\) is the domain value variable, and \(y=f(x)\) is the range value variable.
  • The vertical line test is a test that can be done on the graph of a relation to determine if it is a function.

Ýüklenen mysal: y = x^2 - 3

Graph and analyse x^2 - 3

y = x^{2} - 3

Adım adım

  1. x^{2} - 3

    An expression in x. Here is what it does.

  2. x = - \sqrt{3}, x = \sqrt{3}

    Real zeros (where the graph crosses the axis).

  3. \frac{d}{dx} = 2 x

    Derivative (slope).

Jawaby görkez
x^{2} - 3

Practice (9)

Try each one on paper first. Reveal the answer to check; verified ones can be opened in the solver for every step.

  1. For the function \(f(x)=2{x}^{2}+3x-1\), evaluate the function.

    1. \(f(3)\)
    2. \(f(-2)\)
    3. \(f(a)\)
    Jawaby görkez
    1. To evaluate \(f(3)\), substitute 3, for \(x\).
      Simplify. \[\begin{array}{lll}f(x) & = & 2{x}^{2}+3x-1 \\ f(3) & = & 2{(3)}^{2}+3⋅3-1 \\ f(3) & = & 2⋅9+3⋅3-1 \\ f(3) & = & 18+9-1 \\ f(3) & = & 26\end{array}\]
    2. To evaluate \(f(-2)\), substitute \(-2\) for \(x\).
      Simplify. \[\begin{array}{lll}f(x) & = & 2{x}^{2}+3x-1 \\ f(-2) & = & 2{(-2)}^{2}+3(-2)-1 \\ f(-2) & = & 2⋅4+(-6)-1 \\ f(-2) & = & 8+(-6)-1 \\ f(-2) & = & 1\end{array}\]
    3. To evaluate \(f(a)\), substitute \(a\) for \(x\).
      Simplify. \[\begin{array}{lll}f(x) & = & 2{x}^{2}+3x-1 \\ f(a) & = & 2{(a)}^{2}+3⋅a-1 \\ f(a) & = & 2{a}^{2}+3a-1\end{array}\]
  2. The number of unread emails in Sylvia’s inbox is 75. This number grows by 10 unread emails a day. The function \(N(t)=75+10t\) represents the relation between the number of emails, \(N\), and the time, \(t\), measured in days. Find \(N\)(5). Explain what this result means.

    Jawaby görkez

    Find \(N\)(5). Explain what this result means.

    Substitute in \(t=5\).
    Simplify. \[\begin{array}{lll}N(5) & = & 75+10⋅5 \\ N(t) & = & 75+10t \\ N(5) & = & 75+50 \\ N(5) & = & 125\end{array}\]

    If 5 is the number of days, \(N(5)\) is the number of unread emails after 5 days. After 5 days, there are 125 unread emails in Sylvia’s inbox.

  3. Use the set of ordered pairs to determine whether the relation is a function.

    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)\}\)
    Jawaby görkez

    1. Each \(x\)-value is matched with only one \(y\)-value. This relation is a function.
    2. The \(x\)-value 9 is matched with two \(y\)-values, both 3 and \(-3\). This relation is not a function.

  4. Use the mapping in to determine whether the relation is a function.

    Jawaby görkez

    Both Lydia and Marty have two phone numbers. Each \(x\)-value is not matched with only one \(y\)-value. This relation is not a function.

  5. Determine whether each equation is a function. Assume \(x\) is the independent variable.

    1. \(2x+y=7\)
    2. \(y={x}^{2}+1\)
    3. \(x+{y}^{2}=3\)
    Jawaby görkez

    1. \(2x+y=7\)

      For each value of \(x\), we multiply it by \(-2\) and then add 7 to get the \(y\)-value.

      For example, if \(x=3\):

      \[\begin{array}{lll}y & = & -2x+7 \\ y & = & -2⋅3+7 \\ y & = & 1\end{array}\]

      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. \(y={x}^{2}+1\)

      For each value of \(x\), we square it and then add 1 to get the \(y\)-value.

      For example, if \(x=2\)

      \[\begin{array}{lll}y & = & {x}^{2}+1 \\ y & = & {2}^{2}+1 \\ y & = & 5\end{array}\]

      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. \(x+{y}^{2}=3\)

      \(x+{y}^{2}=3\)

      Isolate the \(y\) term.

      \({y}^{2}=-x+3\)

      Let us substitute \(x=2\).

      \({y}^{2}=-2+3\)

      \({y}^{2}=1\)

      This gives us two values for \(y\).

      \(y=1,\ 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.

  6. Determine whether the graph () is the graph of a function applying the vertical line test.

    Jawaby görkez

    On the graph (), only three vertical dashed lines are drawn. However, it can be determined that any vertical dashed line that is drawn will intersect the solid line at exactly one point. It is the graph of a function.

  7. Determine whether the graph is the graph of a function ().

    Jawaby görkez

    does not represent a function since the vertical dashed lines shown on the graph below intersect the solid line at two points.

  8. For \(\{(1,1),(2,4),(3,9),(4,16),(5,25)\}\):

    1. Find the domain of the relation.
    2. Find the range of the relation.
    Jawaby görkez
    1. The domain is the set of all \(x\)-values of the relation: \(\{1,2,3,4,5\}\)
    2. The range is the set of all \(y\)-values of the relation: \(\{1,4,9,16,25\}\)
  9. Use to:

    1. List the ordered pairs of the relation.
    2. Find the domain of the relation.
    3. Find the range of the relation.
    Jawaby görkez
    1. The ordered pairs of the relation are: \(\{(1,5),(-3,-1),(4,-2),(0,3),(2,-2),(-3,4)\}\).
    2. The domain is the set of all \(x\)-values of the relation: \(\{-3,0,1,2,4\}\). Notice that while \(-3\) repeats, it is only listed once.
    3. The range is the set of all \(y\)-values of the relation: \(\{-2,-1,3,4,5\}.\) Notice that while \(-2\) repeats, it is only listed once.

Symbols used here

\sum_{k=1}^{n} a_k
summation
Add a_k for k = 1 up to n.
\sqrt{x},\ \sqrt[n]{x}
square root, n-th root
The non-negative number whose square (n-th power) is x.
f'(x),\ \frac{dy}{dx}
derivative
Instantaneous rate of change; slope of the graph.
i
imaginary unit
i² = −1.
\pm
plus or minus
Both signs at once: x = 3 ± 2 means 5 and 1.
\neq
not equal
The two sides are different.
\leq,\ \geq
less/greater than or equal
Inequalities that allow equality; < and > exclude it.
|x|
absolute value / modulus
Distance from zero: |−3| = 3. For a complex number, distance from the origin.
\log_b x,\ \ln x
logarithm, natural log
The exponent b must be raised to for x; ln uses base e.
\mathbb{N},\ \mathbb{Z},\ \mathbb{Q},\ \mathbb{R},\ \mathbb{C}
number sets
Naturals, integers, rationals, reals, complex numbers.

How to: Functions and graphs

  1. Use function notation.
  2. Determine if a relation is a function with different representations.
  3. Apply the vertical line test.
  4. Determine the domain and range of a function.
  5. To evaluate
  6. To evaluate
  7. To evaluate
  8. Each

Questions people ask

What does it mean to solve an equation?

To find every value of the unknown that makes both sides equal. Each step is an operation applied to both sides that keeps the solution set the same, until the unknown stands alone.

Why do I sometimes get two answers?

A quadratic can cross the axis twice, so it can have two solutions. A degree-n polynomial has up to n. The graph shows where each one comes from.

How do I know whether to factor or use the quadratic formula?

Try factoring for a few seconds: look for two numbers that multiply to a·c and add to b. If nothing obvious appears, the discriminant b² − 4ac tells you how many real roots there are, and the formula finds them without guessing.

Özüňi synla

Parts of this page are adapted from OpenStax Contemporary Mathematics (CC BY-NC-SA 4.0). Condensed and re-explained here; errors are ours.

_Ýaşa Algebra