Mathematical-Reasoning ยท Unit 23 ยท Video 2 ยท Interactive Practice

g โˆ˜ f: The Function on the Right Acts First

IKey Formulas

StatementMeaning
(gโˆ˜f)(x)=g(f(x))(g \circ f)(x) = g\big(f(x)\big) for all xโˆˆAx \in ADefinition of the composite gโˆ˜f:Aโ†’Cg \circ f : A \to C, for f:Aโ†’Bf : A \to B and g:Bโ†’Cg : B \to C
gโˆ˜fg \circ f: ff inner (first), gg outer (second)The function written on the right acts first; the middle set BB does not appear in gโˆ˜f:Aโ†’Cg \circ f : A \to C
(gโˆ˜f)(x)=sinโก(3x2+2)(g \circ f)(x) = \sin(3x^2 + 2), ย (fโˆ˜g)(x)=3sinโก2x+2\ (f \circ g)(x) = 3\sin^2 x + 2For f(x)=3x2+2f(x) = 3x^2 + 2 and g(x)=sinโกxg(x) = \sin x: in general gโˆ˜fโ‰ fโˆ˜gg \circ f \ne f \circ g
gโˆ˜gg \circ g is defined when g:Bโ†’Bg : B \to BA function can be composed with itself when its codomain equals its domain, so every output is again an input

Key Insight: Read gโˆ˜fg \circ f from right to left: apply ff, then feed its output to gg. The composite exists because the codomain of ff is exactly the domain of gg.

IIInner First, Then Outer

With f(x)=3x2+2f(x) = 3x^2 + 2 and g(x)=sinโกxg(x) = \sin x, the two orders of composition give different functions.

IIIFollowing the Arrows

The composite gโˆ˜fg \circ f collapses each two-step path xโ†’f(x)โ†’g(f(x))x \to f(x) \to g(f(x)) into one arrow from AA to CC.

๐Ÿ’ก Challenge: no choice of arrows for ff and gg makes all four elements of CC outputs of gโˆ˜fg \circ 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โ†’Rf : \mathbb{R} \to \mathbb{R}, f(x)=2x+1f(x) = 2x + 1, and g:Rโ†’Rg : \mathbb{R} \to \mathbb{R}, g(x)=x2g(x) = x^2 โ€” find (gโˆ˜f)(3)(g \circ f)(3).

    โœ… Correct! The inner function ff acts first: f(3)=7f(3) = 7, then g(7)=49g(7) = 49.
    โŒ Close, but that is the other order. 19=f(g(3))=(fโˆ˜g)(3)19 = f(g(3)) = (f \circ g)(3). In gโˆ˜fg \circ f the function on the right, ff, is applied first.
    โŒ Not quite. 63=f(3)โ‹…g(3)=7โ‹…963 = f(3) \cdot g(3) = 7 \cdot 9 is the product fgfg, not the composite. Composition feeds the output of ff into gg.
    โŒ Not quite. Compute f(3)f(3) first, then apply gg to that output.
    Show solution

    By the definition of composition, (gโˆ˜f)(3)=g(f(3))(g \circ f)(3) = g\big(f(3)\big). First the inner function:

    f(3)=2(3)+1=7f(3) = 2(3) + 1 = 7

    Then the outer function takes that output as its input:

    (gโˆ˜f)(3)=g(7)=72=49(g \circ f)(3) = g(7) = 7^2 = 49

    For comparison, the other order gives (fโˆ˜g)(3)=f(9)=19(f \circ g)(3) = f(9) = 19, so gโˆ˜fโ‰ fโˆ˜gg \circ f \ne f \circ g here.

    Problem 2 ยท The Formula for a Composite

    Given: f:Rโ†’Rf : \mathbb{R} \to \mathbb{R}, f(x)=x2โˆ’1f(x) = x^2 - 1, and g:Rโ†’Rg : \mathbb{R} \to \mathbb{R}, g(x)=cosโกxg(x) = \cos x โ€” find a formula for (fโˆ˜g)(x)(f \circ g)(x).

    โœ… Correct! gg is the inner function: f(cosโกx)=(cosโกx)2โˆ’1f(\cos x) = (\cos x)^2 - 1.
    โŒ Close, but the order is reversed. cosโก(x2โˆ’1)=g(f(x))=(gโˆ˜f)(x)\cos(x^2 - 1) = g\big(f(x)\big) = (g \circ f)(x). In fโˆ˜gf \circ g, gg acts first.
    โŒ Not quite. That is the product f(x)โ‹…g(x)f(x) \cdot g(x). Composition substitutes the whole output g(x)g(x) for xx in the formula of ff.
    โŒ Not quite. cosโก(x2)โˆ’1\cos(x^2) - 1 squares xx before taking the cosine, so gg is not acting first. Squaring must apply to the output cosโกx\cos x.
    Show solution

    By definition, (fโˆ˜g)(x)=f(g(x))(f \circ g)(x) = f\big(g(x)\big). Replace g(x)g(x) by its formula:

    (fโˆ˜g)(x)=f(cosโกx)(f \circ g)(x) = f(\cos x)

    Now ff squares whatever it receives and subtracts 11:

    (fโˆ˜g)(x)=(cosโกx)2โˆ’1=cosโก2xโˆ’1(f \circ g)(x) = (\cos x)^2 - 1 = \cos^2 x - 1

    The other order is (gโˆ˜f)(x)=g(x2โˆ’1)=cosโก(x2โˆ’1)(g \circ f)(x) = g(x^2 - 1) = \cos(x^2 - 1), a different function: at x=0x = 0 it gives cosโก(โˆ’1)โ‰ˆ0.54\cos(-1) \approx 0.54, while (fโˆ˜g)(0)=1โˆ’1=0(f \circ g)(0) = 1 - 1 = 0.

    Problem 3 ยท Composites on Finite Sets

    Given: A={a,b,c}A = \{a, b, c\} and B={1,2,3}B = \{1, 2, 3\}, with f:Aโ†’Bf : A \to B defined by f(a)=3f(a) = 3, f(b)=1f(b) = 1, f(c)=3f(c) = 3, and g:Bโ†’Bg : B \to B defined by g(1)=2g(1) = 2, g(2)=3g(2) = 3, g(3)=1g(3) = 1 โ€” find the arrows of gโˆ˜fg \circ f and the value (gโˆ˜g)(3)(g \circ g)(3).

    What are (gโˆ˜f)(a)(g \circ f)(a), (gโˆ˜f)(b)(g \circ f)(b), (gโˆ˜f)(c)(g \circ f)(c), in that order?

    What is (gโˆ˜g)(3)(g \circ g)(3)?

    โœ… Correct! gโˆ˜fg \circ f sends aโ†ฆ1a \mapsto 1, bโ†ฆ2b \mapsto 2, cโ†ฆ1c \mapsto 1, and (gโˆ˜g)(3)=g(1)=2(g \circ g)(3) = g(1) = 2.
    โŒ Not quite. These are the values of ff alone. Each output of ff must still go through gg: g(3)=1g(3) = 1 and g(1)=2g(1) = 2.
    โŒ Not quite. These follow the arrows of gg backwards: g(2)=3g(2) = 3 means gg sends 22 to 33, so gg sends 33 to 11, not to 22.
    โŒ Check the arrows of gโˆ˜fg \circ f. For each letter, find ff of it, then apply gg to that number.
    โŒ Not quite. 1=g(3)1 = g(3) applies gg only once. (gโˆ˜g)(3)=g(g(3))(g \circ g)(3) = g\big(g(3)\big) needs a second step.
    โŒ Not quite. g:Bโ†’Bg : B \to B has codomain equal to its domain, BB, so gโˆ˜gg \circ g is defined.
    โŒ Check (gโˆ˜g)(3)(g \circ g)(3). Follow the arrows of gg twice, starting at 33.
    Show solution

    Apply the definition to each element of AA, inner function first:

    (gโˆ˜f)(a)=g(f(a))=g(3)=1(g \circ f)(a) = g\big(f(a)\big) = g(3) = 1 (gโˆ˜f)(b)=g(f(b))=g(1)=2(g \circ f)(b) = g\big(f(b)\big) = g(1) = 2 (gโˆ˜f)(c)=g(f(c))=g(3)=1(g \circ f)(c) = g\big(f(c)\big) = g(3) = 1

    Both aa and cc land on 11 because ff already sent both of them to 33. Since g:Bโ†’Bg : B \to B, the composite gโˆ˜gg \circ g is defined, and

    (gโˆ˜g)(3)=g(g(3))=g(1)=2(g \circ g)(3) = g\big(g(3)\big) = g(1) = 2

    Problem 4 ยท Which Composites Exist?

    Given: the disjoint sets A={1,2,3}A = \{1, 2, 3\}, B={a,b}B = \{a, b\}, C={x,y}C = \{x, y\} and functions f:Aโ†’Bf : A \to B, g:Bโ†’Cg : B \to C, h:Cโ†’Ah : C \to A โ€” decide which composite is not defined, and find the domain and codomain of fโˆ˜hโˆ˜gf \circ h \circ g.

    Which composite is NOT defined?

    What is fโˆ˜hโˆ˜gf \circ h \circ g?

    โœ… Correct! hโˆ˜fh \circ f would feed outputs of ff (in BB) to hh, which accepts only CC. And gg acts first, so fโˆ˜hโˆ˜gf \circ h \circ g starts in BB and ends in the codomain of ff, which is BB.
    โŒ 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. AA is the domain of ff, but ff 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โˆ˜pq \circ p is defined when the codomain of the inner function pp is the domain of the outer function qq. Check each option:

    • fโˆ˜hf \circ h: h:Cโ†’Ah : C \to A and f:Aโ†’Bf : A \to B, so fโˆ˜h:Cโ†’Bf \circ h : C \to B is defined.
    • hโˆ˜gh \circ g: g:Bโ†’Cg : B \to C and h:Cโ†’Ah : C \to A, so hโˆ˜g:Bโ†’Ah \circ g : B \to A is defined.
    • gโˆ˜fg \circ f: f:Aโ†’Bf : A \to B and g:Bโ†’Cg : B \to C, so gโˆ˜f:Aโ†’Cg \circ f : A \to C is defined.
    • hโˆ˜fh \circ f: ff outputs elements of BB, but hh accepts only elements of CC, and BโˆฉC=โˆ…B \cap C = \emptyset. So hโˆ˜fh \circ f is not defined.

    For fโˆ˜hโˆ˜gf \circ h \circ g, the functions act right to left: gg first, then hh, then ff:

    Bโ†’ย gย Cโ†’ย hย Aโ†’ย fย BB \xrightarrow{\ g\ } C \xrightarrow{\ h\ } A \xrightarrow{\ f\ } B

    Each step lands in the domain of the next, so fโˆ˜hโˆ˜g:Bโ†’Bf \circ h \circ g : B \to B.

    Solved: 0 / 4