If Lesbegue integral is zero, is the measure zero? Let $(X, \Sigma, \mu)$ be a measure space, and $f: X \to [0, \infty)$ be a measurable function w.r.t. the $\sigma$-algebra $\Sigma$ (i.e. $f^{-1}([0,\infty)) \in \Sigma$) such that $f \ne 0$.
Is the following true?
If $$\int_{A} f d\mu = 0$$ where $A \in \Sigma$, does it imply that $\mu(A) = 0$?
I know that the converse is true: if the measure of $\mu(A) = 0$, then the Lesbegue integral is zero, i.e.:
$$\int_{A} f d\mu = 0$$
I wonder if this is true: Lesbegue integral equal zero, implies measure of zero. If it's not true, what is a counterexample of this?
I read in this post, the same thing but with outer measures, but I quite don't understand it well.
 A: To make the answering more complete.
If $f\neq0$ stands for $f(x)>0$ for every $x\in X$ then yes.
Define $A_n=\{x\in A\mid f(x)\geq\frac1n\}$. Then:$$0=\int_Afd\mu\geq\int_{A_n}fd\mu\geq\frac1n\mu(A_n)$$showing that $\mu(A_n)=0$ for every $n$.
This while $A_1\subseteq A_2\subseteq\cdots\subseteq A$ with $A=\bigcup_{n=1}^{\infty} A_n$.
This allows the conclusion that $\mu(A)=\lim_{n\to\infty}\mu(A_n)=0$.
A: As copper.hat pointed out, $f$ can be non-zero on a set of positive measure, but the integral of $f$ over a set whose intersection with that set has measure zero may still be zero.
Another example is when $f$ is non-zero on a set of measure zero. Then $\int_A f\ \mathsf d\mu=0$ for any $A\in\Sigma$, no matter the value of $\mu(A)$. For example, if $f=\mathsf 1_{\mathbb Q}$, the indicator function of the rational numbers would satisfy $\int_{\mathbb R} f\ \mathsf d\mu =0$ where $\mu$ is Lebesgue measure.
There are however nonnegative functions which are nowhere zero and satisfy your condition, see here: Integral being zero implies measure of set is zero.
