Quiz 2
Registry Synced

Composite and Inverse Functions

1722 words
9 min read

Reading compass

Now · 🎯 Learning Objectives

Composite and Inverse Functions

🎯 Learning Objectives

By the end of this topic, you will be able to:
  1. Compute the composition fgf \circ g of two functions
  2. Determine the domain of composite functions
  3. Test whether a function has an inverse using the horizontal line test
  4. Find the inverse of a function algebraically
  5. Verify inverse relationships using f(f1(x))=f1(f(x))=xf(f^{-1}(x)) = f^{-1}(f(x)) = x

📋 Prerequisites


📖 Core Content

7.1 Composite Functions

7.1.1 Intuition: Function Chains

A composite function is applying one function, then another. Like a factory assembly line: raw material goes through machine gg, then its output goes through machine ff. If gg doubles a number and ff squares it, then f(g(x))f(g(x)) means: first double, then square. g(f(x))g(f(x)) means: first square, then double — a different result!
💡 Why this matters: Composition is how we build complex transformations from simple ones. In ML, a neural network is a composition of linear transformations and activation functions.

7.1.2 Definition

The composition of ff with gg is:
(fg)(x)=f(g(x))(f \circ g)(x) = f(g(x))
Domain: {xxdomain(g) AND g(x)domain(f)}\{x \mid x \in \text{domain}(g) \text{ AND } g(x) \in \text{domain}(f)\} Key: Apply gg first, then ff to the result. (Diagram)

7.1.3 Worked Examples

Example 1.1 (Easy): Let f(x)=x2f(x) = x^2 and g(x)=x+3g(x) = x + 3. Find (fg)(2)(f \circ g)(2) and (gf)(2)(g \circ f)(2). Step 1: (fg)(2)=f(g(2))=f(5)=25(f \circ g)(2) = f(g(2)) = f(5) = 25 Step 2: (gf)(2)=g(f(2))=g(4)=7(g \circ f)(2) = g(f(2)) = g(4) = 7
(fg)(2)=25, (gf)(2)=7\boxed{(f \circ g)(2) = 25,\ (g \circ f)(2) = 7}
Example 1.2 (Medium): For f(x)=xf(x) = \sqrt{x} and g(x)=2x1g(x) = 2x - 1, find (fg)(x)(f \circ g)(x) and its domain. Step 1: (fg)(x)=f(g(x))=f(2x1)=2x1(f \circ g)(x) = f(g(x)) = f(2x - 1) = \sqrt{2x - 1} Step 2 — Domain: Need 2x10    x1/22x - 1 \geq 0 \implies x \geq 1/2 Also 2x12x - 1 must be in domain of f=[0,)f = [0, \infty).
(fg)(x)=2x1, domain [1/2,)\boxed{(f \circ g)(x) = \sqrt{2x - 1},\ \text{domain } [1/2, \infty)}
Example 1.3 (Hard): Given f(x)=1x1f(x) = \frac{1}{x-1} and g(x)=x+1xg(x) = \frac{x+1}{x}, find (fg)(x)(f \circ g)(x) and its domain. Step 1: (fg)(x)=f(x+1x)=1x+1x1=1x+1xx=11x=x(f \circ g)(x) = f\left(\frac{x+1}{x}\right) = \frac{1}{\frac{x+1}{x} - 1} = \frac{1}{\frac{x+1 - x}{x}} = \frac{1}{\frac{1}{x}} = x Step 2 — Domain: gg is undefined at x=0x = 0. g(x)=1g(x) = 1 would make denominator 00 in ff; solve x+1x=1    x+1=x    1=0\frac{x+1}{x} = 1 \implies x+1 = x \implies 1 = 0 (impossible, so no extra restriction).
(fg)(x)=x, domain x0\boxed{(f \circ g)(x) = x,\ \text{domain } x \neq 0}

7.2 Inverse Functions

7.2.1 Intuition: Undoing a Function

An inverse function f1f^{-1} "undoes" what ff did. If ff is the "double" function (f(x)=2xf(x) = 2x), then f1f^{-1} is the "half" function (f1(x)=x/2f^{-1}(x) = x/2). The inverse reverses the mapping: if f(a)=bf(a) = b, then f1(b)=af^{-1}(b) = a.
💡 Why this matters: Inverses let us solve equations. If y=f(x)y = f(x) and we want xx in terms of yy, we use x=f1(y)x = f^{-1}(y). Logarithms are inverses of exponentials — used everywhere in data science.

7.2.2 Condition for Existence

A function has an inverse iff it is bijective (both injective and surjective). For functions with codomain = range, surjectivity is automatic if we set codomain = range. So the key condition is injective (one-to-one). Horizontal Line Test: If every horizontal line hits the graph at most once, the function is injective and has an inverse.
FunctionHLT Pass?Has Inverse?
f(x)=2x+3f(x) = 2x + 3Yes
f(x)=x2f(x) = x^2 (on R\mathbb{R} )No
f(x)=x2f(x) = x^2 (on [0,)[0,\infty) )Yes ( x\sqrt{x} )
f(x)=exf(x) = e^xYes ( lnx\ln x )

7.2.3 Finding the Inverse Algebraically

Recipe:
  1. Write y=f(x)y = f(x)
  2. Swap xx and yy
  3. Solve for yy
  4. The result is y=f1(x)y = f^{-1}(x)
  5. Verify: f(f1(x))=f1(f(x))=xf(f^{-1}(x)) = f^{-1}(f(x)) = x

7.2.4 Worked Examples

Example 2.1 (Easy): Find the inverse of f(x)=3x5f(x) = 3x - 5. Step 1: y=3x5y = 3x - 5 Step 2: Swap: x=3y5x = 3y - 5 Step 3: Solve: x+5=3y    y=x+53x + 5 = 3y \implies y = \frac{x+5}{3} Step 4: f1(x)=x+53f^{-1}(x) = \frac{x+5}{3} Verify: f(f1(x))=3(x+53)5=x+55=xf(f^{-1}(x)) = 3\left(\frac{x+5}{3}\right) - 5 = x + 5 - 5 = x
f1(x)=x+53\boxed{f^{-1}(x) = \frac{x+5}{3}}
Example 2.2 (Medium): Find the inverse of f(x)=2x+1x1f(x) = \frac{2x+1}{x-1}. Step 1: y=2x+1x1y = \frac{2x+1}{x-1} Step 2: Swap: x=2y+1y1x = \frac{2y+1}{y-1} Step 3: Solve: x(y1)=2y+1    xyx=2y+1    xy2y=x+1    y(x2)=x+1    y=x+1x2x(y-1) = 2y+1 \implies xy - x = 2y + 1 \implies xy - 2y = x + 1 \implies y(x-2) = x+1 \implies y = \frac{x+1}{x-2} Step 4: f1(x)=x+1x2f^{-1}(x) = \frac{x+1}{x-2}
f1(x)=x+1x2\boxed{f^{-1}(x) = \frac{x+1}{x-2}}
Example 2.3 (Hard): Find the inverse of f(x)=2x3f(x) = \sqrt{2x - 3}. Step 1: y=2x3y = \sqrt{2x - 3} (domain x3/2x \geq 3/2, range y0y \geq 0) Step 2: Swap: x=2y3x = \sqrt{2y - 3} Step 3: Square: x2=2y3    y=x2+32x^2 = 2y - 3 \implies y = \frac{x^2 + 3}{2} Step 4: Domain of f1f^{-1} = range of f=[0,)f = [0, \infty) So f1(x)=x2+32f^{-1}(x) = \frac{x^2 + 3}{2} for x0x \geq 0. Verify: f(f1(x))=2x2+323=x2=xf(f^{-1}(x)) = \sqrt{2 \cdot \frac{x^2+3}{2} - 3} = \sqrt{x^2} = x for x0x \geq 0
f1(x)=x2+32, x0\boxed{f^{-1}(x) = \frac{x^2 + 3}{2},\ x \geq 0}

7.3 Domain and Range of Inverse

Key relationship:
  • Domain of f1f^{-1} = Range of ff
  • Range of f1f^{-1} = Domain of ff (Diagram)

📐 Key Formulas — Summary Table

ConceptFormulaNotes
Composition(fg)(x)=f(g(x))(f \circ g)(x) = f(g(x))Apply gg first
Composition domain{xDgg(x)Df}\{x \in D_g \mid g(x) \in D_f\}Careful with restrictions
Inverse definitionf(f1(x))=f1(f(x))=xf(f^{-1}(x)) = f^{-1}(f(x)) = x
Inverse existenceff must be bijectiveInjective necessary
Finding inverseSwap x,yx,y , solve for yyAlgebraic method
Inverse domainDf1=RfD_{f^{-1}} = R_f
Inverse rangeRf1=DfR_{f^{-1}} = D_f
Graph of inverseReflection across y=xy = xSymmetry property

⚠️ Common Pitfalls

Pitfall 1: Confusing f1f^{-1} with (f(x))1=1/f(x)(f(x))^{-1} = 1/f(x)

Mistake: Thinking f1(x)=1f(x)f^{-1}(x) = \frac{1}{f(x)}. Correct: f1f^{-1} is the inverse function (undoes ff). (f(x))1=1/f(x)(f(x))^{-1} = 1/f(x) is the reciprocal. These are completely different! Example: f(x)=2xf(x) = 2xf1(x)=x/2f^{-1}(x) = x/2, not 1/(2x)1/(2x).

Pitfall 2: Composition Order

Mistake: Computing (fg)(x)(f \circ g)(x) as g(f(x))g(f(x)). Correct: (fg)(x)=f(g(x))(f \circ g)(x) = f(g(x)) — apply gg first, then ff. The notation fgf \circ g means "ff after gg."

Pitfall 3: Forgetting Domain Restrictions for Inverses

Mistake: Finding f1(x)=xf^{-1}(x) = \sqrt{x} for f(x)=x2f(x) = x^2 without restricting domain. Correct: f(x)=x2f(x) = x^2 on R\mathbb{R} has no inverse (fails HLT). On [0,)[0, \infty), its inverse is x\sqrt{x}. On (,0](-\infty, 0], its inverse is x-\sqrt{x}.

Pitfall 4: Swapping xx and yy Before Considering Domain

Mistake: Finding an algebraic expression for f1f^{-1} but ignoring domain restrictions. Correct: After solving, check the domain of f1f^{-1} = range of original ff.

📝 Practice Questions

Q1: If f(x)=x+2f(x) = x + 2 and g(x)=x2g(x) = x^2, find (fg)(3)(f \circ g)(3) and (gf)(3)(g \circ f)(3).
Strategy Hint: Apply inner function first.
(fg)(3)=f(9)=11(f \circ g)(3) = f(9) = 11 (gf)(3)=g(5)=25(g \circ f)(3) = g(5) = 25
11, 25\boxed{11,\ 25} Q2: Find (fg)(x)(f \circ g)(x) for f(x)=1xf(x) = \frac{1}{x} and g(x)=x1g(x) = x-1.
(fg)(x)=1x1(f \circ g)(x) = \frac{1}{x-1}
1x1\boxed{\frac{1}{x-1}} Q3: Find the inverse of f(x)=4x+7f(x) = 4x + 7.
y=4x+7x=4y+7y=x74y = 4x + 7 \to x = 4y + 7 \to y = \frac{x-7}{4}
f1(x)=x74\boxed{f^{-1}(x) = \frac{x-7}{4}} Q4: Does f(x)=x2+1f(x) = x^2 + 1 on R\mathbb{R} have an inverse? Why or why not?
Strategy Hint: Check HLT.
f(2)=5=f(2)f(-2) = 5 = f(2) → not injective → no inverse.
No — fails HLT\boxed{\text{No — fails HLT}} Q5: Find the inverse of f(x)=x2x+3f(x) = \frac{x-2}{x+3}.
y=x2x+3y = \frac{x-2}{x+3} Swap: x=y2y+3x(y+3)=y2xy+3x=y2xyy=3x2y(x1)=(3x+2)y=3x+21xx = \frac{y-2}{y+3} \to x(y+3) = y-2 \to xy + 3x = y - 2 \to xy - y = -3x - 2 \to y(x-1) = -(3x+2) \to y = \frac{3x+2}{1-x}
f1(x)=3x+21x\boxed{f^{-1}(x) = \frac{3x+2}{1-x}} Q6: If f(x)=2xf(x) = 2x and g(x)=3x1g(x) = 3x - 1, find (fg)(x)(f \circ g)(x).
(fg)(x)=f(3x1)=2(3x1)=6x2(f \circ g)(x) = f(3x-1) = 2(3x-1) = 6x - 2
6x2\boxed{6x - 2} Q7: Verify that f(x)=xx1f(x) = \frac{x}{x-1} and g(x)=xx1g(x) = \frac{x}{x-1} are inverses.
Strategy Hint: Check f(g(x))=xf(g(x)) = x.
f(g(x))=xx1xx11=xx1x(x1)x1=xx11x1=xf(g(x)) = \frac{\frac{x}{x-1}}{\frac{x}{x-1} - 1} = \frac{\frac{x}{x-1}}{\frac{x - (x-1)}{x-1}} = \frac{\frac{x}{x-1}}{\frac{1}{x-1}} = x
Yes, they are inverses\boxed{\text{Yes, they are inverses}} Q8: What is the domain of (fg)(x)(f \circ g)(x) if f(x)=xf(x) = \sqrt{x} and g(x)=x5g(x) = x-5?
g(x)=x5g(x) = x-5 has domain all reals. But ff requires non-negative input. So need x50x5x-5 \geq 0 \to x \geq 5.
[5,)\boxed{[5, \infty)} Q9: Find the inverse of f(x)=ex+2f(x) = e^{x+2}.
y=ex+2y = e^{x+2} Swap: x=ey+2x = e^{y+2} Take ln\ln: lnx=y+2y=lnx2\ln x = y + 2 \to y = \ln x - 2
f1(x)=lnx2\boxed{f^{-1}(x) = \ln x - 2} Q10: If ff and gg are inverses, what is f(g(5))f(g(5))?
By definition of inverse: f(g(x))=xf(g(x)) = x, so f(g(5))=5f(g(5)) = 5.
5\boxed{5} Q11: Find the inverse of f(x)=x31f(x) = x^3 - 1.
y=x31y = x^3 - 1 Swap: x=y31y3=x+1y=x+13x = y^3 - 1 \to y^3 = x + 1 \to y = \sqrt[3]{x+1}
f1(x)=x+13\boxed{f^{-1}(x) = \sqrt[3]{x+1}} Q12: For f(x)=1xf(x) = \frac{1}{x}, find f1(x)f^{-1}(x). What do you notice?
y=1/xy = 1/x, swap: x=1/yy=1/xx = 1/y \to y = 1/x f1(x)=1/x=f(x)f^{-1}(x) = 1/x = f(x) — the function is self-inverse (involution).
f1(x)=1x=f(x)\boxed{f^{-1}(x) = \frac{1}{x} = f(x)}

🔗 Cross-References

Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.