Whenever I need the indicator function I use (for example) the following syntax

\Huge The indicator function : 
$$ \mathbb 1_A (x) = 
1\hspace{0.5cm} \text{if } x\in A\\
0\hspace{0.5cm} \text{if } x\notin A

The problem is that the command mathbb 1_Aor more specifically mathbb 1 returns a weird sign that almost resembles the indicator function :

enter image description here

Is there any package that I should add ? Thanks !




  \mathbf {1} _{A}(x):=
  \begin{cases}1~&{\text{ if }}~x\in A~,\\0~&{\text{ if }}~x\notin A~.\end{cases}\]


  • The output here is the number one in bold. I'm looking for the number one in the $\mathbb$ type, just like the real number set $\mathbb R$.
    – Hamdiken
    Feb 15 '21 at 19:00
  • The typography rule is bold. Follow the specified links upwards for blackboard fonts which are supposed to be used on blackboards and not for printed texts.
    – gigiair
    Feb 15 '21 at 19:30
  • Hmmm, in my context matrices are boldface, and there is a vector of ones that I typeset as $\mathbf{1}$. Is there an alternative notation for the indicator that is preferred to $\mathbb{1}$?
    – RMM
    Nov 14 '21 at 18:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.