Composition in LaTeX (f \circ g)

f∘gf \circ g
LaTeX command
f \circ g
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

Composition of f with g, meaning apply g first and then f to the result.

Composition is read right to left: (f \circ g)(x) = f(g(x)), and it is associative but usually not commutative. \circ is a binary operator, so spacing around it is automatic. Do not use a baseline \circ for degrees, which need ^{\circ}, and do not confuse it with \cdot or \bullet, which suggest multiplication. Repeated composition is often written f^{\circ n} to avoid ambiguity with powers f^n. The chain rule is the classic formula involving it: (f \circ g)'(x) = f'(g(x))\,g'(x), with the inner derivative on the right.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

(f∘g)′(x)=f′(g(x)) g′(x)(f \circ g)'(x) = f'(g(x))\, g'(x)
\documentclass{article}
\begin{document}
Composition: $f \circ g$

\[ (f \circ g)'(x) = f'(g(x))\, g'(x) \]
\end{document}

Related symbols

All Fungsi & Pemetaan →

Frequently asked questions

How do I write Composition in LaTeX?
Type f \circ g in math mode, for example $(f \circ g)'(x) = f'(g(x))\, g'(x)$. It works in plain LaTeX without loading any package.
Which package do I need for f \circ g?
None. f \circ g is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use f \circ g in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $f \circ g$ in running text.
Math poweredTulis LaTeX menggunakan AI

Editor LaTeX AI Terbaik, Alternatif Overleaf

Octree membantu peneliti dari 15+ universitas menulis makalah penelitian lebih cepat menggunakan AI

  • Hasilkan diagram TikZ yang indah menggunakan AI
  • Unggah gambar dan konversi ke LaTeX dengan mulus
  • Dapatkan bantuan instan untuk menulis dan memformat makalah penelitian