A **simple function** on $X$ is a function $s : X \to \mathbb{R}$ of the form $s = \Sigma_{i=1}^{n} a_{i} \times X_{a_{i}}$ for pairwise disjoint $A_{i} \subset X$ and distinct real numbers $a_{i}$ $X_{A}(x) = \begin{cases}1 & \text{If}\ x \in A\\ 0 & \text{If}\ x \notin A\end{cases}$ > [!note] > If $X$ has $M$ then: $s$ is [[Measurable|measurable]] $\iff$ all $A_{i}$ are [[Measurable|measurable]] > > $A_{i} = s^{-1}(\{ a_{i} \}) = s^{-1}(\mathbb{R} \setminus \{ a_{i} \})^{\complement}$ If we have a [[Measure|measure]] $\mu$ on $X$, define $\int_{A} s \, d\mu \equiv \Sigma_{i=1}^{n} a_{i} \times \mu (A \cap A_{i})$ for $A \in M$ (they are all $\in [0, \infty])$.