Lebesgue integral of $\chi_{\mathbb{Q}}: \mathbb{R} \rightarrow \mathbb{R}$ Suppose $(X, \mathfrak{A}, \mu)$ is a measure space. Let $\phi$ be a simple function with canonical representation $\sum^{k}_{n=1} a_{n} \chi_{E_{n}}$. I know we define the Lebesgue integral of $\phi$ as $$\int{\phi} \> d\mu = \sum^{k}_{n=1} a_{n} \mu(E_{n}).$$
With domain considered to be the closed interval $[0,1]$, $\int{\chi_{\mathbb{Q}}} d\mu= 0$. But what about if we consider the domain to be $\mathbb{R}$? That is, consider $\chi_{\mathbb{Q}}: \mathbb{R} \rightarrow \mathbb{R}$.  I bet its Lebesgue integral is still $0$. The thing I am getting hung up on is that $\chi_{\mathbb{Q}}$ can be express as $\chi_{\mathbb{Q}} + 0 \ \chi_{\mathbb{R} \backslash \mathbb{Q}}$. Then $\int{\chi_{\mathbb{Q}} d\mu = \mu(\mathbb{Q}}) + 0 \mu(\mathbb{R}) \backslash \mathbb{Q})$ and for the latter addend we get $0 \times \infty$, which bothers me a great deal. 
My misunderstanding gets a bit more general. What if we consider the space $(\mathbb{R}, \mathcal{L}, m)$, where $\mathcal{L}$ is the Lebesgue $\sigma$-algebra and $m$ is the Lebesgue measure. It's true that $\int{1} \> dm = \infty$ and $\int{0} \> dm = 0$ But, in the latter case, again, we'll have $0 \times \infty$. Finally, if $(X, \mathfrak{A}, \mu)$ is a (not necessarily finite) measure space, $N$ is a set of measure $0$, and $f$ is an arbitrary $\mathfrak{A}$-measurable function, then it is true that $\int_{N}{f} \> d\mu = 0$. For whatever reason, I am having some trouble wrapping my head around this. I think an expert here would be able to read my post and see what's my confusion. Perhaps, I need to see another proof of some of these facts that avoids any situation where $0 \times \infty$ may occur. Thanks!
 A: At least for me, your examples are precisely why we choose to define $0\times\infty$ to be zero. If we didn't, then two different ways of calculating the same quantity would lead to different answers (even if we left $0\times\infty$ undefined).
In the calculation of $\int_{\mathbb{R}}\chi_{\mathbb{Q}} dm$ where $m$ is Lebesgue measure, we can avoid the expression $0\times\infty$. As per the definition you state in the post, if $\phi$ is a simple function, $\phi = \sum_{n=1}^ka_n\chi_{E_n}$, then $\int_{\mathbb{R}}\phi\ dm = \sum_{n=1}^ka_nm(E_n)$. In this situation, $\chi_{\mathbb{Q}}$ is our simple function, so by definition $\int_{\mathbb{R}}\chi_{\mathbb{Q}}dm = m(\mathbb{Q}) = 0$ (i.e. $k = 1$, $a_1 = 1$, $E_1 = \mathbb{Q}$).
A: Concerning your question about integrating over a set with measure $0$, it may be helpful to run through the definition. 
Let $(X, \mathfrak{A}, \mu)$ be a measure space. Let $f$ be a non-negative $\mathfrak{A}$-measurable function and let $E$ be a measurable set with $\mu(E)=0$. Here is our definition of the integral of $f$ over $E$:
$$ \int_{E} {f} d\mu = \int{f\chi_{E}} \>  d\mu = \sup\{\int{\phi} \> d\mu: \phi \text{ is simple, measurable, and } 0 \leq \phi \leq f\chi_{E}\}.$$
Now, take an arbitrary simple measurable function $\phi$ such that $0 \leq \phi \leq f\chi_{E}$ with canonical representation $\sum^{m}_{n=1} a_{n} \chi_{A_{n}}$. Because $\phi \equiv 0$ on $X \backslash E$ (that is, $\phi$ is identically $0$ on $X \backslash E$), we may write $\phi$ as $\sum^{m}_{n=1} a_{n} \chi_{A_{n} \cap E}$. Then, 
$$ \int{\phi} \> d\mu = \sum^{m}_{n=1} a_{n} \mu(A_{n} \cap E).$$
Because $A_{n} \cap E \subseteq E$ for each $n=1, \ldots, m$, $\mu(A_{n} \cap E)=0$ for each $n$. It follows that $\int{\phi} \> d\mu = 0.$
Well, what have we done? We took an arbitrary simple function and showed that its integral is $0$. So, $$\{\int{\phi} \> d\mu: \phi \text{ is simple, measurable, and } 0 \leq \phi \leq f\chi_{E}\}=\{0\}.$$ We conclude $\int_{E}{f} \>  d\mu = 0$. 
To extend our result to any arbitrary measurable functions, note that $f= f^{+} - f^{-}$, where the functions on the right are non-negative.
A: In order to make sense of $\infty$ in these contexts, you typically define arithmetic on $[0,\infty]= \mathbb [0,\infty) \cup \{ \infty\}$ as follows: $a \cdot \infty = \infty \cdot a = \infty$ for $a \neq 0$; $0 \cdot \infty = \infty \cdot 0 =0$; and $a+\infty = \infty +a = \infty$ for any $0 \leq a \leq \infty$. (Operations not involving infinity are precisely the same as usual arithmetic). This procedure is briefly described in most real analysis textbooks (in Rudin for instance). 
These are well-defined binary operations on the set $[0,\infty]$, and you can check they satisfy the associative, distributive, and commutative properties. Roughly speaking, this means that, when $\infty$ comes up in the types of situations you describe, it can be manipulated like a number so far as multiplication and addition goes. 
I don't think that you can avoid $0 \times \infty$ in these proofs, because these situations are why you need to deal with arithmetic involving $\infty$ (unless, of course, you assume all your spaces are finite). It's probably best to get used to thinking about $\infty$ as a rather cranky number. Treat it with care, but don't be afraid of it and don't give it too much attention. 
Edit to address your question about integrating over sets of measure zero: I also struggled with the fact that the integral of any measureable function over a measure zero set is zero, and what helped me was simply working with the definition of the integral. The result is not intuitive, at least for me, but it is an inescapable result of the definition. 
