Quarry School

Composition passes one answer into the next function

Subject: MathematicsLeans on: Function notationLeans on: Order of operationsLeans on: Multiplication notation
Level 1 · FoundationsAbout 9 min read8 new termsKeystone idea. Later lessons build on this one.
How this was estimated

Programmatic estimate. Rung levels, worked steps, prerequisites, terms and sentence length contribute to this level. It describes the lesson, not your ability.

Reading counts the whole lesson, including folded explanations, at 180 words a minute. Practice allows two minutes per item. These are planning assumptions; take the time you need.

AI estimate unavailable.

Path to here

Open the unit’s lesson list to follow the lesson order.

    Leans on

    Quick review (2 minutes)

    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.

    1 In plain words

    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.

    2 Picture it

    xgffirstsecondg(x)f(g(x))
    The machines run left to right, g then f.

    Reminder

    Reminder: Function notation, Order of operations, Multiplication notation
    • 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.

    3 Why

    The parentheses show what input each function receives. In f(g(x)), f is waiting for the value written inside its parentheses, namely g(x). You must obtain that value before f can act. This is the same order of operations used when you calculate 2(3 + 1): finish the inner calculation first. Because each machine produces one answer from an allowed input, the connected machines also produce one final answer wherever both stages can run.

    4 The 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.

    The same idea, five ways

    Say it

    f of g of x; f composed with g at x; f after g

    Write it

    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.

    In math
    • (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))
    Like

    Day becomes temperature, then temperature becomes heating cost.

    See it
    2g: add 1f: doublefirstsecond36
    The path starts in g even though f is written first in f(g(2)).

    The same idea, other ways

    As connected machines

    Follow the wire. The first machine g changes x into g(x). The second machine f changes that intermediate answer into f(g(x)).

    xgffirstsecondg(x)f(g(x))
    There is one continuous path through the machines.
    As a heating bill

    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.

    day dTCfirstsecondtemperaturecost
    The descriptive letters name day, temperature and cost.
    With a small number

    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.

    2add 1doublefirstsecond36
    Two actions happen in sequence.
    From the parentheses

    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.

    f( g(x) )

    Finish g(x)

    Then f receives that result

    Part 1: 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.
    2g(x) = x + 1inputoutput3
    2 goes in, the rule is g(x) = x + 1, and 3 comes out.

    Reminder

    Reminder: Function notation
    • Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.

    The same idea, five ways

    Say it

    Inner function

    Write it

    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 math
    • In f(g(x)), g is inner.
    • In g(f(x)), f is inner.
    Like

    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.

    See it
    2g(x) = x + 1inputoutput3
    The same picture again: 2 goes in, the rule is g(x) = x + 1, and 3 comes out.

    Worked example

    Find the intermediate answer

    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.

    Show the steps and the answer
    2add 1inputoutput3
    This is the first stage only.
    1. Evaluate g(2)=2+1=3.g is next to the starting input inside the parentheses.
    Answer
    The intermediate answer is 3.
    Double-check The expression is now f(3), so f still has a job to do.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: In g(f(x)), g is inner because it is written first.
    The inner function is closest to the starting x, which is f here.
    ✓ Instead: g(f(x)) applies f first; g is outer.

    Tips and tricks

    • Point to the function directly touching the original input; that is the first job.

    Part 2: 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.
    3f(x) = 2xinputoutput6
    3 goes in, the rule is f(x) = 2x, and 6 comes out.

    Reminder

    Reminder: Function notation
    • Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.

    The same idea, five ways

    Say it

    Outer function

    Write it

    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 math
    • In f(g(x)), f is outer.
    • An outer function must accept the intermediate output as its input.
    Like

    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.

    See it
    3f(x) = 2xinputoutput6
    The same picture again: 3 goes in, the rule is f(x) = 2x, and 6 comes out.

    Worked example

    Finish the second stage

    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.

    Show the steps and the answer
    3doubleinputoutput6
    The second stage completes the composition.
    1. f(3)=2×3=6.The input slot of f now holds 3.
    Answer
    The final answer is 6.
    Double-check Dividing 6 by 2 returns the outer input 3, which was g's answer.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: The outer function always receives the original x.
    It receives the in-between output. For g(x) = x + 1 and f(x) = 2x, input 2 reaches f as 3.
    ✓ Instead: f(g(2)) = f(3) = 6, while f(2) = 4 answers a different question.

    Tips and tricks

    • Write the in-between answer inside the outer parentheses before calculating.

    Part 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.

    f · g: multiply the two outputs

    f ∘ g: g acts first, then f

    30°: angle of thirty degrees

    Reminder

    Reminder: Function notation
    • Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.

    The same idea, five ways

    Say it

    Composition operator and binary operation

    Write it

    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.

    In math
    • 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.
    Like

    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.

    See it

    f · g: multiply the two outputs

    f ∘ g: g acts first, then f

    30°: angle of thirty degrees

    Worked example

    Circle versus product

    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.

    Show the steps and the answer
    2gffirstsecond36
    The picture shows the composition path.
    1. (f∘g)(2)=f(3)=6.Composition sends g(2) = 3 into f.
    2. (fg)(2)=f(2)·g(2)=4×3=12.The product uses two separate outputs at 2.
    Answer
    • Composition: 6.
    • Product: 12.
    Double-check The connected-machine path ends at 6; multiplying the independent outputs 4 and 3 ends at 12.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: Binary operation means zeros and ones in this definition.
    Here binary counts the two starting objects. Addition takes two numbers; composition takes two functions.
    ✓ Instead: Binary operation means an operation with two starting objects.
    ✗ Not this: (f ∘ g)(2) equals f(2)·g(2).
    The open circle requests an output handoff, whereas the dot requests multiplying independent outputs.
    ✓ Instead: f(g(2)) is the composition; f(2)·g(2) is the product.

    Tips and tricks

    • 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.

    5 How

    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

    1
    Does the inner function accept the starting input?
    YesCalculate its output and continue.
    NoThe composition has no output at this start.
    ↓
    2
    Does the outer function accept that in-between output?
    YesEvaluate the outer function to finish.
    NoThe composition has no output at this start.
    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.

    6 Worked example

    Worked example

    Add 1, then double

    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.

    Show the steps and the answer
    2g: add 1f: doublefirstsecond36
    The 3 coming out of g goes into f.
    1. (f∘g)(2)=f(g(2)).The circle means composition, so g is the inner function.
    2. g(2)=2+1=3.The original input goes into g first.
    3. f(g(2))=f(3)=2×3=6.The output 3 from g is the input to f.
    Answer
    (f ∘ g)(2) = 6.
    Double-check Combining the rules gives f(g(x)) = 2(x + 1); at 2 this is 2(2 + 1) = 6. The separate product at 2 is f(2)g(2) = 4 × 3 = 12, confirming that the two operations differ.

    Counterexamples

    What it is not, and the tempting wrong moves.

    ✗ Not this: (f ∘ g)(2) = f(2)·g(2) = 12.
    The circle requests a handoff, while multiplication uses separate outputs at the same input.
    ✓ Instead: Find g(2) = 3, then f(3) = 6.
    ✗ Not this: f(g(2)) means g(f(2)).
    Swapping the parentheses changes which machine receives 2.
    ✓ Instead: f(g(2)) starts with g; g(f(2)) starts with f.

    Tips and tricks

    • 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.

    7 The trap

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