698 words
3 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Mathematics I · Week 5 — Composition, inverse, and exponentials Deep study for Quiz 2 week 5. Master composition order first, then invertibility, then exponential growth rules.

Mathematics I · Week 5 — Composition, inverse, and exponentials

Deep study for Quiz 2 week 5. Master composition order first, then invertibility, then exponential growth rules.

Week map

Vertical/horizontal line tests → composition (f∘g)(f \circ g) → inverse f−1f^{-1} → exponential axa^x → domain discipline throughout.

Composition notation

  • (f∘g)(x)(f \circ g)(x) → “ff composed with gg at xx” → apply gg first, then ff → (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)).
  • f(g(x))f(g(x)) → inner function output becomes outer input → parentheses matter when substituting.
  • Domain of composition → all xx where g(x)g(x) is in domain of ff.
Mini-example: f(x)=2x+1f(x) = 2x + 1, g(x)=x2g(x) = x^2. Then (f∘g)(3)=f(g(3))=f(9)=19(f \circ g)(3) = f(g(3)) = f(9) = 19. But (g∘f)(3)=g(f(3))=g(7)=49(g \circ f)(3) = g(f(3)) = g(7) = 49 — order changes the answer.

Vertical and horizontal line tests

  • Vertical line test: graph is a function iff no vertical line hits twice.
  • Horizontal line test: function is injective (one-to-one) iff no horizontal line hits twice — needed for invertible function on its domain.

Inverse notation

  • f−1(y)f^{-1}(y) → input that ff sends to yy → not the same as 1/f(x)1/f(x).
  • Inverse swaps roles: if f(a)=bf(a) = b then f−1(b)=af^{-1}(b) = a.
  • Domain of f−1f^{-1} = range of ff; range of f−1f^{-1} = domain of ff.
  • Graph of f−1f^{-1} reflects graph of ff over line y=xy = x.
Mini-example: f(x)=3x−2f(x) = 3x - 2 on R\mathbb{R}. Swap: x=3y−2x = 3y - 2, solve y=x+23y = \frac{x+2}{3}. So f−1(x)=x+23f^{-1}(x) = \frac{x+2}{3}. Check: f−1(5)=7/3f^{-1}(5) = 7/3 and f(7/3)=5f(7/3) = 5.

Exponential notation

  • y=axy = a^x → exponential with base aa → a>0a > 0, a≠1a \neq 1.
  • a0=1a^0 = 1 for any valid base; am+n=am⋅ana^{m+n} = a^m \cdot a^n; (am)n=amn(a^m)^n = a^{mn}.
  • ax>0a^x > 0 always — range is (0,∞)(0, \infty).
Mini-example: 23=82^3 = 8; 2−1=1/22^{-1} = 1/2; (1/2)2=1/4(1/2)^2 = 1/4. Base between 0 and 1 gives decay; base >1> 1 gives growth.
Trap: xax^a (power function) vs axa^x (exponential) — variable position differs.

Pattern families

Easy — Evaluate composition

Substitute entire inner expression into outer. Simplify stepwise. Watch signs when replacing xx inside ff.

Medium — Find inverse of linear or simple rational

Swap xx and yy, solve for yy. State domain of inverse explicitly. Verify f(f−1(x))=xf(f^{-1}(x)) = x on valid domain.

Hard — Invertibility and restricted domains

Use horizontal line test or monotonicity. Square root and squaring need domain restriction (x≥0x \geq 0) for bijection. Composition with inverse simplifies to identity only on matched domains.

Worked mini-examples

Example 1 — Composition order.
f(x)=x+4f(x) = x + 4, g(x)=2xg(x) = 2x. (f∘g)(5)=f(10)=14(f \circ g)(5) = f(10) = 14. (g∘f)(5)=g(9)=18(g \circ f)(5) = g(9) = 18.
Example 2 — Nested formula.
f(x)=x2+1f(x) = x^2 + 1, g(x)=x−3g(x) = x - 3. (f∘g)(x)=(x−3)2+1=x2−6x+10(f \circ g)(x) = (x-3)^2 + 1 = x^2 - 6x + 10.
Example 3 — Inverse of linear.
f(x)=x−12f(x) = \frac{x-1}{2}. Swap: x=y−12x = \frac{y-1}{2} → 2x=y−12x = y - 1 → f−1(x)=2x+1f^{-1}(x) = 2x + 1.
Example 4 — Exponential evaluation.
32=93^{2} = 9; 3−2=1/93^{-2} = 1/9; 31/2=33^{1/2} = \sqrt{3}.
Example 5 — Not invertible without restriction.
f(x)=x2f(x) = x^2 on all R\mathbb{R} fails horizontal line test (f(2)=f(−2)=4f(2) = f(-2) = 4). Restrict to x≥0x \geq 0 to define inverse f−1(x)=xf^{-1}(x) = \sqrt{x}.

Traps

  • Writing (f∘g)(x)(f \circ g)(x) as f(x)⋅g(x)f(x) \cdot g(x).
  • Treating f−1f^{-1} as 1/f(x)1/f(x).
  • Taking domain of f−1f^{-1} equal to domain of ff.
  • Applying outer function before inner in composition.
  • Confusing exponential base with exponent: 2x2^x vs x2x^2.

Diagnostic (try yourself)

  1. If f(x)=3x−1f(x) = 3x - 1 and g(x)=x2g(x) = x^2, find (g∘f)(2)(g \circ f)(2) and (f∘g)(2)(f \circ g)(2).
  2. Find f−1(x)f^{-1}(x) for f(x)=5x+4f(x) = 5x + 4. What is the domain of f−1f^{-1} if domain of ff is R\mathbb{R}?
  3. Is f(x)=∣x∣f(x) = |x| injective on R\mathbb{R}? What restriction makes it bijective from R\mathbb{R} to [0,∞)[0,\infty)?
  4. Simplify (f∘g)(x)(f \circ g)(x) when f(x)=xf(x) = \sqrt{x} and g(x)=x+5g(x) = x + 5. State the domain of the composition.
  5. Evaluate 232^{3} and 323^{2}. Which is larger? What is 2−32^{-3}?
Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.