Canonical: https://knowlpedia.com/convex-analysis/indicator-function-of-a-set/

# Indicator function of a set

The extended-real function that is zero on a set and positive infinity outside it.

Let \(X\) be a set and let \(\Omega\subseteq X\). The **indicator function** of \(\Omega\) is the [extended-real-valued](https://knowlpedia.com/convex-analysis/extended-real-number-system-and-conventions/) function \(\delta_\Omega:X\to(-\infty,+\infty]\) defined by
\[
\delta_\Omega(x)=
\begin{cases}
0, & x\in\Omega,\\
+\infty, & x\notin\Omega.
\end{cases}
\]

Its effective [domain](https://knowlpedia.com/convex-analysis/domain-and-epigraph-proper-function/) is \(\operatorname{dom}(\delta_\Omega)=\Omega\), and its epigraph is \(\operatorname{epi}(\delta_\Omega)=\Omega\times[0,\infty)\).

## Remarks

Indicator functions encode constraints as penalties: minimizing \(f+\delta_\Omega\) is equivalent to minimizing \(f\) subject to \(x\in\Omega\).

When \(X\) is a real vector space, \(\delta_\Omega\) is [convex](https://knowlpedia.com/convex-analysis/convex-function-via-epigraph/) if and only if \(\Omega\) is a [convex set](https://knowlpedia.com/convex-analysis/convex-set/).
