Let $(X, \mathscr{A}, \mu)$ be a measure space and let $f,g: E \to [0, \infty]$ be measurable functions such that: $\int_A f d\mu \leq \int_A g d\mu$ for every measurable $A \subseteq E$. If $E$ has $\sigma$-finite $\mu$-measure, then $f \leq g$ $\mu-$a.e. in $E$.
I am not sure how to go about showing this. I have seen, in the case of the Lebesgue measure, that two functions being equal almost everywhere implies that their integrals are equal. However, this proposition is going the other direction and is extended to general measure spaces.
I am also confused about the need for a $\sigma$-finite $\mu$-measure. Presumably, the need for this comes up somewhere in the proof of the statement, but as I am not sure how to begin, it is not clear to me why this is necessary.
I would appreciate any hints to get the ball rolling on this question or references to textbooks covering this.