Unit 10 · Lesson 1 of 4

Functions and function notation

About 25 minutes · 5 steps · one idea: one input, exactly one output

You'll be able to: tell whether a relation is a function and find values like \(f(-2)\) and \(f(a+1)\) from a formula, a table, or a graph.

  1. 1 Warm-up
  2. 2 The idea
  3. 3 Examples
  4. 4 Practice
  5. 5 Wrap-up

Step 1 of 5Warm-up

Two quick questions from earlier lessons. Answer from memory first. Pulling it out of your head is what makes it stick.

Solve \(x^2 - x - 6 \le 0\). Give the answer in interval notation.

Factor: \((x - 3)(x + 2) \le 0\). The zeros are \(x = 3\) and \(x = -2\).

The parabola opens up, so it is below zero between the zeros. The zeros themselves count because of the \(\le\).

Answer: \([-2, 3]\).

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

Put \((-2)\) in for every \(x\): \(2(-2)^2 - 3(-2) + 1\).

\((-2)^2 = 4\), so this is \(8 + 6 + 1 = 15\).

Step 2 of 5The idea

A relation is any set of input-output pairs, written as ordered pairs (input, output). A function is a relation with one extra promise: each input has exactly one output.

So \(\{(1, 4), (2, 5), (1, 6)\}\) is not a function: the input 1 has two outputs, 4 and 6. But \(\{(1, 4), (2, 4)\}\) is a function. Two inputs sharing an output is fine.

On a graph, use the vertical line test. If some vertical line hits the graph twice, one input has two outputs, so it is not a function.

The line \(x = 4\) hits this graph twice, so it is not a function.

Function notation \(f(x)\) is read "f of x". It means "the output of \(f\) when the input is \(x\)". It is not \(f\) times \(x\).

Function: every input has exactly one output.

Vertical line test: a graph is a function if no vertical line crosses it more than once.

To find \(f(a)\): replace every \(x\) in the formula with \((a)\), in parentheses, then simplify.

From a table or graph: \(f(2)\) is the output (the y-value) that goes with the input \(x = 2\).

Why this shows up on the placement test: function notation is the language of College Algebra, and "find \(f(-3)\)" is one of the most common quick questions.

Step 3 of 5Worked examples

Example 1: \(f(x) = x^2 - 3x + 2\). Find \(f(-2)\) and \(f(a + 1)\).

  1. Replace each \(x\) with \((-2)\): \(f(-2) = (-2)^2 - 3(-2) + 2\).
  2. \(= 4 + 6 + 2 = 12\). \((-2)^2 = 4\) and \(-3 \cdot (-2) = +6\).
  3. Now replace each \(x\) with \((a + 1)\): \(f(a + 1) = (a + 1)^2 - 3(a + 1) + 2\).
  4. Expand: \(a^2 + 2a + 1 - 3a - 3 + 2\). \((a+1)^2 = a^2 + 2a + 1\), and distribute the \(-3\).
  5. Combine like terms: \(f(a + 1) = a^2 - a\).

Example 2: reading a function from its graph

The graph of a function \(f\).
  1. To find \(f(0)\), start at \(x = 0\) on the x-axis and go up to the graph. You land at height 3, so \(f(0) = 3\).
  2. To find \(f(2)\), go to \(x = 2\). The graph is at height \(-1\), so \(f(2) = -1\).
  3. Now go the other way: which inputs give \(f(x) = 3\)? Look across at height 3. The graph is there at \(x = 0\) and \(x = 4\). Two inputs can share one output. It still passes the vertical line test.

Step 4 of 5Practice

Type your answer and press Check. If you miss twice, open the worked solution. Then mark how it went.

\(f(x) = 3x - 5\). Find \(f(4)\).

\(f(4) = 3(4) - 5 = 12 - 5 = 7\).

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

\(g(-3) = (-3)^2 + 2(-3) - 1\).

\(= 9 - 6 - 1 = 2\).

Which relation is a function?

  1. \(\{(2, 1), (3, 4), (2, 5)\}\)
  2. \(\{(0, 3), (1, 3), (0, -3)\}\)
  3. \(\{(4, 1), (4, 2), (5, 3)\}\)
  4. \(\{(1, 6), (2, 6), (3, 6)\}\)

Look only at the inputs (the first numbers). A repeated input with different outputs breaks the rule.

(a) Input 2 has outputs 1 and 5. Not a function.

(b) Input 0 has outputs 3 and \(-3\). Not a function.

(c) Input 4 has outputs 1 and 2. Not a function.

(d) Inputs 1, 2, 3 each appear once. They share the output 6, which is allowed. This one.

Use the table. For which input \(x\) is \(f(x) = -3\)?

\(x\)\(-2\)\(-1\)\(0\)\(1\)\(2\)
\(f(x)\)\(5\)\(3\)\(1\)\(-1\)\(-3\)

Here you know the output, \(-3\), and want the input. Find \(-3\) in the \(f(x)\) row.

It sits under \(x = 2\). So \(f(2) = -3\), and the answer is \(x = 2\).

Use the graph of \(f\) below. Find \(f(-2)\).

The graph of \(f\). Each grid square is 1 unit.

Go to \(x = -2\) on the x-axis, then straight up to the graph.

The graph is at height 1 there. So \(f(-2) = 1\).

\(f(x) = 2x^2 - x\). Find \(f(a + 1)\) and simplify.

Replace each \(x\) with \((a + 1)\): \(2(a + 1)^2 - (a + 1)\).

\((a + 1)^2 = a^2 + 2a + 1\), so this is \(2a^2 + 4a + 2 - a - 1\).

Combine like terms: \(2a^2 + 3a + 1\).

\(f(x) = 4x - 7\). Find the input \(x\) that makes \(f(x) = 9\).

Set the formula equal to 9: \(4x - 7 = 9\).

Add 7: \(4x = 16\). Divide by 4: \(x = 4\).

Check: \(f(4) = 16 - 7 = 9\).

A plumber's bill is \(C(t) = 45 + 30t\) dollars for a job that takes \(t\) hours. Find \(C(2.5)\), the bill for a job of 2.5 hours.

\(C(2.5) = 45 + 30(2.5)\).

\(30 \cdot 2.5 = 75\), so \(C(2.5) = 45 + 75 = 120\). The bill is $120.

Step 5 of 5Wrap-up

You can now spot a function (one output per input, or the vertical line test) and read \(f(x)\) as "the output for input \(x\)", from a formula, a table, or a graph.

Read or watch next: OpenStax Intermediate Algebra 2e, 3.5 Relations and Functions (free textbook, with more practice at the end of the section).

Also good: Khan Academy: Algebra 1: Evaluating functions (short videos). Quick rules: Functions cheat sheet.

Something unclear? Ask your teacher bot a follow-up question, for example: "Why is it OK for two inputs to have the same output, but not one input with two outputs?" It knows this course and can explain things another way.