Math Core

Lesson 4.2 · Introduction to Functions

Function notation

Writing "y=3x−5y = 3x - 5" works, but it gets clumsy when you have several functions or want to say "the output when the input is 44." Function notation gives each function a name and a compact way to write its inputs and outputs.

Naming a function

Definition

Function notation

The notation f(x)f(x), read "ff of xx," means the output of the function ff when the input is xx. The letter ff is the name of the function, and xx is the input.

So instead of y=3x−5y = 3x - 5, you can write

f(x)=3x−5.f(x) = 3x - 5.

This says the same thing: to get the output, multiply the input by 33 and subtract 55. The graph of ff is the same as the graph of y=3x−5y = 3x - 5, because yy and f(x)f(x) both name the output.

Functions don't have to be called ff. You'll see g(x)g(x), h(x)h(x), and names that fit a situation, like C(n)C(n) for a cost that depends on a number of items, or d(t)d(t) for a distance that depends on time.

Common mistake

f(x)f(x) does not mean ff times xx. The parentheses here hold the input; they are not multiplication. In the same way, f(4)f(4) is "the output when the input is 44," not "ff times 44."

Evaluating a function

To find f(4)f(4), replace every xx in the rule with 44, then simplify. This is just substitution from Unit 1, written in new notation.

Input and output

  • f(a)f(a) asks: the input is aa, what is the output? Substitute and simplify.
  • f(x)=bf(x) = b asks: the output is bb, what is the input? Set the rule equal to bb and solve.

Worked example: Evaluating at numbers

Let f(x)=3x−5f(x) = 3x - 5. Find f(4)f(4), f(−2)f(-2) and f(0)f(0).

f(4)=3(4)−5=12−5=7f(−2)=3(−2)−5=−6−5=−11f(0)=3(0)−5=0−5=−5\begin{aligned} f(4) &= 3(4) - 5 = 12 - 5 = 7 \\ f(-2) &= 3(-2) - 5 = -6 - 5 = -11 \\ f(0) &= 3(0) - 5 = 0 - 5 = -5 \end{aligned}

Each result is an ordered pair on the graph of ff: (4,7)(4, 7), (−2,−11)(-2, -11) and (0,−5)(0, -5). The statement f(4)=7f(4) = 7 says exactly the same thing as "the point (4,7)(4, 7) is on the graph."

When a rule has several xx's, every one of them gets the input. Use parentheses, especially for negative inputs.

Worked example: A rule with a square

Let g(x)=x2−2x+3g(x) = x^2 - 2x + 3. Find g(−3)g(-3).

g(−3)=(−3)2−2(−3)+3substitute in every spot=9+6+3(−3)2=9,  −2(−3)=6=18\begin{aligned} g(-3) &= (-3)^2 - 2(-3) + 3 && \text{substitute in every spot} \\ &= 9 + 6 + 3 && (-3)^2 = 9, \; -2(-3) = 6 \\ &= 18 \end{aligned}

Working backward: when is the output a given value?

Sometimes you know the output and need the input. Since you've already learned to solve equations, this is one more step.

Worked example: Solving f(x) = b

Let f(x)=3x−5f(x) = 3x - 5. For what input is f(x)=13f(x) = 13?

3x−5=133x=18x=6\begin{aligned} 3x - 5 &= 13 \\ 3x &= 18 \\ x &= 6 \end{aligned}

Check: f(6)=3(6)−5=13f(6) = 3(6) - 5 = 13. So f(6)=13f(6) = 13, and the point (6,13)(6, 13) is on the graph.

Reading function values from a graph

On a graph of y=f(x)y = f(x), the value f(a)f(a) is the height of the graph above (or below) x=ax = a. To find f(a)f(a), go to aa on the xx-axis, move straight up or down to the graph, and read the yy-value.

The graph of y = f(x). Reading heights: f(3) = 0, f(−2) = 1 and f(1) = −2.Open in grapher →

To answer "f(x)=1f(x) = 1" from a graph, go the other way: find the height 11 on the yy-axis, move across to the graph, and read every xx-value where the graph has that height. For the graph above, the horizontal line y=1y = 1 meets the graph at x=−2x = -2 and x=4x = 4, so f(x)=1f(x) = 1 has two solutions. That's allowed: two inputs can share an output.

Functions in context

Function notation shines in real situations, because the statement carries the meaning of both numbers.

Worked example: Interpreting function notation

A bike rental shop charges a $6 helmet fee plus $14 per hour. The cost in dollars for hh hours is C(h)=14h+6C(h) = 14h + 6.

  1. Find C(3)C(3) and explain what it means.
  2. Solve C(h)=76C(h) = 76 and explain what it means.

Solutions.

  1. C(3)=14(3)+6=42+6=48C(3) = 14(3) + 6 = 42 + 6 = 48. Renting a bike for 3 hours costs $48.
  2. 14h+6=7614h + 6 = 76, so 14h=7014h = 70 and h=5h = 5. For $76 you can rent a bike for 5 hours.

In C(3)=48C(3) = 48, the number inside the parentheses (hours) is the input and the number on the right (dollars) is the output. Keeping track of which is which is the whole point.

Inputs that are expressions

The input doesn't have to be a number. If f(x)=3x−5f(x) = 3x - 5, then f(a+2)f(a + 2) means "replace each xx with a+2a + 2":

f(a+2)=3(a+2)−5=3a+6−5=3a+1.f(a + 2) = 3(a + 2) - 5 = 3a + 6 - 5 = 3a + 1.

The parentheses around the input are essential; the distributive property does the rest.

Tip

Check an expression input with a number. If a=1a = 1, then f(a+2)=f(3)=3(3)−5=4f(a + 2) = f(3) = 3(3) - 5 = 4, and 3a+1=3(1)+1=43a + 1 = 3(1) + 1 = 4. They match.

Practice

Practice 1

Let f(x)=4x+7f(x) = 4x + 7. Find f(3)f(3).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

Let g(x)=10−x2g(x) = 10 - x^2. Find g(−4)g(-4).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Let h(x)=2x−9h(x) = 2x - 9. For what value of xx is h(x)=11h(x) = 11?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Let f(x)=x2+1f(x) = x^2 + 1 and g(x)=3xg(x) = 3x. Find f(2)−g(−1)f(2) - g(-1).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Use the graph of y=f(x)y = f(x) below to find f(4)f(4).

The graph of y = f(x).Open in grapher →

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Using the same graph, find every xx for which f(x)=0f(x) = 0.

Separate answers with commas, e.g. 2, -5

Practice 7

A kayak rental costs C(h)=12h+5C(h) = 12h + 5 dollars for hh hours. What does C(3)=41C(3) = 41 mean?

Practice 8

Let f(x)=5x−2f(x) = 5x - 2. Find f(a+3)f(a + 3) in terms of aa.

Enter an expression, e.g. 3x^2 - 2x + 1