🧱 Shaky on the basics? Start with Foundations →
Functions — Composition, Inverses & Symmetry — Visual Lab
Module 1. Functions are machines you can plug into each other — and some machines can be run in reverse. Pick two functions and watch what happens when you change the order, then fold a one-to-one function across the line \(y = x\) to reveal its inverse.
A composition \((f\circ g)(x)=f\!\left(g(x)\right)\) feeds the output of one function straight into another — and the order almost always matters, so \(f\circ g\) and \(g\circ f\) are usually different functions. An inverse \(f^{-1}\) runs the machine backward; its graph is the original reflected across the dashed line \(y=x\). Switch modes below and keep the graphs, the algebra, and the plain-English readout in perfect agreement.
Composition & Inverse Explorer
Pick a mode. In Composition, choose two parent functions and compare \(f\circ g\) against \(g\circ f\) side by side — proof that order matters. In Inverse, draw a one-to-one function and watch its inverse appear, reflected across \(y=x\).
What you're seeing
- Composition reads inside-out. In \((f\circ g)(x)=f\!\left(g(x)\right)\), the inner function \(g\) runs first; its output becomes the input of \(f\). The faded curves are the parents; the solid curve is the composite.
- Order is not commutative. The two panels show \(f\circ g\) and \(g\circ f\). Unless your two functions happen to undo each other, the solid curves differ — that's the whole point of TEKS P.2(B).
- The inverse is a reflection. In Inverse mode the dashed diagonal is \(y=x\). The inverse \(f^{-1}\) is your function reflected across it: every point \((a,b)\) becomes \((b,a)\).
- One-to-one is required. A function has an inverse only if it passes the horizontal line test. For curves that fail it (like \(y=x^2\)), we restrict the domain so just one branch remains — toggle the restriction and watch the inverse become a true function.
- Symmetry has a test. A function is even if \(f(-x)=f(x)\) (mirror over the \(y\)-axis) and odd if \(f(-x)=-f(x)\) (180° turn about the origin). The readout checks both for the function you picked.
Try this
- Pick \(f(x)=x^2\) and \(g(x)=x+3\). Compare the panels: \((f\circ g)(x)=(x+3)^2\) but \((g\circ f)(x)=x^2+3\). Read the two solid curves — they are clearly different. Order matters.
- Now choose an inverse pair. Set \(f(x)=2x+1\) and \(g(x)=\tfrac{x-1}{2}\). This time both panels collapse onto the line \(y=x\): each undoes the other, so \(f\circ g = g\circ f = x\).
- Switch to Inverse mode and pick \(y=x^3\). It is already one-to-one, so its inverse \(\sqrt[3]{x}\) appears immediately as the mirror image across \(y=x\).
- Pick \(y=x^2\), then toggle the domain restriction. Without it, the reflection fails the vertical line test (not a function). Restrict to \(x\ge 0\) and the inverse becomes \(\sqrt{x}\) — a genuine function.
Two worked examples
Watch the order of operations for composition, then run a function backward to build its inverse.
Let \(f(x)=x^2\) and \(g(x)=x+3\). Find \((f\circ g)(x)\) and \((g\circ f)(x)\), then evaluate each at \(x=2\).
- Compose \(f\circ g\) (inner \(g\) first). \((f\circ g)(x)=f\!\left(g(x)\right)=f(x+3)=(x+3)^2\).
- Compose \(g\circ f\) (inner \(f\) first). \((g\circ f)(x)=g\!\left(f(x)\right)=g(x^2)=x^2+3\).
- These are different expressions. \((x+3)^2 = x^2+6x+9 \neq x^2+3\), so \(f\circ g \neq g\circ f\).
- Evaluate at \(x=2\). \((f\circ g)(2)=(2+3)^2=25\), while \((g\circ f)(2)=2^2+3=7\). Same input, different outputs.
Find the inverse of \(f(x)=2x-6\), and confirm it by composition.
- Write \(y=f(x)\). \(y=2x-6\).
- Swap \(x\) and \(y\) (reflect across \(y=x\)): \(x=2y-6\).
- Solve for \(y\). Add 6: \(x+6=2y\); divide by 2: \(y=\dfrac{x+6}{2}\). So \(f^{-1}(x)=\dfrac{x+6}{2}\).
- Verify by composition. \(f\!\left(f^{-1}(x)\right)=2\!\left(\dfrac{x+6}{2}\right)-6=x+6-6=x\). It checks — each undoes the other.
Composition and inverses are the grammar of every later function
Composition is how complicated functions get built — and later, how the chain rule of calculus takes them apart. Inverses are why logarithms exist (the inverse of \(b^x\)), why \(\arcsin\) exists (the inverse of \(\sin\) on a restricted domain), and why "undoing" is a first-class move in mathematics. The reflection-across-\(y=x\) picture you build here is the exact mental image you'll reuse for exponential ↔ log and trig ↔ inverse-trig pairs all year. Master order-matters and the one-to-one requirement now, and the rest of pre-calculus reads like sentences instead of riddles.
Key Vocabulary
The precise words a mathematician uses to describe what the controls are doing.
The function \((f\circ g)(x)=f\!\left(g(x)\right)\): the output of \(g\) becomes the input of \(f\). Read inside-out — the inner function runs first.
A property where order changes the result. For composition, \(f\circ g \neq g\circ f\) in general — swapping the functions usually gives a different function.
The function that undoes \(f\): if \(f(a)=b\), then \(f^{-1}(b)=a\). It satisfies \(f\!\left(f^{-1}(x)\right)=x\) and is not the reciprocal \(\tfrac{1}{f}\).
A function where each output comes from exactly one input. It passes the horizontal line test and is precisely the condition for an inverse function to exist.
Even: \(f(-x)=f(x)\) (mirror over the \(y\)-axis). Odd: \(f(-x)=-f(x)\) (180° rotation about the origin). Many functions are neither.
Limiting the inputs (e.g. \(x\ge 0\)) so a many-to-one function becomes one-to-one — the trick that lets \(y=x^2\) have the inverse \(\sqrt{x}\).
TEKS & Function Concepts
This lab targets the composition and inverse strands of Pre-Calculus Module 1, where scholars compose functions, prove that order matters, test even/odd symmetry, and build inverses as reflections across \(y=x\) — restricting domains where needed.
P.2A use composition to model situations · P.2B demonstrate that function composition is not commutative · P.2C represent a given function as a composite of two functions · P.2D determine even/odd symmetry · P.2E determine inverse functions. Process standards P.1A–G (apply math; problem-solving model; tools; multiple representations; connect ideas; justify with precise language) are embedded throughout.
Ready for the full course map? Head back to Pre-Calculus, read the Student Support, or check the Pacing Guide to see where Module 1 sits in the year.
Module and topic structure follow the TEA Bluebonnet Learning — Secondary Mathematics open curriculum (Edition 1, adapted from Carnegie Learning), licensed CC BY-NC 4.0. TEKS verbatim from 19 TAC §111.42. Classroom use is non-commercial.