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 함수 및 사상 →

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 poweredAI로 LaTeX 작성

최고의 AI LaTeX 편집기, Overleaf 대안

Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움

  • AI로 아름다운 TikZ 다이어그램 생성
  • 이미지를 업로드하고 LaTeX로 원활하게 변환
  • 논문 작성 및 서식에 대한 즉각적인 지원 받기