Why this mat­ters

Do one func­tion, then another, and you get a com­pos­ite func­tion. Undo a func­tion and you get its inverse, but only bijec­tions can be undone. Here we prac­tise putting func­tions together, find­ing inverses, and then fin­ish the chap­ter with a mixed set of ques­tions.

Com­po­si­tion

For f:A→Bf : A \to B and g:B→Cg : B \to C, the com­pos­ite g∘f:A→Cg \circ f : A \to C is (g∘f)(x)=g(f(x))(g \circ f)(x) = g(f(x)). Read it from the inside out: apply ff first.

Exam­ple 1. f(x)=2x+1f(x) = 2x + 1, g(x)=x2g(x) = x^2: (g∘f)(x)=(2x+1)2(g \circ f)(x) = (2x + 1)^2 and (f∘g)(x)=2x2+1(f \circ g)(x) = 2x^2 + 1. The two orders give dif­fer­ent answers, so com­po­si­tion is not com­mu­ta­tive.

Exam­ple 2. f(x)=∣x∣f(x) = \lvert x \rvert, g(x)=∣3x−2∣g(x) = \lvert 3x - 2 \rvert: (g∘f)(x)=∣3∣x∣−2∣(g \circ f)(x) = \lvert 3\lvert x \rvert - 2 \rvert; (f∘g)(x)=∣3x−2∣(f \circ g)(x) = \lvert 3x - 2 \rvert.

Com­po­si­tion is, how­ever, asso­cia­tive: h∘(g∘f)=(h∘g)∘fh \circ (g \circ f) = (h \circ g) \circ f. And if ff and gg are both one-one (or both onto), then g∘fg \circ f is too.

Inverse func­tions

f:X→Yf : X \to Y is invert­ible if there is g:Y→Xg : Y \to X with g∘f=IXg \circ f = I_X and f∘g=IYf \circ g = I_Y; then we write g=f−1g = f^{-1}. Keep this fact in mind: a func­tion is invert­ible exactly when it is a bijec­tion.

Find­ing the inverse. Write y=f(x)y = f(x) and solve for xx in terms of yy. Then check that your for­mula really lands inside the domain.

Exam­ple 3. f:R→Rf : \mathbf{R} \to \mathbf{R}, f(x)=4x−7f(x) = 4x - 7. Solv­ing gives x=y+74\displaystyle x = \tfrac{y + 7}{4}, so f−1(y)=y+74\displaystyle f^{-1}(y) = \tfrac{y + 7}{4}.

Exam­ple 4. f:[0,∞)→[5,∞)f : [0, \infty) \to [5, \infty), f(x)=x2+5f(x) = x^2 + 5. On these par­tic­u­lar sets it is bijec­tive, and f−1(y)=y−5f^{-1}(y) = \sqrt{y - 5}.

The half-parabola y = x squared + 5 for x at least 0, starting at (0, 5), and its inverse y = root (x - 5) for x at least 5, starting at (5, 0), mirror images in the dashed line y = x.
A func­tion and its inverse are reflec­tions of each other in the line y = x.

Exam­ple 5. f:R−{−13}→R−{23}\displaystyle f : \mathbf{R} - \{-\tfrac{1}{3}\} \to \mathbf{R} - \{\tfrac{2}{3}\}, f(x)=2x−13x+1\displaystyle f(x) = \tfrac{2x - 1}{3x + 1}. Here y(3x+1)=2x−1y(3x + 1) = 2x - 1 gives x=1+y2−3y\displaystyle x = \tfrac{1 + y}{2 - 3y}.

Exam­ple 6. If ff and gg are invert­ible, (g∘f)−1=f−1∘g−1(g \circ f)^{-1} = f^{-1} \circ g^{-1}. It is like tak­ing off socks and shoes: you undo the last step first.

Mixed prac­tice for the chap­ter

  1. 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.
  2. f(x)=x+3f(x) = x + 3, g(x)=x2−2g(x) = x^2 - 2. Find f∘gf \circ g, g∘fg \circ f, f∘ff \circ f.
  3. f(x)=3x+25x−3\displaystyle f(x) = \tfrac{3x + 2}{5x - 3}, x≠35\displaystyle x \ne \tfrac{3}{5}. Show that f∘f(x)=xf \circ f(x) = x. What does that tell you about f−1f^{-1}?
  4. Find the inverse of each: f(x)=6−5xf(x) = 6 - 5x; f(x)=x−13f(x) = \sqrt[3]{x - 1}; f(x)=xx+2\displaystyle f(x) = \tfrac{x}{x + 2} on R−{−2}\mathbf{R} - \{-2\}.
  5. 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? Give a rea­son.
  6. Show that f:N→Nf : \mathbf{N} \to \mathbf{N}, f(n)=n+1f(n) = n + 1 for odd nn and n−1n - 1 for even nn, is a bijec­tion and is its own inverse.
  7. On Z\mathbf{Z}, a R b  ⟺  a+ba \, R \, b \iff a + b is even. Is RR an equiv­a­lence rela­tion? If so, what are its classes?
  8. 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.
  9. 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?
  10. Let f(x)=3x+2f(x) = 3x + 2 and g(x)=x−23\displaystyle g(x) = \tfrac{x - 2}{3}. Ver­ify g=f−1g = f^{-1} by work­ing out both com­pos­ites.

Answers

Show answers
  1. {(1,4),(2,6),(3,2)}\{(1, 4), (2, 6), (3, 2)\}.
  2. x2+1x^2 + 1; x2+6x+7x^2 + 6x + 7; x+6x + 6.
  3. Sub­sti­tute and sim­plify: the numer­a­tor becomes 19x5x−3\displaystyle \tfrac{19x}{5x - 3}, and the denom­i­na­tor 195x−3\displaystyle \tfrac{19}{5x - 3}. So f−1=ff^{-1} = f.
  4. 6−y5\displaystyle \tfrac{6 - y}{5}; y3+1y^3 + 1; 2y1−y\displaystyle \tfrac{2y}{1 - y}, y≠1y \ne 1.
  5. No: it is not one-one, since 11 and 33 both go to bb.
  6. It swaps 1↔21 \leftrightarrow 2, 3↔43 \leftrightarrow 4, …; apply­ing it twice brings you back to nn.
  7. Yes. a+aa + a is even; it is clearly sym­met­ric; and if a+ba + b and b+cb + c even then a+c=(a+b)+(b+c)−2ba + c = (a + b) + (b + c) - 2b is even. The classes are the evens and the odds.
  8. It is reflex­ive, since a+b=b+aa + b = b + a. It is sym­met­ric, just by rear­rang­ing. For tran­si­tiv­ity, add a+d=b+ca + d = b + c and c+f=d+ec + f = d + e to get a+f=b+ea + f = b + e.
  9. It has none of the three prop­er­ties.
  10. You get g(f(x))=xg(f(x)) = x and f(g(x))=xf(g(x)) = x.