# Expressing the sum of two simple functions

I am reading through a book on measure theory and it says that for simple functions $f=\sum a_i \mathbf{1}_{A_i}$ and $g=\sum b_j\mathbf{1}_{B_j}$, the sum can be written $$(f+g)=\sum_{i,j}(a_i+b_j)\mathbf{1}_{A_i \cap B_j}$$

I am having trouble showing how this can be done. I tried writing $f+g=\sum a_i \mathbf{1}_{A_i} +\sum b_j\mathbf{1}_{B_j}$ but didn't make a lot of progress.

Is there a nice way to show this property?

Note that $\{A_i\}$ and $\{B_j\}$ are pairwise disjoint collections of sets and $\mathbf{1}_{A_i}$ is the indicator function for set $A_i$.

Thanks

• Basically this says that $f+g$ takes the value $a_i+b_j$ on $A_i\cap B_j$. Commented Apr 21, 2018 at 15:30
• Huh. Maybe it is rather self-evident. It seems difficult to show directly. Commented Apr 21, 2018 at 15:32
• Don't you agree that $\mathbf{1}_{A_i}=\sum_{j}\mathbf{1}_{A_i\cap B_j}$ and so $f=\sum_{i,j}a_i \mathbf{1}_{A_i\cap B_j}$? Commented Apr 21, 2018 at 15:34

$$\mathbf{1}_{A_i}=\mathbf{1}_{A_i\cap (\cup_jB_j)}=\sum_{j}\mathbf{1}_{A_i\cap B_j}$$ So we can write $f=\sum_i a_i\mathbf{1}_{A_i}=\sum_ia_i\sum_j\mathbf{1}_{A_i \cap B_j}=\sum_{i,j}a_i\mathbf{1}_{A_i \cap B_j}$
Thus $$f+g=\sum_{i,j}a_i\mathbf{1}_{A_i \cap B_j}+\sum_{j,i}b_j\mathbf{1}_{B_j \cap A_i}=\sum_{i,j}(a_i+b_j)\mathbf{1}_{A_i \cap B_j}$$