# Linearity of Integrals of Step Functions on General Intervals

Recall from the Integrals of Step Functions on General Intervals page that if $f$ is a step function on the interval $I$ then there exists a closed and bounded interval $[a, b] \subseteq I$ such that $f$ is a step function in the usual sense on $[a, b]$ and such that $f(x) = 0$ for all $x \in I \setminus [a, b]$ and the integral of $f$ over $I$ is defined as:

(1)Furthermore, since $f$ is a step function on $[a, b]$ we have that there exists a partition $P = \{ a = x_0, x_1, ..., x_n = b \} \in \mathscr{P}[a, b]$ such that $f(x) = c_k$ (here $c_k$ is a constant) on each subinterval $(x_{k-1}, x_k)$ for each $k \in \{ 1, 2, ..., n \}$ and $\int_a^b f(x) \: dx$ exists by Lebesgue's criterion and $\displaystyle{\int_a^b f(x) \: dx = \sum_{k=1}^{n} c_k[x_k - x_{k-1}]}$. Therefore:

(2)We will now look at some nice linearity properties regarding integrals of step functions on intervals.

Theorem 1: Let $f$ and $g$ be step functions on the interval $I$. Then $f + g$ is a step function on $I$ and $\displaystyle{\int_I [f(x) + g(x)] \: dx = \int_I f(x) \: dx + \int_I g(x) \: dx}$. |

**Proof:**Let $f$ and $g$ be step functions on the interval $I$. Then there exists closed and bounded intervals $[a, b]$ and $[c, d]$ such that $f$ is a step function in the usual sense on $[a, b]$ and $f(x) = 0$ for all $x \in I \setminus [a, b]$ and also $g$ is a step function in the usual sense on $[c, d]$ and $g(x) = 0$ for all $x \in I \setminus [c, d]$.

- Consider $[a, b] \cup [c, d]$. This union is either a closed interval if $[a, b] \cap [c, d] \neq \emptyset$ or the union of two closed intervals. In either case, there exists a "larger" closed interval $[p, q]$ such that $[a, b], [c, d] \subset [p, q]$. Then $f + g$ must be a step function on $I$ since $f + g$ is a step function in the usual sense on $[p, q]$ and $f(x) + g(x) = 0$ for all $x \in I \setminus [e, f]$. So:

- Now $f(x) = 0$ for all $x \in I \setminus [a, b]$ and so $f(x) = 0$ for all $x \in [p, q] \setminus [a, b]$. Similarly, $g(x) = 0$ for all $x \in I \setminus [c, d]$ and so $g(x) = 0$ for all $x \in [p, q] \setminus [c, d]$ so:

Theorem 2: Let $f$ be a step functions on the interval $I$ and let $k \in \mathbb{R}$. Then $kf$ is a step function on $I$ and $\displaystyle{\int_I kf(x) \: dx = k \int_I f(x) \: dx}$. |

**Proof:**Since $f$ is a step function on the interval $I$ there exists a closed and bounded interval $[a, b] \subseteq I$ such that $f$ is a step function in the usual sense on $[a, b]$ and $f(x) = 0$ for all $x \in I \setminus [a, b]$. Then $kf$ is also a step function on the interval $I$ since for that same $[a, b] \subseteq I$ we have that $kf(x) = 0$ for all $x \in I \setminus [a, b]$. So: