Definition of $L^p$ space and almost everywhere defined functions Given $(\Omega, M, \mu)$ a measure space, one defines $L^p$ to be the quotient of the set of all measurable functions $f$ from $\Omega$ to the extended real line such that $|f|^p$ has finite integral, with respect to, $~$ the the 'almost everywhere equal' equivalence relation.
I cannot understand why it is a vector space. Take $f,g$ in $L^p$. Their sum is defined as the equivalence class of the sum of any two representatives $h,k$ of respectively $f$ and $g$. $h,k$ are functions defined on $\Omega$, and are almost everywhere finite, however their sum may be only almost everywhere defined. So what do do?
I guess one could extend $h+k$ on all of the domain by just setting to $0$ (or any other value) the sum every time it is not defined. This would still yield a well defined sum of equivalence classes. But for the integral? Can I define the integral of an almost everywhere defined function to be the integral of the function on the set on which it is defined?
 A: The representatives are defined everywhere, but we say that two are the same if they are not necessarily equal, but equal almost everywhere. The sum of two representatives is again defined everywhere, but we need to know that if $f\simeq a$ and $g\simeq b$ then $f+g\simeq a+b$. Both $f+g$ and $a+b$ are defined everywhere, and they are equal almost everywhere.
There may be a time when we want to say that a function is only defined almost everywhere, but that's because we don't care what it's equal to on a set of measure $0$ if we know what it is everywhere else. We could define it arbitrarily and it wouldn't affect the equivalence class. We can still sum two such functions. We can either define them arbitrarily on the undefined portion, or we can say that the undefined portion expands, but it is still of measure $0$.
A: To show that h+k is integrable its suffice to observe that $|h+k|^p \leq 2^p(|h|^p+|k|^p)$. For the last part of your question the answer is affirmative. Suppose without loss of generality that your function $f$ is positive (otherwise write $f=f^+-f^-$). Now suppose that f is well defined on $A\subseteq \Omega$ and $\mu(A^c)=0$ and $f=\infty$ on $A^c$ (thats the only case since f is positive and f is defined in $\Omega$). Then since f is positive you can write  $\int_{\Omega}fd\mu=\int_{A}fd\mu+\int_{A^c}fd\mu=\int_{A}fd\mu+\infty \cdot 0$, and now in measure theory we accept that $0\cdot \infty=0$. So you get that $\int_{\Omega}fd\mu=\int_{A}fd\mu$
A: Take functions that are zero almost everywhere. It is a vector subspace of the space of all p-integrable functions, right? So you take the quotient space (all p-integrable functions   by functions zero a.e.). That's $L_p$.
