2.2.8 · D5Functions

Question bank — Composition of functions — f(g(x)), g(f(x))

1,330 words6 min readBack to topic

Reminder of the one rule that unlocks most of these: in , the rightmost / innermost function runs FIRST. Read the circle right-to-left.


True or false — justify

for every pair of functions.
False — composition is generally non-commutative; e.g. doubling then adding 3 gives , but adding 3 then doubling gives .
If happens for one specific , then the two composites are the same function.
False — they may agree at isolated points yet differ everywhere else; equality as functions needs agreement for all in the domain.
.
False — that is the product of functions; composition means feeding into , i.e. , which is a nested substitution not a multiplication.
Composition is associative, so .
True — both sides unfold to ; the parentheses only regroup, they never change which function touches the input first.
The identity function satisfies for any .
True — returns its input untouched, so whether you apply it before or after , nothing is added or removed; it behaves like or .
If both and have domain all of , then also has domain all of .
True — every real is a legal input to , and is real so it is a legal input to ; nothing can break, so the chain is defined everywhere. (See Domain and range of function.)
A decomposition is unique.
False — e.g. splits as , but also trivially as ; many splits exist, some just more useful.
If and are both increasing, then is increasing.
True — feeding a larger input to gives a larger , and then turns that into a larger output; "bigger in ⇒ bigger out" survives the chain.
If is decreasing and is decreasing, then is decreasing.
False — it is increasing; two order-reversals cancel, just like a negative times a negative is positive.
(composing a function with itself) is always the identity.
False — that only holds for special "self-inverse" functions like or ; for you get , nowhere near the identity.

Spot the error

" means do first because is written on the left." — where's the slip?
The circle reads right-to-left: runs first. Reading it like English left-to-right is the classic trap.
", so has domain ."
Wrong constraint — the input to the square root is , so we need , giving domain , not . The shift was ignored.
"To find the domain of , just take the domain of the outer function ."
Incomplete — you must also require to lie in 's domain and to land in 's domain; the whole chain must survive, not just the last link.
", so I replace in 's formula with ."
Backwards — you substitute into : take 's formula and replace its variable with the whole expression . The inner function's output is what gets fed in.
" with and " — quick sanity check that fails how?
You verify by re-composing: must reproduce . If isn't exactly the inner piece , the rebuilt expression won't match — always substitute back to confirm.

Why questions

Why does the range of , not just its domain, decide whether exists?
Because 's outputs become 's inputs; if produces a value cannot accept (like a negative under a square root), the chain snaps at that value even though itself was happy.
Why is read right-to-left instead of left-to-right?
It mirrors nested parentheses: in you must resolve the innermost before can act, so the physically-first operation is the rightmost symbol.
Why does associativity let us drop parentheses in ?
Every grouping evaluates the functions in the same fixed order (f, then g, then h); parentheses only say "which pair to name first", not "which runs first", so the final output is identical.
Why is the identity function the "do-nothing" element of composition?
returns exactly what it received, so inserting it into a chain neither transforms nor blocks the value — like an empty machine on the assembly line.
Why does the chain rule have a product of derivatives when it differentiates a composition?
Because a composite scales change twice: magnifies the input's wiggle by , then magnifies that by evaluated at ; nested transformations multiply their sensitivities.
Why does but not every ?
An inverse is built to undo so their chain returns the input; a general just applies the same transformation twice, which usually keeps moving the value further.

Edge cases

What is when is a constant function, say ?
It is itself constant: , a single fixed value for every (provided is in 's domain), because always receives the same input.
Can have a smaller domain than both and individually?
Yes — the double filter (legal for , and legal for ) can shrink it below either original, e.g. of a shifted input trims off part of the real line.
What happens to at a point where equals a value excluded from 's domain (a "hole" in )?
The composite is undefined there even if was fine for ; that single output routes into a forbidden slot of , so a hole appears in 's domain.
If and are both bijective, is bijective?
Yes — the chain is still one-to-one (distinct inputs stay distinct through both stages) and onto (every target is reachable), so the whole assembly line is reversible.
Composing with : what is and where is it valid?
, but only for , since requires a positive input even though the simplified answer looks universal. (See Exponential and logarithmic functions.)
What is , composing the identity with itself?
Still the identity — doing "nothing" twice is doing nothing, so it stays the do-nothing element.
For (identity) as the inner function, why does collapse cleanly but stay ?
With : trivially; and too — identity is invisible on either side, which is exactly why it earns the name.
Recall One-line self-test

In , which function eats the raw first? ::: — the rightmost/innermost function always runs first.