Composition passes one answer into the next function
Picture two machines standing in a row. Put in 2. The first machine adds 1 and hands out 3. The second machine doubles that 3 and hands out 6. One machine hands its finished answer straight to the next. This handoff is composition of functions, also called function composition. The combined recipe is a composite function. You can use it when one question depends on the answer to another. To price heating for a day, first find the day’s temperature, then use that temperature to find the cost. One starting input travels through both jobs and produces one final answer.
- Function notation. f(3) means the f output at input 3; if f(x) = 2x, f(3) = 6.
- Order of operations. Finish parentheses first: 2(2 + 1) = 2 × 3 = 6.
- Multiplication notation. A dot multiplies numbers: f(2)·g(2) = 4 × 3 = 12.
The product (fg)(x) = f(x)·g(x) is a different operation.
f of g of x; f composed with g at x; f after g
Put x into g first, then put g’s answer into f. The inner function is the first job; the outer function is the last job.
- (f ∘ g)(x) = f(g(x))
- f ∘ g names the new recipe
- (f ∘ g)(2) names its output at 2
- x → g(x) → f(g(x))
Day becomes temperature, then temperature becomes heating cost.
Follow the wire. The first machine g changes x into g(x). The second machine f changes that intermediate answer into f(g(x)).
To estimate a heating cost for a day, first find that day's temperature. Then use the temperature to find the cost. A day cannot go straight into a rule that expects a temperature. Descriptive variables are names chosen to remind you what they measure: d for day, T for temperature, C for cost. C(T(d)) says cost after temperature after day.
Start with 2. Add 1 to obtain 3. Double 3 to obtain 6. The intermediate answer is a new input, not a number to multiply by the original input.
In f(g(x)), the input slot of f contains g(x). Compute the contents of the slot first. Memory cue: inside first, outside last.
.1Inner function
The inner function is the first job. It is closest to the starting input in the nested notation. The name of the function does not decide its role; its position does.
- In f(g(x)), g is inner.
- In g(f(x)), f is inner.
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
Inner function
The inner function is the first job. It is closest to the starting input in the nested notation. The name of the function does not decide its role; its position does.
- In f(g(x)), g is inner.
- In g(f(x)), f is inner.
The inner function is the first job. It is closest to the starting input in the nested notation. The name of the function does not decide its role; its position does.
In f(g(2)) with g(x) = x + 1, find the first answer. You are not finding the final f output yet. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
- Evaluate g(2) = 2 + 1 = 3.g is next to the starting input inside the parentheses.
- Point to the function directly touching the original input; that is the first job.
.2Outer function
The outer function is the second job. Its input is the answer from the inner function. Think of a packing station receiving the item that a previous station finished.
- In f(g(x)), f is outer.
- An outer function must accept the intermediate output as its input.
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
Outer function
The outer function is the second job. Its input is the answer from the inner function. Think of a packing station receiving the item that a previous station finished.
- In f(g(x)), f is outer.
- An outer function must accept the intermediate output as its input.
The outer function is the second job. Its input is the answer from the inner function. Think of a packing station receiving the item that a previous station finished.
The first stage gave 3. If f(x) = 2x, find f(3). The question asks for the final output after doubling the intermediate answer. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
- f(3) = 2 × 3 = 6.The input slot of f now holds 3.
- Write the in-between answer inside the outer parentheses before calculating.
.3Composition operator and Binary operation
The open circle ∘ is the composition operator: it connects two functions into one new function. A binary operation takes two starting objects and makes one result. Here the starting objects are functions. The word binary refers to the number of starting objects, rather than to a computer’s zeros and ones. A degree is an angle measure. Its symbol ° appears after a number, as in 30°; it does not connect two functions.
- Read (f ∘ g)(x) as f composed with g at x.
- Read f(g(x)) as f of g of x.
- Both notations describe the same handoff.
- f ∘ g is a function name; (f ∘ g)(x) is that function’s output at input x.
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
Composition operator and binary operation
The open circle ∘ is the composition operator: it connects two functions into one new function. A binary operation takes two starting objects and makes one result. Here the starting objects are functions. The word binary refers to the number of starting objects, rather than to a computer’s zeros and ones. A degree is an angle measure. Its symbol ° appears after a number, as in 30°; it does not connect two functions.
- Read (f ∘ g)(x) as f composed with g at x.
- Read f(g(x)) as f of g of x.
- Both notations describe the same handoff.
- f ∘ g is a function name; (f ∘ g)(x) is that function’s output at input x.
The open circle ∘ is the composition operator: it connects two functions into one new function. A binary operation takes two starting objects and makes one result. Here the starting objects are functions. The word binary refers to the number of starting objects, rather than to a computer’s zeros and ones. A degree is an angle measure. Its symbol ° appears after a number, as in 30°; it does not connect two functions.
For f(x) = 2x and g(x) = x + 1, compare (f ∘ g)(2) and (fg)(2). You want to see what each symbol tells you to do. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
- (f ∘ g)(2) = f(3) = 6.Composition sends g(2) = 3 into f.
- (fg)(2) = f(2)·g(2) = 4 × 3 = 12.The product uses two separate outputs at 2.
- Composition: 6.
- Product: 12.
- Recognize binary operation as vocabulary for a two-object operation. The word does not add a calculation step.
- Read the open circle as after before deciding which function acts first.
- 1. Rewrite the circle notation as nested parentheses, meaning one pair of parentheses inside another: (f ∘ g)(x) = f(g(x)).
- 2. Name the inner function, which touches the original input.
- 3. Evaluate that function and write its output as a separate intermediate, or in-between, answer.
- 4. Put that whole intermediate answer into the outer function.
- 5. Check the path: original input, inner output, final output.
Evaluate a two-stage composition
- Rewrite (f ∘ g)(a) as f(g(a)); read it as f after g at a.
- Find the inner function next to a and calculate g(a). Write that in-between answer on its own line.
- Use the whole in-between answer as the outer input. Find f of that answer.
- Check the path from original input to in-between answer to final output.
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.
- (f ∘ g)(2) = f(g(2)).The circle means composition, so g is the inner function.
- g(2) = 2 + 1 = 3.The original input goes into g first.
- f(g(2)) = f(3) = 2 × 3 = 6.The output 3 from g is the input to f.
- Know cold: inside first, outside last. Write one intermediate answer so the order stays visible.
- Draw two boxes and a connecting arrow when the notation feels crowded.
- Know cold memory cue: read ∘ as after. f ∘ g says f after g, so g acts first.