Mathematical-Reasoning Β· Unit 23 Β· Video 1 Β· Interactive Practice
Following Two Arrows: How g(f(x)) Builds a Function
IKey Formulas
Formula
Name
Meaning
f:AβB and g:BβCβxβ¦g(f(x)) is a function AβC
Following two arrows
Each xβA gets exactly one value g(f(x)) in C
xβAβf(x)βBβg(f(x))βC
The hand-off
Every output of f lies in B, the set of inputs of g
xΓ3β3x+2β3x+2cubeβ(3x+2)3
A formula as a chain of steps
Three simpler functions applied in turn
3x2+2β₯2>0 for every xβR
A valid hand-off
The square root in 3x2+2β always receives a nonnegative input
Key Insight: A function must give every input exactly one output, but it need not reach every element of its codomain, so xβ¦g(f(x)) may send two inputs to one output and may leave elements of C unreached. Building a function by applying one function to the outputs of another is called composition.
IIVisualization 1 β Following Two Arrows
For each xβA, f(x) lies in B, so g(f(x)) is exactly one element of C.
π‘ Challenge: redirect arrows so that xβ¦g(f(x)) reaches u. No choice of f and g lets it reach all four elements of C, because every value g(f(x)) is g of one of the three elements of B.
IIIVisualization 2 β A Formula as a Chain of Steps
Each step feeds its output to the next, and three different functions can share every step but the last.
IVVisualization 3 β Two Pieces, Then Combined
In k(x)=3x2+1sin(4x+3)ββ, a step may restart from x or use two earlier results.
VQuiz Questions
Problem 1 Β· Follow the Arrows
Given:A={1,2,3,4}, B={p,q,r}, C={s,t,u}, the function f:AβB with f(1)=q, f(2)=r, f(3)=p, f(4)=q, and the function g:BβC with g(p)=u, g(q)=s, g(r)=s. Which list describes the function xβ¦g(f(x)) from A to C?
β Correct! Each input follows one arrow of f and then one arrow of g. Three inputs share the output s and t is never reached, both of which a function allows.
β Not quite. This list is f alone: its outputs are in B, not C. Follow the second arrow too, for example g(f(1))=g(q)=s.
β Not quite.f(2)=r and g(r)=s, so g(f(2))=s. No arrow of g lands on t, and the new function does not have to reach every element of C.
β Not quite. Trace each input separately: first find f(x) in B, then apply g to that element. Here f(2)=r, g(r)=s, and f(3)=p, g(p)=u.
So xβ¦g(f(x)) sends 1, 2 and 4 to s and sends 3 to u. Each element of A has exactly one output in C, so this is a function from A to C, even though t is never an output.
Problem 2 Β· Is Every Hand-Off Valid?
Given: each formula below is computed step by step from an input xβR. Which one defines a function from R to R, so that every value handed to the next step lies where that step accepts it, for every real x?
β Correct!x2β2x+2=(xβ1)2+1β₯1, so the square root always receives a positive input.
β Not quite. At x=2 the value handed to the square root is 2β4=β2, which it does not accept.
β Not quite.x2β4x+4=(xβ2)2, which is 0 at x=2, so the division step fails there.
β Not quite. At x=0 the value handed to the square root is β1, which it does not accept.
Show solution
Check the value handed to the last step in each formula.
(a) 2βx2<0 when β£xβ£>2β; for example x=2 gives β2.
(b) x2β4x+4=(xβ2)2=0 at x=2, and division by 0 is undefined.
(c) Completing the square, x2β2x+2=(xβ1)2+1β₯1>0 for every real x, so every hand-off is valid.
(d) x2β1<0 when β1<x<1; for example x=0 gives β1.
Only (c) gives every real input exactly one real output, so only (c) defines a function RβR. The term β2x looks dangerous, but it cannot make the value negative, just as 3x2+2β₯2 protects 3x2+2β.
Problem 3 Β· From Steps to a Formula
Given: a function h:RβR is computed by the steps below. Find the formula for h(x) and the value h(2).
Step
Verbal Description
1
Choose an input, x.
2
Add 1.
3
Square the result.
4
Go back to the original input and multiply it by 5.
5
Subtract the result of step 4 from the result of step 3.
6
Take the cube root of the result.
What is h(x)?
What is h(2)?
β Correct!h(x)=3(x+1)2β5xβ, and h(2)=39β10β=3β1β=β1.
β Not quite. Step 4 goes back to the original input x, not to the result of step 3, so it produces 5x.
β Not quite. Step 3 squares the result of step 2, which is x+1, so it produces (x+1)2, not x2+1.
β Not quite. Step 5 subtracts the result of step 4 from the result of step 3, so it produces (x+1)2β5x.
β Not quite.3β36β comes from multiplying the result of step 3 by 5. Step 4 multiplies the original input, giving 5β 2=10.
β Not quite. A cube root accepts every real number: (β1)3=β1, so 3β1β=β1.
β Not quite. That is 35β 2β9β, the subtraction in the wrong order. Step 5 computes 9β10=β1.
Show solution
Track the symbolic result of each step:
Step 2: x+1. Step 3: (x+1)2.
Step 4 restarts from the input: 5x.
Step 5 uses two earlier results: (x+1)2β5x.
Step 6: 3(x+1)2β5xβ.
h(x)=3(x+1)2β5xβ.
At x=2: step 2 gives 3, step 3 gives 9, step 4 gives 10, step 5 gives 9β10=β1, and step 6 gives 3β1β=β1, since (β1)3=β1.
h(2)=β1.
Every hand-off is valid for all real x, because a cube root accepts negative inputs, so h really is a function from R to R.
Problem 4 Β· When the Hand-Off Fails
Given:N={1,2,3,β¦}, the function f:{1,2,3}βZ with f(n)=nβ2, and the function g:NβN with g(m)=2m. Doesnβ¦g(f(n)) define a function from {1,2,3} to N?
β Correct! The chain needs every output of f to be an input that g accepts. Here f(1)=β1 and f(2)=0 lie outside N, the domain of g.
β Not quite. The formula 2m can be evaluated at β1 and 0, but g is defined only on N, so g(β1) and g(0) do not exist. The values β2 and 0 are not in N either.
β Not quite. Two functions chain only when the outputs of the first lie in the set of inputs of the second. The outputs β1 and 0 of f are not in N.
β Not quite. A function does not have to reach every element of its codomain, so missing the odd numbers is allowed. The real failure is the hand-off from f to g.
Show solution
Compute the outputs of f: f(1)=β1, f(2)=0, f(3)=1.
The function g accepts only inputs in N={1,2,3,β¦}. Since β1β/N and 0β/N, the values g(f(1)) and g(f(2)) are not defined. Only g(f(3))=g(1)=2 exists.
A function from {1,2,3} to N must give every input an output, so nβ¦g(f(n)) is not such a function. The construction works when f:AβB and g:BβC, that is, when every output of f lies where g accepts it.