Mathematical-Reasoning ยท Unit 23 ยท Video 2 ยท Interactive Practice
g โ f: The Function on the Right Acts First
IKey Formulas
Statement
Meaning
(gโf)(x)=g(f(x)) for all xโA
Definition of the compositegโf:AโC, for f:AโB and g:BโC
gโf: f inner (first), g outer (second)
The function written on the right acts first; the middle set B does not appear in gโf:AโC
(gโf)(x)=sin(3x2+2), ย (fโg)(x)=3sin2x+2
For f(x)=3x2+2 and g(x)=sinx: in general gโf๎ =fโg
gโg is defined when g:BโB
A function can be composed with itself when its codomain equals its domain, so every output is again an input
Key Insight: Read gโf from right to left: apply f, then feed its output to g. The composite exists because the codomain of f is exactly the domain of g.
IIInner First, Then Outer
With f(x)=3x2+2 and g(x)=sinx, the two orders of composition give different functions.
IIIFollowing the Arrows
The composite gโf collapses each two-step path xโf(x)โg(f(x)) into one arrow from A to C.
๐ก Challenge: no choice of arrows for f and g makes all four elements of C outputs of gโf. Why not?
IVElement by Element, and When a Composite Exists
Each composite is computed one input at a time, and it exists only when the inner function's outputs are legal inputs for the outer one.
VQuiz Questions
Problem 1 ยท Evaluate a Composite
Given:f:RโR, f(x)=2x+1, and g:RโR, g(x)=x2 โ find(gโf)(3).
โ Correct! The inner function f acts first: f(3)=7, then g(7)=49.
โ Close, but that is the other order.19=f(g(3))=(fโg)(3). In gโf the function on the right, f, is applied first.
โ Not quite.63=f(3)โ g(3)=7โ 9 is the product fg, not the composite. Composition feeds the output of f into g.
โ Not quite. Compute f(3) first, then apply g to that output.
Show solution
By the definition of composition, (gโf)(3)=g(f(3)). First the inner function:
f(3)=2(3)+1=7
Then the outer function takes that output as its input:
(gโf)(3)=g(7)=72=49
For comparison, the other order gives (fโg)(3)=f(9)=19, so gโf๎ =fโg here.
Problem 2 ยท The Formula for a Composite
Given:f:RโR, f(x)=x2โ1, and g:RโR, g(x)=cosx โ find a formula for (fโg)(x).
โ Correct!g is the inner function: f(cosx)=(cosx)2โ1.
โ Close, but the order is reversed.cos(x2โ1)=g(f(x))=(gโf)(x). In fโg, g acts first.
โ Not quite. That is the product f(x)โ g(x). Composition substitutes the whole output g(x) for x in the formula of f.
โ Not quite.cos(x2)โ1 squares x before taking the cosine, so g is not acting first. Squaring must apply to the output cosx.
Show solution
By definition, (fโg)(x)=f(g(x)). Replace g(x) by its formula:
(fโg)(x)=f(cosx)
Now f squares whatever it receives and subtracts 1:
(fโg)(x)=(cosx)2โ1=cos2xโ1
The other order is (gโf)(x)=g(x2โ1)=cos(x2โ1), a different function: at x=0 it gives cos(โ1)โ0.54, while (fโg)(0)=1โ1=0.
Problem 3 ยท Composites on Finite Sets
Given:A={a,b,c} and B={1,2,3}, with f:AโB defined by f(a)=3, f(b)=1, f(c)=3, and g:BโB defined by g(1)=2, g(2)=3, g(3)=1 โ find the arrows of gโf and the value (gโg)(3).
What are (gโf)(a), (gโf)(b), (gโf)(c), in that order?
What is (gโg)(3)?
โ Correct!gโf sends aโฆ1, bโฆ2, cโฆ1, and (gโg)(3)=g(1)=2.
โ Not quite. These are the values of f alone. Each output of f must still go through g: g(3)=1 and g(1)=2.
โ Not quite. These follow the arrows of g backwards: g(2)=3 means g sends 2 to 3, so g sends 3 to 1, not to 2.
โ Check the arrows of gโf. For each letter, find f of it, then apply g to that number.
โ Not quite.1=g(3) applies g only once. (gโg)(3)=g(g(3)) needs a second step.
โ Not quite.g:BโB has codomain equal to its domain, B, so gโg is defined.
โ Check (gโg)(3). Follow the arrows of g twice, starting at 3.
Show solution
Apply the definition to each element of A, inner function first:
Both a and c land on 1 because f already sent both of them to 3. Since g:BโB, the composite gโg is defined, and
(gโg)(3)=g(g(3))=g(1)=2
Problem 4 ยท Which Composites Exist?
Given: the disjoint sets A={1,2,3}, B={a,b}, C={x,y} and functions f:AโB, g:BโC, h:CโA โ decide which composite is not defined, and find the domain and codomain of fโhโg.
Which composite is NOT defined?
What is fโhโg?
โ Correct!hโf would feed outputs of f (in B) to h, which accepts only C. And g acts first, so fโhโg starts in B and ends in the codomain of f, which is B.
โ Not that one. That composite is defined: check that the codomain of its right-hand function is the domain of its left-hand function.
โ Not quite.A is the domain of f, but f is applied last. The domain of a composite is the domain of the right-most, first-acting function.
โ Check the ends. The composite starts in the domain of the function applied first and ends in the codomain of the function applied last.
Show solution
A composite qโp is defined when the codomain of the inner function p is the domain of the outer function q. Check each option:
fโh: h:CโA and f:AโB, so fโh:CโB is defined.
hโg: g:BโC and h:CโA, so hโg:BโA is defined.
gโf: f:AโB and g:BโC, so gโf:AโC is defined.
hโf: f outputs elements of B, but h accepts only elements of C, and BโฉC=โ . So hโf is not defined.
For fโhโg, the functions act right to left: g first, then h, then f:
Bย gย โCย hย โAย fย โB
Each step lands in the domain of the next, so fโhโg:BโB.