# Definition
A [[Map|function]] $g(x_1, x_2, \ldots, x_n)$ defined on an [[Open Set|open region]] $S$ of $\mathbb{R}^n$ ([[Real Coordinate Space|R^n]]) is called *square-integrable* if the multiple integral
$ \int_S [g(x_1, x_2, \ldots x_n)]^2 dx_1 dx_2 \ldots dx_2 $
exists.
It is a theorem of complex analysis that any square-integrable function $g$ may be approximated by an [[Analytic Functions|analytic function]] $g'$ in such a way that the integral of $(g - g')$ over $S$ may be made as small as one wishes.
# Vector Space
To take a simpler example, consider all $\mathbb{F}$-valued ($\mathbb{F}$ is a [[field|field]], e.g., $\mathbb{R}$) functions $f(x)$ defined on $[a,b] \in \mathbb{R}$ that obey
$
\int_{a}^{b} |f(x)|^2 \text{d}x <\infty
$
These are the 1D square integrable functions and form the [[vector space]] $L^2([a,b])$.
[[Vector]] addition and [[scalar]] multiplication are defined as:
$
\begin{align}
(f + g)(x) &= f(x) + g(x), \\
(cf)(x) &= cf(x)
\end{align}
$
and the zero element is $f(x) \equiv 0 \forall x \in [a,b]$. This is a vector space over the field $\mathbb{F}$.
## Applications in Physics
the vector space $L^2(S)$ is the [[vector space]] of normalizable wavefunctions in quantum mechanics.