\coloneqq colon equals (defined as) (≔) in LaTeX

Command\coloneqq
Modemath
Packagemathtools
Unicode≔ U+2254
KindRelation symbols
Also called:=, definition sign, assignment

\coloneqq typesets the symbol “colon equals (defined as)” (≔). It is a relation symbol.

Try it

f(x)≔x2f(x) \coloneqq x^2

Open this formula in the editor The preview is drawn in your browser by KaTeX, which knows the common math commands. The editor compiles the formula with pdfTeX.

Example

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\( f(x) \coloneqq x^2 \)
\end{document}

Open in the editor

Compiled with pdfLaTeX from TeX Live 2023.

How to use it

\coloneqq works only in math mode. In running text, put it between $...$ or \(...\). Outside math mode LaTeX stops with Missing $ inserted. The command comes from the mathtools package. Add \usepackage{mathtools} to the preamble. Without it LaTeX reports Undefined control sequence.

Typing := directly leaves the colon below the middle of the equals sign. \coloneqq centers it.

About relation symbols

A relation symbol compares two expressions, as in a = b. LaTeX puts a thick space on both sides of it, wider than around a binary operator. Many relations have a negated form whose name starts with n; any other is negated with \not in front.

More relation symbols

All relation symbols