Graphical Representation and Transformations

When we graph y=f(x)y = f(x), we plot all points (x,f(x))(x, f(x)) on the Cartesian plane as xx ranges over the domain. The x-intercepts are where f(x)=0f(x) = 0 (the roots), and the y-intercept is f(0)f(0) (provided 00 is in the domain).

Transformations

Every transformation of f(x)f(x) has a precise graphical effect. The following are confusing surprisingly systematic once you see the pattern.

Vertical shifts: For k>0k > 0,

  • y=f(x)+ky = f(x) + k: shift up by kk
  • y=f(x)−ky = f(x) - k: shift down by kk

Horizontal shifts: For k>0k > 0,

  • y=f(x−k)y = f(x - k): shift right by kk
  • y=f(x+k)y = f(x + k): shift left by kk

Warning: The direction of horizontal shifts is counterintuitive. f(x+2)f(x + 2) shifts left by 22, not right. To see why: the output that used to occur at x=5x = 5 now occurs when x+2=5x + 2 = 5, i.e., at x=3x = 3 which is two units to the left.

Reflections:

  • y=−f(x)y = -f(x): reflect over the x-axis (flip vertically)
  • y=f(−x)y = f(-x): reflect over the y-axis (flip horizontally)

Scalings: For k>0k > 0,

  • y=kf(x)y = kf(x): vertical stretch by kk (if k>1k > 1) or compression (if 0<k<10 < k < 1)
  • y=f(kx)y = f(kx): horizontal compression by factor kk (if k>1k > 1) or stretch (if 0<k<10 < k < 1)

Warning: y=f(3x)y = f(3x) compresses the graph toward the yy-axis by a factor of 33, shrinking widths by 13\tfrac{1}{3}. This might be the exact opposite of what many would expect. So understand why this happens.

Example: Describe the transformation from y=xy = \sqrt{x} to y=−2x+3+1y = -2\sqrt{x + 3} + 1.

  1. x→x+3\sqrt{x} \to \sqrt{x+3}: shift left by 33.
  2. →2x+3\to 2\sqrt{x+3}: vertical stretch by factor 22.
  3. →−2x+3\to -2\sqrt{x+3}: reflect over xx-axis.
  4. →−2x+3+1\to -2\sqrt{x+3} + 1: shift up by 11.

Vertex moves from (0,0)(0, 0) to (−3,1)(-3, 1); graph opens downward. Range: (−∞,1](-\infty, 1].

Composition of Functions

The composition (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)) means: first apply gg, then feed the output into ff. The notation f(g(x))f(g(x)) and (f∘g)(x)(f \circ g)(x) are interchangeable.

Order matters enormously. In general, f∘g≠g∘ff \circ g \neq g \circ f.

Example: Let f(x)=x2+1f(x) = x^2 + 1 and g(x)=x−2g(x) = \sqrt{x - 2}.

(f∘g)(x)=f(g(x))=(x−2)2+1=x−2+1=x−1(f \circ g)(x) = f(g(x)) = (\sqrt{x-2})^2 + 1 = x - 2 + 1 = x - 1.

(g∘f)(x)=g(f(x))=(x2+1)−2=x2−1(g \circ f)(x) = g(f(x)) = \sqrt{(x^2+1) - 2} = \sqrt{x^2 - 1}.

These are completely different functions.

Iterated Composition

We write fn(x)f^n(x) to mean ff applied nn times:

f2(x)=f(f(x)),f3(x)=f(f(f(x))),…f^2(x) = f(f(x)), \quad f^3(x) = f(f(f(x))), \quad \ldots

AIME trap: fn(x)f^n(x) in a function context means iterated composition, not [f(x)]n[f(x)]^n. Read by context.

Many AIME problems ask for f2025(x)f^{2025}(x) for some cleverly chosen ff that becomes periodic under iteration. The strategy: compute f1,f2,f3,…f^1, f^2, f^3, \ldots until you spot a cycle of length kk, then reduce 2025(modk)2025 \pmod{k}.

2001 AIME I Problem 11 (flavor)

Let f(x)=xx+1f(x) = \dfrac{x}{x+1}. Compute f2001(1)f^{2001}(1).

f(1)=12f(1) = \tfrac{1}{2}, f2(1)=f ⁣(12)=1/23/2=13f^2(1) = f\!\left(\tfrac{1}{2}\right) = \tfrac{1/2}{3/2} = \tfrac{1}{3}, f3(1)=f ⁣(13)=1/34/3=14f^3(1) = f\!\left(\tfrac{1}{3}\right) = \tfrac{1/3}{4/3} = \tfrac{1}{4}.

Pattern: fn(1)=1n+1f^n(1) = \dfrac{1}{n+1}. So f2001(1)=12002f^{2001}(1) = \dfrac{1}{2002}.

Domain of a Composite Function

The domain of f∘gf \circ g is the set of all xx in the domain of gg such that g(x)g(x) is in the domain of ff. Concretely:

  1. Find the domain of gg. Call it DgD_g.
  2. Compute f(g(x))f(g(x)) and find additional restrictions from ff's requirements.
  3. The domain of f∘gf \circ g is the intersection: {x∈Dg∣g(x)∈Df}\{x \in D_g \mid g(x) \in D_f\}.

Example: Let f(x)=xf(x) = \sqrt{x} and g(x)=1−x2g(x) = 1 - x^2. Find the domain of f∘gf \circ g.

Dg=(−∞,∞)D_g = (-\infty, \infty). For ff, we need g(x)≥0g(x) \geq 0: 1−x2≥0⇒x2≤1⇒−1≤x≤11 - x^2 \geq 0 \Rightarrow x^2 \leq 1 \Rightarrow -1 \leq x \leq 1.

Domain of f∘gf \circ g: [−1,1][-1, 1].

Inverse Functions

Definition

Functions ff and gg are inverses of each other if

g(f(x))=xfor all x∈Domain(f)g(f(x)) = x \quad \text{for all } x \in \text{Domain}(f)
f(g(x))=xfor all x∈Domain(g)f(g(x)) = x \quad \text{for all } x \in \text{Domain}(g)

We write g=f−1g = f^{-1}. Note that f−1(x)f^{-1}(x) is not 1f(x)\dfrac{1}{f(x)}; it is a completely different object, the inverse function.

Intuitively, f−1f^{-1} undoes whatever ff does: if ff takes aa to bb, then f−1f^{-1} takes bb back to aa.

f(a)=b  ⟺  f−1(b)=af(a) = b \iff f^{-1}(b) = a

When Does an Inverse Exist?

A function has an inverse if and only if it is one-to-one (injective): no two different inputs produce the same output.

If f(a)=f(b)f(a) = f(b) for some a≠ba \neq b, then f−1f^{-1} would need to send that common output to both aa and bb simultaneously... impossible.

Graphical test (Horizontal Line Test): ff has an inverse if and only if no horizontal line y=cy = c intersects the graph of ff more than once.

Compare with the vertical line test: the VLT checks if y=f(x)y = f(x) is a valid function; the HLT checks if that function has an inverse.

Example: f(x)=x2f(x) = x^2 fails the HLT (y=4y = 4 hits at x=2x = 2 and x=−2x = -2), so it has no inverse on R\mathbb{R}. However, restricting to x≥0x \geq 0 makes it one-to-one, and then f−1(x)=xf^{-1}(x) = \sqrt{x}.

Finding the Inverse

Method: To find f−1(x)f^{-1}(x), solve the equation f(y)=xf(y) = x for yy in terms of xx.

The result is y=f−1(x)y = f^{-1}(x).

Example: Find the inverse of f(x)=3x−5f(x) = 3x - 5.

Set f(y)=xf(y) = x: 3y−5=x⇒y=x+533y - 5 = x \Rightarrow y = \dfrac{x + 5}{3}.

So f−1(x)=x+53f^{-1}(x) = \dfrac{x+5}{3}. Verify: f(f−1(x))=3⋅x+53−5=xf(f^{-1}(x)) = 3 \cdot \dfrac{x+5}{3} - 5 = x. ✓

Example: Find the inverse of f(x)=−5−x3−2xf(x) = \dfrac{-5 - x}{3 - 2x}.

Set f(y)=xf(y) = x: −5−y3−2y=x⇒−5−y=x(3−2y)⇒−5−y=3x−2xy\dfrac{-5 - y}{3 - 2y} = x \Rightarrow -5 - y = x(3 - 2y) \Rightarrow -5 - y = 3x - 2xy.

Collect yy terms: 2xy−y=3x+5⇒y(2x−1)=3x+5⇒y=3x+52x−12xy - y = 3x + 5 \Rightarrow y(2x - 1) = 3x + 5 \Rightarrow y = \dfrac{3x + 5}{2x - 1}.

So f−1(x)=3x+52x−1f^{-1}(x) = \dfrac{3x+5}{2x-1}, defined for x≠12x \neq \tfrac{1}{2}.

Competition shortcut: If you only need f−1(b)f^{-1}(b) for a specific value, use the fact that f−1(b)=a  ⟺  f(a)=bf^{-1}(b) = a \iff f(a) = b. Instead of finding the full inverse, just solve f(a)=bf(a) = b for aa.

Example: If f(x)=−5−x3−2xf(x) = \dfrac{-5-x}{3-2x}, find f−1(7)f^{-1}(7).

Solve f(y)=7f(y) = 7: −5−y3−2y=7⇒−5−y=21−14y⇒13y=26⇒y=2\dfrac{-5-y}{3-2y} = 7 \Rightarrow -5 - y = 21 - 14y \Rightarrow 13y = 26 \Rightarrow y = 2.

So f−1(7)=2f^{-1}(7) = 2.

Domains and Ranges of Inverses

The domain of f−1f^{-1} is the range of ff, and the range of f−1f^{-1} is the domain of ff. This is immediate from the definition: f−1f^{-1} accepts as inputs exactly the outputs of ff.

Sometimes an inverse only exists after restricting the domain of ff. For example, f(x)=x2f(x) = x^2 on [0,∞)[0, \infty) has inverse f−1(x)=xf^{-1}(x) = \sqrt{x} on [0,∞)[0, \infty). Trying to extend either to negative territory breaks the inverse relationship:

f(−3)=9f(-3) = 9, but f−1(f(−3))=9=3≠−3f^{-1}(f(-3)) = \sqrt{9} = 3 \neq -3.

The warning: x2=∣x∣\sqrt{x^2} = |x|, not xx. When you square and then take a square root, you must account for the sign.

Graphical Relationship

If (a,b)(a, b) is on the graph of ff, then (b,a)(b, a) is on the graph of f−1f^{-1}. Swapping coordinates (a,b)→(b,a)(a,b) \to (b,a) is geometrically the same as reflecting over the line y=xy = x.

Therefore: the graph of y=f−1(x)y = f^{-1}(x) is the mirror image of the graph of y=f(x)y = f(x) over the line y=xy = x.

Why? Let P=(a,b)P = (a, b) and Q=(b,a)Q = (b, a). The slope of PQPQ is a−bb−a=−1\dfrac{a - b}{b - a} = -1, so PQ⊥PQ \perp the line y=xy = x. The midpoint of PQPQ is (a+b2,a+b2)\left(\dfrac{a+b}{2}, \dfrac{a+b}{2}\right), which lies on y=xy = x. So y=xy = x is the perpendicular bisector of PQPQ, confirming PP and QQ are reflections of each other.

Inverse of a Composition

If both ff and gg have inverses, then

(f∘g)−1=g−1∘f−1(f \circ g)^{-1} = g^{-1} \circ f^{-1}

The order reverses. Think of it like putting on socks then shoes: to undo it, you remove shoes first, then socks.

Proof: Let h=f∘gh = f \circ g and t=g−1∘f−1t = g^{-1} \circ f^{-1}. Then

h(t(x))=f(g(g−1(f−1(x))))=f(f−1(x))=xh(t(x)) = f(g(g^{-1}(f^{-1}(x)))) = f(f^{-1}(x)) = x

and similarly t(h(x))=xt(h(x)) = x. So t=h−1t = h^{-1}.

Toolkit: When to Reach for Which Technique

SituationWhat to do
Find domain of f(x)=PQf(x) = \frac{P}{Q}Solve Q=0Q = 0, exclude those xx
Find domain of f(x)=g(x)f(x) = \sqrt{g(x)}Solve g(x)≥0g(x) \geq 0
Find domain of f∘gf \circ gDomain of gg, intersected with {x:g(x)∈Dom(f)}\{x : g(x) \in \text{Dom}(f)\}
Find range of any functionSet y=f(x)y = f(x), solve for xx, find excluded yy
Check if inverse existsHorizontal line test, or check if ff is strictly monotone
Find f−1(b)f^{-1}(b) for a specific bbSolve f(a)=bf(a) = b for aa directly
Find f−1(x)f^{-1}(x) in generalSolve f(y)=xf(y) = x for yy
Identify transformationsCompare to parent form; shifts, flips, stretches
fn(x)f^n(x) for large nnCompute first few, find period kk, reduce n mod kn \bmod k

Remarks

Functions in olympiad questions come up in two methods: explicit (a formula is given and you extract information) and implicit (a functional equation like f(x+y)=f(x)+f(y)f(x+y) = f(x) + f(y) is given and you must determine ff entirely from its properties). This module has focused on the explicit side. Functional equations deserve their own treatment, but the foundation built here of knowing what domains and ranges are, how compositions interact, and how inverses work are what makes functional equation problems solveable.

You should develop a habit of making sure that whenever you see a composed or transformed function, you trace one point through every step. Pick a convenient input, watch where it goes, and let that anchor your intuition before you do any algebra.

Practice Problems

StatusSourceProblem NameDifficultyTags

Module Progress:

Join the Discord Community!

Stuck on a problem, or don't understand a module? Join the Discord and get help with your doubts while making more math friends.