Skip to content
latexci
PreviewDiffWord → LaTeXBibTeXSymbolsTableTemplatesAcademics
Sign inFree
PreviewDiffWord → LaTeXBibTeXSymbolsTableTemplatesAcademicsFree
Discord community ↗GitHub ↗
Sign in
LaTeX symbols›Statistics & Probability›Indicator Function

Indicator Function in LaTeX

The LaTeX command for indicator function (𝟙) is \mathds{1} (indicator function / characteristic function).

𝟙\text{𝟙}𝟙
\mathds{1}
Statistics & Probability · Unicode 𝟙 (U+1D7D9) · needs dsfont

Writing a paper? The table generator and the BibTeX cleaner are one click away, no account.

Which command should you use?

CommandPackageUse it when
\mathds{1} recommendeddsfontThe usual choice: a crisp vector double-struck 1.
\mathbbm{1} bbmSame look, but bbm ships bitmap (Type 3) fonts, which can look blurry in PDF viewers.
\mathbf{1} noneA bold 1, common in probability texts; needs no package.
Table 1. Ways to write indicator function in LaTeX. Every line was compiled with pdfLaTeX (TeX Live 2026) loading only the package shown.
Common mistake. \mathbb{1} with amssymb does not give a double-struck one: the AMS blackboard-bold font only contains capital letters, so pdfLaTeX prints the wrong glyph. KaTeX and MathJax do draw it, which is why the mistake spreads through web snippets.

How to type Indicator Function

Write \mathds{1} inside math mode, that is between $…$ for inline math or in a \[ … \] or equation block for display math. This symbol needs the dsfont package, so add \usepackage{dsfont} to your preamble.

Example
$\mathds{1}_{\{X > 0\}}$𝟙{X>0}\text{𝟙}_{\{X > 0\}}𝟙{X>0}​

Open this example in the live preview: it renders as you type, with no compiler and no signup.

Often confused with

  • Blackboard bold R \mathbb{R} (ℝ): real numbers
  • Blackboard bold N \mathbb{N} (ℕ): natural numbers
  • Normal Distribution \mathcal{N} (𝒩): normal / Gaussian distribution

Related Statistics & Probability symbols

𝔼\mathbb{E}ℙ\mathbb{P}Var\operatorname{Var}Cov\operatorname{Cov}Cor\operatorname{Cor}𝒩\mathcal{N}⊥⊥\mathrel{\perp\!\!\!\perp}→d\xrightarrow{d}→p\xrightarrow{p}→a.s.\xrightarrow{a.s.}∼iid\overset{\text{iid}}{\sim}

Statistics and probability symbols in LaTeX: the full table or search all 350+ LaTeX symbols.

FAQ

How do you write indicator function (𝟙) in LaTeX?

Use \mathds{1} in math mode after adding \usepackage{dsfont} to your preamble. For example, $\mathds{1}_{\{X > 0\}}$.

Which package provides \mathds{1}?

It comes from the dsfont package: add \usepackage{dsfont} to your preamble.

What is the most common mistake with indicator function in LaTeX?

\mathbb{1} with amssymb does not give a double-struck one: the AMS blackboard-bold font only contains capital letters, so pdfLaTeX prints the wrong glyph. KaTeX and MathJax do draw it, which is why the mistake spreads through web snippets.

latexci

Free LaTeX tools for researchers and students, in any browser. No paid plan, no advertising.

Star on GitHubBuy me a coffee

Tools

Live PreviewBibTeX ToolsDOI → BibTeXarXiv → BibTeXPubMed → BibTeXISBN → BibTeXLaTeX DiffWord → LaTeXSymbol SearchTable GeneratorTemplatesCV Generator

Learn

Academics hubLife after OverleafFreeGitHub

Community

DiscordGitHub IssuesFeature Requests

© 2026 latexci. By Sitraka Forler, sitraka.lu

PrivacyTerms