How to use these solu­tions

These are the worked solu­tions to the Mixed Prac­tice ques­tions in the les­son Com­po­si­tion, Inverses and Mixed Prac­tice. Try each ques­tion first, then read the steps and com­pare. Remem­ber the order in a com­pos­ite: (g∘f)(x)=g(f(x))(g \circ f)(x) = g(f(x)) means apply ff first, then gg.

Ques­tion 1: Com­pos­ing func­tions given as sets of pairs

The prob­lem

f={(1,3),(2,5),(3,1)}f = \{(1, 3), (2, 5), (3, 1)\} and g={(1,2),(3,4),(5,6)}g = \{(1, 2), (3, 4), (5, 6)\}. Find g∘fg \circ f.

Under­stand­ing the prob­lem

Each pair (a,b)(a, b) in ff means f(a)=bf(a) = b. So f(1)=3f(1) = 3, f(2)=5f(2) = 5, f(3)=1f(3) = 1, and g(1)=2g(1) = 2, g(3)=4g(3) = 4, g(5)=6g(5) = 6. The domain of g∘fg \circ f is the domain of ff: {1,2,3}\{1, 2, 3\}.

The idea

For each xx in the domain of ff, find f(x)f(x), then feed that into gg.

Step-by-step solu­tion

Step 1. x=1x = 1: f(1)=3f(1) = 3, then g(3)=4g(3) = 4. So (g∘f)(1)=4(g \circ f)(1) = 4.

Step 2. x=2x = 2: f(2)=5f(2) = 5, then g(5)=6g(5) = 6. So (g∘f)(2)=6(g \circ f)(2) = 6.

Step 3. x=3x = 3: f(3)=1f(3) = 1, then g(1)=2g(1) = 2. So (g∘f)(3)=2(g \circ f)(3) = 2.

Step 4. Write the result as a set of pairs.

g∘f={(1,4),(2,6),(3,2)}g \circ f = \{(1, 4), (2, 6), (3, 2)\}

Check­ing the answer

Every out­put of ff (33, 55, 11) is in the domain of gg, so g∘fg \circ f is defined at every point.

Answer

g∘f={(1,4),(2,6),(3,2)}g \circ f = \{(1, 4), (2, 6), (3, 2)\}

Ques­tion 2: Com­pos­ites of for­mu­las

The prob­lem

f(x)=x+3f(x) = x + 3, g(x)=x2−2g(x) = x^2 - 2. Find f∘gf \circ g, g∘fg \circ f and f∘ff \circ f.

Under­stand­ing the prob­lem

(f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)): put g(x)g(x) into ff. (g∘f)(x)=g(f(x))(g \circ f)(x) = g(f(x)): put f(x)f(x) into gg.

The idea

Replace the input of the outer func­tion by the whole inner expres­sion, then sim­plify.

Step-by-step solu­tion

Step 1. f∘gf \circ g: ff adds 33 to its input.

(f∘g)(x)=f(x2−2)=(x2−2)+3=x2+1(f \circ g)(x) = f(x^2 - 2) = (x^2 - 2) + 3 = x^2 + 1

Step 2. g∘fg \circ f: gg squares its input and sub­tracts 22.

(g∘f)(x)=g(x+3)=(x+3)2−2=x2+6x+9−2=x2+6x+7\begin{aligned} (g \circ f)(x) = g(x + 3) &= (x + 3)^2 - 2\\ &= x^2 + 6x + 9 - 2 = x^2 + 6x + 7 \end{aligned}

Step 3. f∘ff \circ f: add 33, then add 33 again.

(f∘f)(x)=f(x+3)=x+6(f \circ f)(x) = f(x + 3) = x + 6

Check­ing the answer

At x=1x = 1: g(1)=−1g(1) = -1, f(−1)=2f(-1) = 2, and 12+1=21^2 + 1 = 2. Also f(1)=4f(1) = 4, g(4)=14g(4) = 14, and 1+6+7=141 + 6 + 7 = 14.

Answer

f∘g=x2+1f \circ g = x^2 + 1; g∘f=x2+6x+7g \circ f = x^2 + 6x + 7; f∘f=x+6f \circ f = x + 6.

Com­mon mis­take to avoid

Mix­ing up the order. f∘gf \circ g and g∘fg \circ f are dif­fer­ent here.

Ques­tion 3: A func­tion that is its own inverse

The prob­lem

f(x)=3x+25x−3\displaystyle f(x) = \frac{3x + 2}{5x - 3}, x≠35\displaystyle x \ne \frac{3}{5}. Show (f∘f)(x)=x(f \circ f)(x) = x. What is f−1f^{-1}?

Under­stand­ing the prob­lem

We need f(f(x))f(f(x)): sub­sti­tute the whole frac­tion f(x)f(x) in place of xx in ff. If the result is xx, then apply­ing ff twice brings you back, so ff undoes itself.

The idea

Sim­plify the numer­a­tor and denom­i­na­tor of f(f(x))f(f(x)) sep­a­rately over the com­mon denom­i­na­tor 5x−35x - 3.

Step-by-step solu­tion

Step 1. Write f(f(x))f(f(x)).

f(f(x))=3(3x+25x−3)+25(3x+25x−3)−3\displaystyle f(f(x)) = \frac{3\left(\dfrac{3x + 2}{5x - 3}\right) + 2}{5\left(\dfrac{3x + 2}{5x - 3}\right) - 3}

Step 2. Sim­plify the numer­a­tor.

3(3x+2)+2(5x−3)5x−3=9x+6+10x−65x−3=19x5x−3\displaystyle \frac{3(3x + 2) + 2(5x - 3)}{5x - 3} = \frac{9x + 6 + 10x - 6}{5x - 3} = \frac{19x}{5x - 3}

Step 3. Sim­plify the denom­i­na­tor.

5(3x+2)−3(5x−3)5x−3=15x+10−15x+95x−3=195x−3\displaystyle \frac{5(3x + 2) - 3(5x - 3)}{5x - 3} = \frac{15x + 10 - 15x + 9}{5x - 3} = \frac{19}{5x - 3}

Step 4. Divide; the 5x−35x - 3 and the 1919 can­cel.

f(f(x))=19x5x−3⋅5x−319=x\displaystyle f(f(x)) = \frac{19x}{5x - 3}\cdot\frac{5x - 3}{19} = x

Step 5. Since f∘ff \circ f is the iden­tity, ff is its own inverse: f−1=ff^{-1} = f.

Check­ing the answer

f(0)=2−3=−23\displaystyle f(0) = \frac{2}{-3} = -\frac{2}{3}; f(−23)=−2+2−103−3=0\displaystyle f\left(-\frac{2}{3}\right) = \frac{-2 + 2}{-\frac{10}{3} - 3} = 0. Back to 00.

Answer

(f∘f)(x)=x(f \circ f)(x) = x, so f−1(x)=f(x)=3x+25x−3\displaystyle f^{-1}(x) = f(x) = \frac{3x + 2}{5x - 3}.

Ques­tion 4: Find­ing inverses

The prob­lem

Find the inverse of: (a) f(x)=6−5xf(x) = 6 - 5x; (b) f(x)=x−13f(x) = \sqrt[3]{x - 1}; (c) f(x)=xx+2\displaystyle f(x) = \frac{x}{x + 2} on R−{−2}\mathbf{R} - \{-2\}.

Under­stand­ing the prob­lem

To find f−1f^{-1}, write y=f(x)y = f(x) and solve for xx in terms of yy. The result­ing for­mula is f−1(y)f^{-1}(y).

The idea

Undo the oper­a­tions of ff in reverse order.

Step-by-step solu­tion

Part (a)

Step 1. y=6−5x  ⇒  5x=6−y  ⇒  x=6−y5\displaystyle y = 6 - 5x \;\Rightarrow\; 5x = 6 - y \;\Rightarrow\; x = \frac{6 - y}{5}.

f−1(y)=6−y5\displaystyle f^{-1}(y) = \frac{6 - y}{5}

Part (b)

Step 1. y=x−13y = \sqrt[3]{x - 1}. Cube both sides: y3=x−1y^3 = x - 1.

Step 2. x=y3+1x = y^3 + 1.

f−1(y)=y3+1f^{-1}(y) = y^3 + 1

Part (c)

Step 1. y=xx+2\displaystyle y = \frac{x}{x + 2}. Mul­ti­ply by x+2x + 2: y(x+2)=xy(x + 2) = x, that is xy+2y=xxy + 2y = x.

Step 2. Col­lect the xx terms: 2y=x−xy=x(1−y)2y = x - xy = x(1 - y).

Step 3. Divide by 1−y1 - y (so y≠1y \ne 1).

f−1(y)=2y1−y,y≠1\displaystyle f^{-1}(y) = \frac{2y}{1 - y}, \qquad y \ne 1

The value y=1y = 1 is never taken by ff, because xx+2=1\displaystyle \frac{x}{x + 2} = 1 would need 0=20 = 2.

Check­ing the answer

(a) f(1)=1f(1) = 1 and 6−15=1\displaystyle \frac{6 - 1}{5} = 1. (b) f(9)=2f(9) = 2 and 23+1=92^3 + 1 = 9. (c) f(2)=12\displaystyle f(2) = \frac{1}{2} and 2⋅121−12=2\displaystyle \frac{2 \cdot \frac{1}{2}}{1 - \frac{1}{2}} = 2.

Answer

(a) 6−y5\displaystyle \frac{6 - y}{5} (b) y3+1y^3 + 1 (c) 2y1−y\displaystyle \frac{2y}{1 - y}, y≠1y \ne 1

Ques­tion 5: Is this func­tion invert­ible?

The prob­lem

Is f:{1,2,3}→{a,b,c}f : \{1, 2, 3\} \to \{a, b, c\}, f={(1,b),(2,a),(3,b)}f = \{(1, b), (2, a), (3, b)\} invert­ible? Why?

Under­stand­ing the prob­lem

A func­tion is invert­ible exactly when it is a bijec­tion: one-one (dif­fer­ent inputs give dif­fer­ent out­puts) and onto (every ele­ment of the codomain is used).

The idea

Check whether two inputs share an out­put.

Step-by-step solu­tion

Step 1. f(1)=bf(1) = b and f(3)=bf(3) = b. Two dif­fer­ent inputs give the same out­put, so ff is not one-one.

Step 2. (Also, cc is never an out­put, so ff is not onto either.)

Step 3. Since ff is not a bijec­tion, it is not invert­ible. An inverse would not know whether to send bb back to 11 or to 33.

Check­ing the answer

Range ={a,b}≠{a,b,c}= \{a, b\} \ne \{a, b, c\}, which con­firms it is not onto.

Answer

No. f(1)=f(3)=bf(1) = f(3) = b, so ff is not one-one (and not onto), hence not a bijec­tion.

Ques­tion 6: A self-inverse bijec­tion on N\mathbf{N}

The prob­lem

Show that f:N→Nf : \mathbf{N} \to \mathbf{N}, with f(n)=n+1f(n) = n + 1 for odd nn and f(n)=n−1f(n) = n - 1 for even nn, is a bijec­tion and is its own inverse.

Under­stand­ing the prob­lem

List a few val­ues: f(1)=2f(1) = 2, f(2)=1f(2) = 1, f(3)=4f(3) = 4, f(4)=3f(4) = 3, … . The func­tion swaps each odd num­ber with the next even num­ber.

The idea

Show f(f(n))=nf(f(n)) = n for every nn. Then ff has an inverse (itself), and a func­tion with an inverse is a bijec­tion.

Step-by-step solu­tion

Step 1. Let nn be odd. Then f(n)=n+1f(n) = n + 1, which is even, so

f(f(n))=(n+1)−1=nf(f(n)) = (n + 1) - 1 = n

Step 2. Let nn be even. Then f(n)=n−1f(n) = n - 1, which is odd (and at least 11, since n≥2n \ge 2), so

f(f(n))=(n−1)+1=nf(f(n)) = (n - 1) + 1 = n

Step 3. So f∘f=INf \circ f = I_{\mathbf{N}}. This says ff is an inverse of itself: f−1=ff^{-1} = f.

Step 4. A func­tion is invert­ible exactly when it is a bijec­tion, so ff is a bijec­tion.

Check­ing the answer

Direct check: one-one, since if f(m)=f(n)f(m) = f(n) then m=f(f(m))=f(f(n))=nm = f(f(m)) = f(f(n)) = n. Onto, since any kk equals f(f(k))f(f(k)), the image of f(k)f(k).

Answer

f(f(n))=nf(f(n)) = n for all nn, so ff is a bijec­tion with f−1=ff^{-1} = f.

Ques­tion 7: An equiv­a­lence rela­tion on Z\mathbf{Z}

The prob­lem

On Z\mathbf{Z}, a R b  ⟺  a+ba \, R \, b \iff a + b is even. Is RR an equiv­a­lence rela­tion? What are its classes?

Under­stand­ing the prob­lem

An equiv­a­lence rela­tion must be reflex­ive (a R aa \, R \, a), sym­met­ric (a R b⇒b R aa \, R \, b \Rightarrow b \, R \, a) and tran­si­tive (a R ba \, R \, b and b R c⇒a R cb \, R \, c \Rightarrow a \, R \, c). An equiv­a­lence class is the set of all ele­ments related to a given one.

The idea

Check the three prop­er­ties one by one using facts about even num­bers.

Step-by-step solu­tion

Step 1. Reflex­ive: a+a=2aa + a = 2a is even. So a R aa \, R \, a for every aa.

Step 2. Sym­met­ric: if a+ba + b is even, then b+ab + a is the same num­ber, so it is even. So b R ab \, R \, a.

Step 3. Tran­si­tive: sup­pose a+ba + b and b+cb + c are both even. Then

a+c=(a+b)+(b+c)−2ba + c = (a + b) + (b + c) - 2b

is a sum and dif­fer­ence of even num­bers, so it is even. Hence a R ca \, R \, c.

Step 4. Classes: a+ba + b is even exactly when aa and bb are both even or both odd. So there are two classes: all even inte­gers, and all odd inte­gers.

Check­ing the answer

3 R 73 \, R \, 7 (1010 is even) and 33 is not related to 44 (77 is odd). Con­sis­tent with the two classes.

Answer

Yes, RR is an equiv­a­lence rela­tion. Its classes are the even inte­gers {…,−2,0,2,… }\{\dots, -2, 0, 2, \dots\} and the odd inte­gers {…,−1,1,3,… }\{\dots, -1, 1, 3, \dots\}.

Ques­tion 8: An equiv­a­lence rela­tion on pairs

The prob­lem

On A=N×NA = \mathbf{N} \times \mathbf{N}, (a,b) R (c,d)  ⟺  a+d=b+c(a, b) \, R \, (c, d) \iff a + d = b + c. Show RR is an equiv­a­lence rela­tion.

Under­stand­ing the prob­lem

The ele­ments are ordered pairs of nat­ural num­bers. We must prove reflex­ive, sym­met­ric and tran­si­tive prop­er­ties for all pairs.

The idea

Each prop­erty reduces to a sim­ple equa­tion between nat­ural num­bers. For tran­si­tiv­ity, add two equa­tions and can­cel.

Step-by-step solu­tion

Step 1. Reflex­ive: for any (a,b)(a, b), is (a,b) R (a,b)(a, b) \, R \, (a, b)? We need a+b=b+aa + b = b + a, which is true.

Step 2. Sym­met­ric: sup­pose (a,b) R (c,d)(a, b) \, R \, (c, d), so a+d=b+ca + d = b + c. We need (c,d) R (a,b)(c, d) \, R \, (a, b), that is c+b=d+ac + b = d + a. This is the same equa­tion read from right to left, so it holds.

Step 3. Tran­si­tive: sup­pose (a,b) R (c,d)(a, b) \, R \, (c, d) and (c,d) R (e,f)(c, d) \, R \, (e, f).

a+d=b+c(1),c+f=d+e(2)a + d = b + c \quad (1), \qquad c + f = d + e \quad (2)

Add (1) and (2):

a+d+c+f=b+c+d+ea + d + c + f = b + c + d + e

Can­cel c+dc + d from both sides:

a+f=b+ea + f = b + e

This says (a,b) R (e,f)(a, b) \, R \, (e, f).

Check­ing the answer

(3,1) R (5,3)(3, 1) \, R \, (5, 3) since 3+3=1+53 + 3 = 1 + 5; and (5,3) R (4,2)(5, 3) \, R \, (4, 2) since 5+2=3+45 + 2 = 3 + 4; tran­si­tiv­ity pre­dicts (3,1) R (4,2)(3, 1) \, R \, (4, 2): 3+2=1+43 + 2 = 1 + 4. True.

Answer

RR is reflex­ive, sym­met­ric and tran­si­tive, so it is an equiv­a­lence rela­tion.

Ques­tion 9: Test­ing three prop­er­ties

The prob­lem

Is R={(a,b):b=a+1}R = \{(a, b) : b = a + 1\} on {1,2,3,4}\{1, 2, 3, 4\} reflex­ive, sym­met­ric, tran­si­tive?

Under­stand­ing the prob­lem

First list RR. Both entries must be in {1,2,3,4}\{1, 2, 3, 4\}.

The idea

To show a prop­erty fails, one coun­terex­am­ple is enough.

Step-by-step solu­tion

Step 1. List RR.

R={(1,2),(2,3),(3,4)}R = \{(1, 2), (2, 3), (3, 4)\}

Step 2. Reflex­ive? We would need (1,1)∈R(1, 1) \in R, but 1≠1+11 \ne 1 + 1. Not reflex­ive.

Step 3. Sym­met­ric? (1,2)∈R(1, 2) \in R but (2,1)∉R(2, 1) \notin R. Not sym­met­ric.

Step 4. Tran­si­tive? (1,2)∈R(1, 2) \in R and (2,3)∈R(2, 3) \in R, but (1,3)∉R(1, 3) \notin R. Not tran­si­tive.

Check­ing the answer

In fact no pair (a,a)(a, a) is in RR and no reversed pair is in RR, so the fail­ures are not just one-off.

Answer

None of the three: RR is not reflex­ive, not sym­met­ric and not tran­si­tive.

Ques­tion 10: Ver­i­fy­ing an inverse

The prob­lem

Let f(x)=3x+2f(x) = 3x + 2 and g(x)=x−23\displaystyle g(x) = \frac{x - 2}{3}. Ver­ify g=f−1g = f^{-1} by com­put­ing both com­pos­ites.

Under­stand­ing the prob­lem

gg is the inverse of ff exactly when g∘fg \circ f and f∘gf \circ g are both the iden­tity, that is, both give back xx.

The idea

Com­pute g(f(x))g(f(x)) and f(g(x))f(g(x)).

Step-by-step solu­tion

Step 1. g∘fg \circ f:

g(f(x))=g(3x+2)=(3x+2)−23=3x3=x\displaystyle g(f(x)) = g(3x + 2) = \frac{(3x + 2) - 2}{3} = \frac{3x}{3} = x

Step 2. f∘gf \circ g:

f(g(x))=3⋅x−23+2=(x−2)+2=x\displaystyle f(g(x)) = 3\cdot\frac{x - 2}{3} + 2 = (x - 2) + 2 = x

Step 3. Both com­pos­ites are the iden­tity, so g=f−1g = f^{-1}.

Check­ing the answer

f(1)=5f(1) = 5 and g(5)=33=1\displaystyle g(5) = \frac{3}{3} = 1.

Answer

g(f(x))=xg(f(x)) = x and f(g(x))=xf(g(x)) = x, so g=f−1g = f^{-1}.