\(L^p\) Spaces
0.1 \(L^p\) spaces
Definition 1 (\(L^p\) norm (\(p\)-norm of a function)) Let \((S, \mathcal{S}, \mu)\) be a measure space. For any real number \(p \ge 1\), the \(L^p\) norm of a measurable function \(f : S \to \mathbb{R}\) is:
\[ \mathopen{}\left\lVert f\right\rVert\mathclose{}_p \stackrel{\text{def}}{=}\mathopen{}\left(\int_S \mathopen{}\left|f\right|\mathclose{}^p \, d\mu\right)\mathclose{}^{1/p}. \]
Example 1 (The \(L^1\) and \(L^2\) norms of \(x \mapsto x\) on the unit interval) Let \(S = [0, 1]\) with the Lebesgue measure \(\mu\), and let \(f(x) = x\). By Definition 1,
\[ \begin{aligned} \mathopen{}\left\lVert f\right\rVert\mathclose{}_1 &= \int_0^1 x \, dx \\ &= \frac{1}{2}, \end{aligned} \]
and
\[ \begin{aligned} \mathopen{}\left\lVert f\right\rVert\mathclose{}_2 &= \mathopen{}\left(\int_0^1 x^2 \, dx\right)\mathclose{}^{1/2} \\ &= \mathopen{}\left(\frac{1}{3}\right)\mathclose{}^{1/2}. \end{aligned} \]
Definition 2 (\(\mathcal{L}^p\) space (\(\mathcal{L}^p(S, \mathcal{S}, \mu)\))) Let \((S, \mathcal{S}, \mu)\) be a measure space. Let \(p \ge 1\) be a real number. The \(\mathcal{L}^p\) space \(\mathcal{L}^p(S, \mathcal{S}, \mu)\) is the set of all measurable functions \(f : S \to \mathbb{R}\) whose \(L^p\) norm is less than \(\infty\): \(\mathopen{}\left\lVert f\right\rVert\mathclose{}_p < \infty\).
Example 2 (An \(L^1\) function not in \(L^2\)) Consider the interval \((0, 1)\) with the Borel \(\sigma\)-algebra (Definition 3 in Sigma-Algebras) and Lebesgue measure \(\mu\) (Definition 6 in Measures and Probability Measures). Define \(f : (0, 1) \to \mathbb{R}\) by \(f(x) = x^{-1/2}\).
- For \(p = 1\): \[ \begin{aligned} \mathopen{}\left\lVert f\right\rVert\mathclose{}_1 &= \int_0^1 x^{-1/2} \, dx \\ &= \mathopen{}\left[2 x^{1/2}\right]\mathclose{}_0^1 \\ &= 2 \\ &< \infty, \end{aligned} \] so \(f \in \mathcal{L}^1((0, 1), \mu)\).
- For \(p = 2\): \[ \begin{aligned} \mathopen{}\left|f(x)\right|\mathclose{}^2 &= \mathopen{}\left(x^{-1/2}\right)\mathclose{}^2 \\ &= \frac{1}{x}. \end{aligned} \] The integral is: \[ \begin{aligned} \int_0^1 \frac{1}{x} \, dx &= \lim_{\varepsilon\to 0^+} \mathopen{}\left[\ln x\right]\mathclose{}_\varepsilon^1 \\ &= \lim_{\varepsilon\to 0^+} (-\ln \varepsilon) \\ &= \infty. \end{aligned} \] So \(\mathopen{}\left\lVert f\right\rVert\mathclose{}_2 = \infty\), so \(f \notin \mathcal{L}^2((0, 1), \mu)\).
This shows that \(\mathcal{L}^2 \subset \mathcal{L}^1\) on sets of finite measure: a larger \(p\) imposes stricter requirements near singularities.
Definition 3 (Equal almost everywhere (\(f = g\) \(\mu\)-a.e.)) Let \((S, \mathcal{S}, \mu)\) be a measure space. Let \(f, g : S \to \mathbb{R}\) be measurable. The functions \(f\) and \(g\) are equal almost everywhere, written \(f = g\) \(\mu\)-a.e., if \(f(s) = g(s)\) holds almost everywhere.
Example 3 (A function that differs from \(0\) at one point) Let \(S = \mathbb{R}\) with the Lebesgue measure \(\mu\). Let \(f(s) = 1\) if \(s = 0\), and \(f(s) = 0\) otherwise. The set \({\mathopen{}\left\{s : f(s) \neq 0\right\}\mathclose{}} = {\mathopen{}\left\{0\right\}\mathclose{}}\) has measure zero, so \(f = 0\) almost everywhere by Definition 3.
Definition 4 (\(L^p\) space (\(L^p(S, \mathcal{S}, \mu)\), \(L^p(\mu)\))) Let \((S, \mathcal{S}, \mu)\) be a measure space. Let \(p \ge 1\) be a real number. For each \(f\) in the \(\mathcal{L}^p\) space, let \([f]\) be the set of all functions in \(\mathcal{L}^p(S, \mathcal{S}, \mu)\) that are equal almost everywhere to \(f\). The \(L^p\) space \(L^p(S, \mathcal{S}, \mu)\) (or simply \(L^p(\mu)\)) is the set of all such sets \([f]\), with the norm \(\mathopen{}\left\lVert[f]\right\rVert\mathclose{}_p \stackrel{\text{def}}{=}\mathopen{}\left\lVert f\right\rVert\mathclose{}_p\) (\(L^p\) norm).
Example 4 (The zero element of \(L^p\)) Let \(f\) be the function in Example 3, which is \(1\) at \(s = 0\) and \(0\) elsewhere. Then \(f = 0\) almost everywhere, so \([f] = [0]\). Also \(\mathopen{}\left\lVert f\right\rVert\mathclose{}_p = 0\) although \(f \neq 0\), so \(\mathopen{}\left\lVert f\right\rVert\mathclose{}_p = 0\) can hold for a nonzero element of \(\mathcal{L}^p\); on \(L^p(\mu)\), \(\mathopen{}\left\lVert[f]\right\rVert\mathclose{}_p = 0\) only for \([f] = [0]\), as a norm requires.
Definition 5 (Essential supremum norm (\(L^\infty\) norm)) Let \((S, \mathcal{S}, \mu)\) be a measure space. The essential supremum norm (or \(L^\infty\) norm) of a measurable function \(f : S \to \mathbb{R}\) is:
\[ \mathopen{}\left\lVert f\right\rVert\mathclose{}_\infty \stackrel{\text{def}}{=}\inf \mathopen{}\left\{ C \ge 0 : \mu(\mathopen{}\left\{s \in S : \mathopen{}\left|f(s)\right|\mathclose{} > C\right\}\mathclose{}) = 0 \right\}\mathclose{}. \]
Example 5 (The essential supremum norm ignores a null set) Let \(S = [0, 1]\) with the Lebesgue measure \(\mu\). Let \(f(s) = 5\) if \(s = 0\) and \(f(s) = s\) otherwise. Then \(\sup_s \mathopen{}\left|f(s)\right|\mathclose{} = 5\). For \(C \ge 1\), the set \({\mathopen{}\left\{s : \mathopen{}\left|f(s)\right|\mathclose{} > C\right\}\mathclose{}}\) is empty or \({\mathopen{}\left\{0\right\}\mathclose{}}\), so it has measure zero, and for \(C < 1\) it has positive measure. By Definition 5, \(\mathopen{}\left\lVert f\right\rVert\mathclose{}_\infty = 1\).
Definition 6 (\(\mathcal{L}^\infty\) space (\(\mathcal{L}^\infty(S, \mathcal{S}, \mu)\))) Let \((S, \mathcal{S}, \mu)\) be a measure space. The \(\mathcal{L}^\infty\) space \(\mathcal{L}^\infty(S, \mathcal{S}, \mu)\) is the set of all measurable functions \(f : S \to \mathbb{R}\) whose essential supremum norm is less than \(\infty\): \(\mathopen{}\left\lVert f\right\rVert\mathclose{}_\infty < \infty\).
Example 6 (Bounded and unbounded functions) Let \(S = (0, 1)\) with the Lebesgue measure \(\mu\). The function \(f(s) = s\) has \(\mathopen{}\left\lVert f\right\rVert\mathclose{}_\infty = 1 < \infty\), so \(f \in \mathcal{L}^\infty(S, \mathcal{S}, \mu)\) by Definition 6. The function \(g(s) = 1/s\) exceeds every \(C\) on the set \((0, 1/C)\) of positive measure, so \(\mathopen{}\left\lVert g\right\rVert\mathclose{}_\infty = \infty\) and \(g \notin \mathcal{L}^\infty(S, \mathcal{S}, \mu)\).
Definition 7 (\(L^\infty\) space (\(L^\infty(S, \mathcal{S}, \mu)\), \(L^\infty(\mu)\))) Let \((S, \mathcal{S}, \mu)\) be a measure space. For each \(f\) in the \(\mathcal{L}^\infty\) space, let \([f]\) be the set of all functions in \(\mathcal{L}^\infty(S, \mathcal{S}, \mu)\) that are equal almost everywhere to \(f\). The \(L^\infty\) space \(L^\infty(S, \mathcal{S}, \mu)\) (or simply \(L^\infty(\mu)\)) is the set of all such sets \([f]\), with the norm \(\mathopen{}\left\lVert[f]\right\rVert\mathclose{}_\infty \stackrel{\text{def}}{=}\mathopen{}\left\lVert f\right\rVert\mathclose{}_\infty\) (essential supremum norm).
Example 7 (Bounded functions equal almost everywhere) Let \(f\) be the function in Example 5 and \(h(s) = s\) on \([0, 1]\). Then \(f = h\) almost everywhere (Definition 3), so \([f] = [h]\) in \(L^\infty(\mu)\), and \(\mathopen{}\left\lVert[f]\right\rVert\mathclose{}_\infty = \mathopen{}\left\lVert h\right\rVert\mathclose{}_\infty = 1\).
Theorem 1 (Holder’s inequality) Let \((S, \mathcal{S}, \mu)\) be a measure space, and let \(p, q \in [1, \infty]\) be conjugate exponents satisfying \(\frac{1}{p} + \frac{1}{q} = 1\) (with the convention that \(q = \infty\) when \(p = 1\), and \(q = 1\) when \(p = \infty\)). If \(f \in L^p(\mu)\) and \(g \in L^q(\mu)\) (Definition 4), then their product \(f g\) is absolutely integrable (\(f g \in L^1(\mu)\)) and satisfies:
\[ \mathopen{}\left\lVert f g\right\rVert\mathclose{}_1 = \int_S \mathopen{}\left|f g\right|\mathclose{} \, d\mu\le \mathopen{}\left\lVert f\right\rVert\mathclose{}_p\,\mathopen{}\left\lVert g\right\rVert\mathclose{}_q. \]
When
\[ \begin{aligned} p &= q \\ &= 2, \end{aligned} \]
this inequality is the Cauchy-Schwarz inequality for integrals.
Theorem 2 (Minkowski’s inequality (\(L^p\) triangle inequality)) Let \((S, \mathcal{S}, \mu)\) be a measure space and let \(1 \le p \le \infty\). For any functions \(f, g \in L^p(\mu)\) (Definition 4), their sum \(f + g\) is in \(L^p(\mu)\) and satisfies:
\[ \mathopen{}\left\lVert f + g\right\rVert\mathclose{}_p \le \mathopen{}\left\lVert f\right\rVert\mathclose{}_p + \mathopen{}\left\lVert g\right\rVert\mathclose{}_p. \]
Together with absolute homogeneity \(\mathopen{}\left\lVert c f\right\rVert\mathclose{}_p = \mathopen{}\left|c\right|\mathclose{}\,\mathopen{}\left\lVert f\right\rVert\mathclose{}_p\) and definiteness, Minkowski’s inequality establishes that \(L^p(\mu)\) satisfies all axioms of a normed vector space.
Example 8 (Applying Holder’s inequality to finite sums and expectations)
-
Finite vectors (Cauchy-Schwarz and taxicab bounds): Equipping a finite set with the counting measure, Holder’s inequality for conjugate exponents \(p, q\) gives: \[ \sum_{i=1}^n\mathopen{}\left|x_i y_i\right|\mathclose{} \le \mathopen{}\left(\sum_{i=1}^n\mathopen{}\left|x_i\right|\mathclose{}^p\right)\mathclose{}^{1/p} \mathopen{}\left(\sum_{i=1}^n\mathopen{}\left|y_i\right|\mathclose{}^q\right)\mathclose{}^{1/q}. \] Setting \(p = 1\), \(q = \infty\) gives \(\sum_{i=1}^n\mathopen{}\left|x_i y_i\right|\mathclose{} \le \mathopen{}\left\lVert\mathord{\smash[b]{\underset{\raise.3ex\hbox{$\scriptstyle\sim$}}{x}}\vphantom{x}}\right\rVert\mathclose{}_1\,\mathopen{}\left\lVert\mathord{\smash[b]{\underset{\raise.3ex\hbox{$\scriptstyle\sim$}}{y}}\vphantom{y}}\right\rVert\mathclose{}_\infty\). Setting
\[ \begin{aligned} p &= q \\ &= 2 \end{aligned} \]
gives the standard vector Cauchy-Schwarz inequality.
-
Covariance bound for random variables: On a probability space with measure \(\mathbb{P}\) (Definition 12 in Measures and Probability Measures), taking
\[ \begin{aligned} p &= q \\ &= 2 \end{aligned} \]
gives \({\mathbb{E}\mathopen{}\left[\mathopen{}\left|X Y\right|\mathclose{}\right]\mathclose{}} \le \sqrt{{\mathbb{E}\mathopen{}\left[X^2\right]\mathclose{}}}\,\sqrt{{\mathbb{E}\mathopen{}\left[Y^2\right]\mathclose{}}}\), guaranteeing that the covariance between any two square-integrable random variables is finite.
Remark 1 (\(L^p\) spaces and norms in probability and machine learning). In probability, statistics, and machine learning, \(L^p\) spaces structure the geometry of random variables, estimators, and loss functions:
Random variables, moments, and inclusion of \(L^p\) spaces: When \(\mu= \mathbb{P}\) is a probability measure (Definition 12 in Measures and Probability Measures) with total measure \({\mathbb{P}\mathopen{}\left(S\right)\mathclose{}} = 1\), an \(L^p\) function is a random variable \(X\) with finite \(p\)-th moment: \[ \mathopen{}\left\lVert X\right\rVert\mathclose{}_p = \mathopen{}\left({\mathbb{E}\mathopen{}\left[\mathopen{}\left|X\right|\mathclose{}^p\right]\mathclose{}}\right)\mathclose{}^{1/p}. \] By Jensen’s inequality, if \(1 \le p \le q \le \infty\), then \(\mathopen{}\left\lVert X\right\rVert\mathclose{}_p \le \mathopen{}\left\lVert X\right\rVert\mathclose{}_q\), so \(L^q(P) \subseteq L^p(P)\). For instance, every random variable with finite variance (\(X \in L^2\)) has finite expectation (\(X \in L^1\)).
The unique Hilbert space \(L^2\) and conditional expectation: Among all \(L^p\) spaces, only \(L^2(\mu)\) is an inner product space, equipped with the inner product \({\mathopen{}\left\langle f, g\right\rangle\mathclose{}} \stackrel{\text{def}}{=}\int_S f g \, d\mu\) (all other \(L^p\) spaces fail the parallelogram law). The completeness of \(L^2\) makes it a Hilbert space. In regression, the conditional expectation \({\mathbb{E}\mathopen{}\left[Y \mid X\right]\mathclose{}}\) is the orthogonal projection of \(Y \in L^2\) onto the closed subspace of \(L^2\) functions measurable with respect to \(X\), minimizing the population mean squared error (pMSE) \(\mathopen{}\left\lVert Y - g(X)\right\rVert\mathclose{}_2^2\).
-
Loss functions, estimation, and robustness: The choice of \(p\) in \(L^p\) norms defines loss functions for optimization and regression:
- \(L^2\) loss (population mean squared error (pMSE), or sample mean squared error (sMSE) on a sample): penalizes large errors quadratically, yielding the conditional mean; sensitive to outliers.
- \(L^1\) loss (population mean absolute error (pMAE), or sample mean absolute error (sMAE) on a sample): penalizes errors linearly, yielding the conditional median; robust to heavy tails and outliers.
- \(L^\infty\) loss (Chebyshev criterion): minimizes the worst-case maximum error across all instances.
Definitions on this page
- Definition 1 (\(L^p\) norm (\(p\)-norm of a function))
- Definition 2 (\(\mathcal{L}^p\) space (\(\mathcal{L}^p(S, \mathcal{S}, \mu)\)))
- Definition 3 (Equal almost everywhere (\(f = g\) \(\mu\)-a.e.))
- Definition 4 (\(L^p\) space (\(L^p(S, \mathcal{S}, \mu)\), \(L^p(\mu)\)))
- Definition 5 (Essential supremum norm (\(L^\infty\) norm))
- Definition 6 (\(\mathcal{L}^\infty\) space (\(\mathcal{L}^\infty(S, \mathcal{S}, \mu)\)))
- Definition 7 (\(L^\infty\) space (\(L^\infty(S, \mathcal{S}, \mu)\), \(L^\infty(\mu)\)))





