TITLE: Why do we need the absolute value signs when integrating the square of a function?
QUESTION [13 upvotes]: Why do we need the absolute value signs in the definition of square-integrable function? As seen below: 
$$ \int_{-\infty}^{\infty} \lvert f(x) \rvert^2 \, dx < \infty $$

REPLY [15 votes]: Besides the complex-valued case, I suspect it also has to do with the existence of other $L^p$ spaces; Wikipedia gives the general definition as
$$
\|f\|_p = \left(\int_S |f|^p \,d\mu\right)^{1/p}
$$
Since the absolute value symbols are redundant only for even integral $p$, omitting them disrupts the uniformity of the notation without buying a whole lot.