Quarry School

Composition passes one answer into the next function — quick review

In plain words

Picture two machines standing in a row.

Rule

(f ∘ g)(x) = f(g(x)). First apply g, then apply f to g's output.
The product (fg)(x) = f(x)·g(x) is a different operation.

Step

  1. 1. Rewrite the circle notation as nested parentheses, meaning one pair of parentheses inside another: (f ∘ g)(x) = f(g(x)).

  2. 2. Name the inner function, which touches the original input.

  3. 3. Evaluate that function and write its output as a separate intermediate, or in-between, answer.

  4. 4. Put that whole intermediate answer into the outer function.

  5. 5. Check the path: original input, inner output, final output.

Question

Let g(x) = x + 1 and f(x) = 2x. Find (f ∘ g)(2). The input is 2; add 1 first, then use that answer as the input to the doubling function. Plan: finish g first, then carry its whole answer into f.

Answer

(f ∘ g)(2) = 6.

Trap

Starting with f because its name appears first. In f ∘ g, g receives the original input. Expand the circle notation before calculating.

Strategy

  1. Rewrite (f ∘ g)(a) as f(g(a)); read it as f after g at a.

  2. Find the inner function next to a and calculate g(a). Write that in-between answer on its own line.

  3. Use the whole in-between answer as the outer input. Find f of that answer.

  4. Check the path from original input to in-between answer to final output.

Term

Function

Definition

A rule that gives exactly one output for each input it accepts.

Term

Input

Definition

The starting value you give a function. It goes inside the parentheses in function notation.

Term

Output

Definition

The answer a function produces from an accepted input.

Term

Evaluate

Definition

Find the output of a function or the value of an expression for a given input.

Term

Composition of functions

Definition

Using the output of one function as the input of another function.

Term

Composite function

Definition

The new function produced by composition. Its single rule carries an input through both original functions in order.

Term

Composition operator

Definition

The open-circle symbol ∘ that joins two function names to indicate composition.

Term

Binary operation

Definition

An operation that takes two starting objects and produces one result. Here binary means two objects, rather than the computer digits 0 and 1.

Term

Inner function

Definition

The function evaluated first in a composition. Its output becomes the next function's input.

Term

Outer function

Definition

The function evaluated second in a two-function composition. It receives the inner function's output.

Term

Function composition

Definition

Another name for composition of functions: one function's output becomes another function's input.

Term

Order of operations

Definition

The agreed calculation order: parentheses, exponents, multiplication and division left to right, then addition and subtraction left to right.

Term

Intermediate answer

Definition

The in-between output of the first function, which becomes the next function’s input.

Term

Nested

Definition

Placed inside another expression, like one pair of parentheses inside another.