LaTeX Function Composition Symbol- Complete Tutorial
What Is the Function Composition Symbol in LaTeX?
The function composition symbol looks like a small circle: ∘. In LaTeX, you type \circ to produce it. This symbol represents the operation of combining two functions where the output of one becomes the input of the other.
If you write (f \circ g)(x), you're saying "f composed with g of x" — which equals f(g(x)). That's it. That's the whole point of this symbol.
The Basic Commands
You have two main options for the composition symbol:
\circ— the standard command, produces a properly sized operator symbol\compose— from themathcomppackage, behaves identically for most purposes
The \circ command works in any standard LaTeX document without loading extra packages. Use it and move on.
How to Write Function Composition
Here's the basic syntax:
% Basic function composition
(f \circ g)(x)
This renders as (f ∘ g)(x), meaning f applied to the result of g applied to x.
You can chain multiple functions together:
(f \circ g \circ h)(x)
This gives you (f ∘ g ∘ h)(x) = f(g(h(x))).
With Operators and Relations
The composition symbol works fine alongside other mathematical operators:
f \circ g = h
Renders as: f ∘ g = h
(f \circ g)^{-1} = g^{-1} \circ f^{-1}
This is the inverse property of composition. The symbol scales automatically in superscripts and subscripts.
Common Mistakes That Will Break Your Document
- Using a Unicode character instead of the command — Copy-pasting ∘ from a website often produces a text-mode character that won't render correctly in math mode. Always use
\circ. - Missing the backslash —
circwithout the backslash prints "circ" as plain text. You need\circ. - Using it in text mode — The command only works inside math mode (
$...$or\[...\]). - Spacing issues —
\circhas no built-in spacing. Use\,for thin space if needed:f \, \circ \, g.
Comparison: Composition Symbol vs Related Symbols
LaTeX has several circle-like symbols. Here's what each one actually is:
| Command | Output | Common Use |
|---|---|---|
\circ |
∘ | Function composition |
\bullet |
• | Multiplication, convolution |
\odot |
⊙ | Hadamard product, direct sum |
\otimes |
⊗ | Tensor product |
\circledcirc |
⊚ | rarely used |
Don't confuse these. \circ is specifically for function composition. If you're writing about multiplication, use \bullet. If you're writing about tensor products, use \otimes.
Practical Examples
1. Basic Composition
Let $f(x) = x^2$ and $g(x) = x + 1$.
Then $(f \circ g)(x) = f(g(x)) = (x+1)^2$.
2. Inverse Functions
If $f$ and $f^{-1}$ are inverses, then
$f \circ f^{-1} = f^{-1} \circ f = \text{id}$.
3. Multiple Functions
For functions $f, g, h: X \to X$,
$(f \circ g \circ h)(x) = f(g(h(x)))$.
4. With Subscripts
The composition $f_1 \circ f_2 \circ \cdots \circ f_n$
represents the iterated application of functions.
When to Use Parentheses
You often see (f \circ g) with parentheses around the whole expression. This is correct when you're treating the composition as a single function. Without parentheses, the symbol still works but the meaning can be ambiguous:
f \circ g(x)renders as f ∘ g(x) — this could mean f composed with (g of x), or f composed with g, then applied to x(f \circ g)(x)renders as (f ∘ g)(x) — this clearly means the composition applied to x
Always use parentheses when you're applying the composition to an argument. It removes ambiguity and makes your math readable.
Quick Reference
- Symbol: ∘
- Command:
\circ - Package needed: none (base LaTeX)
- Math mode required: yes
- Alternative:
\compose(requiresmathcomp)
That's It
You now know how to write function composition symbols in LaTeX. Use \circ, put it in math mode, and add parentheses when applying the result. No extra packages needed, no special setup required.