# Indicator function
Last edited: 2024-01-24
Indicator function
The indicator function takes a boolean value and maps it to $0$ or $1$ based on if the value is true or not.
$$\mathbb{I}[x] = \begin{cases} 1 & \mbox{if } x \mbox{ is true}\\ 0 & \mbox{if } x \mbox{ is false} \end{cases}$$