Tutorials › Measure Theory › Fourier Partial Sums As Orthogonal Projections

Hilbert Space L^2 · Tutorial 595 of 798

Fourier Partial Sums As Orthogonal Projections

Learn why Fourier partial sums are the unique least-squares trigonometric approximations of a given degree, and how orthogonality proves that claim.

Advanced 12 min read

What You'll Learn

  • Define Fourier coefficients for complex-valued L2 functions on the circle.
  • Construct the degree-N Fourier partial sum and the corresponding trigonometric polynomial space.
  • Verify the orthogonality that makes a partial sum an orthogonal projection.
  • Prove the Pythagorean identity for the error of any competing approximation.
  • Use that identity to establish the unique best-approximation property in L2.
  • Distinguish least-squares approximation from pointwise or uniform approximation.

Fourier Coefficients as Coordinates

Fourier partial sums are finite-dimensional approximations: they retain selected Fourier coefficients and discard the rest. Their central property is exact and geometric. For each fixed degree, the partial sum is the closest trigonometric polynomial of that degree in the \(L^2\) norm. This is a statement about least-squares error, not a claim about pointwise or uniform convergence as the degree increases.

Let \(\mathbb T=\mathbb R/(2\pi\mathbb Z)\) be the circle, with its Lebesgue sigma-algebra \(\mathcal L_{\mathbb T}\) and normalized Lebesgue measure \(m_{\mathbb T}\), so that integration over one period is \(\frac{1}{2\pi}\int_{-\pi}^{\pi}\cdot\,d\theta\) and \(m_{\mathbb T}(\mathbb T)=1\). This is a finite, complete measure space. All functions in this tutorial are complex-valued elements of \(L^2(\mathbb T,m_{\mathbb T})\), so functions that agree \(m_{\mathbb T}\)-a.e. represent the same element. Use the inner product \(\langle f,g\rangle=\int_{\mathbb T}f\overline g\,dm_{\mathbb T}\), linear in its first argument, and the norm \(\|f\|_2=\langle f,f\rangle^{1/2}\).

For each integer \(k\), the function \(e_k(\theta)=e^{ik\theta}\) has norm one, and the functions \((e_k)_{k\in\mathbb Z}\) are orthonormal: integrating \(e^{i(j-k)\theta}\) over a full period gives \(1\) when \(j=k\) and \(0\) otherwise. Since \(m_{\mathbb T}(\mathbb T)=1\), the Cauchy–Schwarz inequality implies that every \(f\in L^2(\mathbb T,m_{\mathbb T})\) is integrable. Thus the following coefficients are finite and do not depend on the representative chosen for \(f\).

Definition: For \(f\in L^2(\mathbb T,m_{\mathbb T})\) and \(k\in\mathbb Z\), its \(k\)-th Fourier coefficient is \(\widehat f(k)=\langle f,e_k\rangle=\int_{\mathbb T}f(\theta)e^{-ik\theta}\,dm_{\mathbb T}(\theta)\). For an integer \(N\ge0\), define the degree-\(N\) trigonometric polynomial space \(T_N=\operatorname{span}\{e_k:-N\le k\le N\}\) and the \(N\)-th symmetric Fourier partial sum \(S_Nf=\sum_{k=-N}^{N}\widehat f(k)e_k\). These are elements of \(L^2(\mathbb T,m_{\mathbb T})\); identities between them are \(m_{\mathbb T}\)-a.e. identities.

Why the Partial Sum Is an Orthogonal Projection

A vector is orthogonal to a subspace when its inner product with every vector in that subspace is zero. An orthogonal projection onto a subspace is an element of the subspace whose difference from the original vector is orthogonal to the whole subspace. Here \(S_Nf\) belongs to \(T_N\) by its definition. The key calculation is that the residual \(f-S_Nf\) is orthogonal to every basis function spanning \(T_N\).

Theorem: For every \(f\in L^2(\mathbb T,m_{\mathbb T})\) and every integer \(N\ge0\), \(S_Nf\in T_N\) and \(\langle f-S_Nf,q\rangle=0\) for every \(q\in T_N\). Consequently, \(S_Nf\) is the orthogonal projection of \(f\) onto \(T_N\).

Proof. By definition, \(S_Nf\) is a finite linear combination of \(e_k\) with \(-N\le k\le N\), so it lies in \(T_N\). Fix \(j\) with \(-N\le j\le N\). Orthonormality gives \(\langle e_k,e_j\rangle=1\) if \(k=j\) and \(0\) otherwise. Therefore \(\langle S_Nf,e_j\rangle=\sum_{k=-N}^{N}\widehat f(k)\langle e_k,e_j\rangle=\widehat f(j)=\langle f,e_j\rangle\). Subtracting yields \(\langle f-S_Nf,e_j\rangle=0\). Every \(q\in T_N\) has the form \(q=\sum_{j=-N}^{N}b_je_j\) for complex numbers \(b_j\). Conjugate linearity in the second argument then gives \(\langle f-S_Nf,q\rangle=\sum_{j=-N}^{N}\overline{b_j}\langle f-S_Nf,e_j\rangle=0\). The argument includes \(N=0\), when there is just the constant basis function, and also \(f=0\). This is precisely the orthogonality condition for the projection. \(\square\)

Orthogonality yields a Pythagorean identity for every competitor, not only for the partial sum itself. It is this identity that proves the best-approximation claim.

Theorem (Best approximation): If \(f\in L^2(\mathbb T,m_{\mathbb T})\), \(N\ge0\), and \(q\in T_N\), then \(\|f-q\|_2^2=\|f-S_Nf\|_2^2+\|S_Nf-q\|_2^2\). Consequently, \(\|f-S_Nf\|_2\le\|f-q\|_2\) for every \(q\in T_N\), with equality if and only if \(q=S_Nf\) as an element of \(L^2\).

Proof. Write \(f-q=(f-S_Nf)+(S_Nf-q)\). The first summand is orthogonal to \(T_N\) by the preceding theorem, and the second belongs to \(T_N\). Expanding the squared norm using the inner product gives \(\|f-q\|_2^2=\|f-S_Nf\|_2^2+\|S_Nf-q\|_2^2+2\operatorname{Re}\langle f-S_Nf,S_Nf-q\rangle\). The inner product in the last term is zero, so the stated identity follows. The last squared norm is nonnegative, giving the inequality. Equality holds exactly when \(\|S_Nf-q\|_2^2=0\), which means that \(q=S_Nf\) \(m_{\mathbb T}\)-a.e., or equivalently that they are the same element of \(L^2\). This also proves uniqueness of the best approximation, including when the best approximation is zero. \(\square\)

Worked Fourier Projections

Worked Example: Projecting an Indicator Function onto \(T_1\)

Let \(A=\{\theta\in\mathbb T:\cos\theta>0\}\) and \(f=\chi_A\). Compute \(S_1f\) and its squared approximation error. Endpoints where \(\cos\theta=0\) are excluded from \(A\); changing their membership would not affect any \(L^2\) result because they form a finite null set.

Represent \(A\) by \((-\pi/2,\pi/2)\) in one period. Its normalized measure is \((1/(2\pi))\pi=1/2\), so \(\widehat f(0)=1/2\). For \(k\ne0\), direct integration gives \(\widehat f(k)=\frac{1}{2\pi}\int_{-\pi/2}^{\pi/2}e^{-ik\theta}\,d\theta=\frac{\sin(k\pi/2)}{\pi k}\). In particular, \(\widehat f(1)=\widehat f(-1)=1/\pi\). Hence \(S_1f=1/2+(2/\pi)\cos\theta\).

For the error, set \(c=2/\pi\). On \(A\), \(f-S_1f=1/2-c\cos\theta\); on \(A^c\), \(f-S_1f=-1/2-c\cos\theta\). The constant-square contribution to the integral is \(1/4\). Also, \(\int_A\cos\theta\,dm_{\mathbb T}=1/\pi\) and \(\int_{A^c}\cos\theta\,dm_{\mathbb T}=-1/\pi\). Thus the linear contribution is \(-c\int_A\cos\theta\,dm_{\mathbb T}+c\int_{A^c}\cos\theta\,dm_{\mathbb T}=-c/\pi-c/\pi=-4/\pi^2\). The quadratic contribution is \(c^2\int_{\mathbb T}\cos^2\theta\,dm_{\mathbb T}=(4/\pi^2)(1/2)=2/\pi^2\). Combining the terms gives \(\|f-S_1f\|_2^2=1/4-2/\pi^2\).

Check: \(\|f\|_2^2=\int\chi_A\,dm_{\mathbb T}=1/2\), while orthonormality gives \(\|S_1f\|_2^2=(1/2)^2+(1/\pi)^2+(1/\pi)^2=1/4+2/\pi^2\). Since \(f-S_1f\) is orthogonal to \(S_1f\), subtracting gives \(\|f-S_1f\|_2^2=1/2-(1/4+2/\pi^2)=1/4-2/\pi^2\), agreeing with the direct calculation.

Worked Example: Comparing Competitors in \(T_1\)

Let \(f(\theta)=1+2e^{i\theta}-i e^{-i\theta}+\frac12e^{2i\theta}+\frac12e^{-2i\theta}\). Orthonormality shows that its coefficients at \(k=0,1,-1,2,-2\) are respectively \(1,2,-i,1/2,1/2\), and all other coefficients vanish. Therefore \(S_1f=1+2e^{i\theta}-i e^{-i\theta}\), and \(f-S_1f=\frac12e^{2i\theta}+\frac12e^{-2i\theta}\). Its squared norm is \((1/2)^2+(1/2)^2=1/2\).

First consider \(q_{\mathrm{out}}=S_1f+3e^{2i\theta}\). This is not in \(T_1\), because it has a nonzero degree-two coefficient. Direct calculation, without applying the best-approximation theorem to this inadmissible competitor, gives \(f-q_{\mathrm{out}}=(-5/2)e^{2i\theta}+(1/2)e^{-2i\theta}\). Thus \(\|f-q_{\mathrm{out}}\|_2^2=25/4+1/4=13/2\).

Now use the valid competitor \(q=S_1f+3e^{i\theta}=1+5e^{i\theta}-i e^{-i\theta}\), which belongs to \(T_1\). Then \(f-q=\frac12e^{2i\theta}+\frac12e^{-2i\theta}-3e^{i\theta}\), so orthonormality gives \(\|f-q\|_2^2=1/4+1/4+9=19/2\). Check: the best-approximation identity for this valid \(q\) gives \(\|f-q\|_2^2=\|f-S_1f\|_2^2+\|S_1f-q\|_2^2=1/2+9=19/2\). The projection itself has squared error \(1/2\), no larger than this competitor’s.

Worked Example: A Real-Valued Function and a Competing Polynomial

Take \(f(\theta)=3+2\cos\theta-4\sin(2\theta)+\cos(3\theta)\) and \(N=1\). The terms \(3+2\cos\theta\) belong to \(T_1\). The remaining terms have frequencies \(2,-2,3,-3\), so their coefficients at frequencies \(\pm2\) have absolute value \(2\) each (from \(-4\sin(2\theta)\)), and those at \(\pm3\) have absolute value \(1/2\) each (from \(\cos(3\theta)\)). Consequently \(S_1f=3+2\cos\theta\), and the residual has squared norm \(4+4+1/4+1/4=17/2\).

As a direct norm check, \(\|f\|_2^2=9+2+8+1/2=39/2\): the constant has squared norm \(9\), \(2\cos\theta\) has squared norm \(4(1/2)=2\), \(-4\sin(2\theta)\) has squared norm \(16(1/2)=8\), and \(\cos(3\theta)\) has squared norm \(1/2\). These components are mutually orthogonal. Also \(\|S_1f\|_2^2=9+2=11\), so \(\|f\|_2^2-\|S_1f\|_2^2=39/2-11=17/2\), as required.

For the valid competitor \(q=3+\cos\theta\in T_1\), the difference \(S_1f-q=\cos\theta\) has squared norm \(1/2\). The Pythagorean identity therefore gives \(\|f-q\|_2^2=17/2+1/2=9\). This verifies concretely that the competitor is worse than \(S_1f\).

Common Pitfalls and the Scope of the Result

Do not miscount the cross term. In the indicator example, the two integrals over \(A\) and \(A^c\) have opposite signs. The linear contribution is \(-c(1/\pi)+c(-1/\pi)=-2c/\pi=-4/\pi^2\), not \(-2/\pi^2\). Combining the correct constant, linear, and quadratic terms gives \(1/4-4/\pi^2+2/\pi^2=1/4-2/\pi^2\).

Do not apply the best-approximation identity outside the subspace. The identity requires \(q\in T_N\), because its proof uses \(S_Nf-q\in T_N\). In the second example, \(S_1f+3e^{2i\theta}\notin T_1\); its error is \(13/2\), found by direct coefficient calculation. The valid competitor \(S_1f+3e^{i\theta}\in T_1\) has error \(19/2\), consistent with the identity. Membership must be checked before using the theorem.

For each fixed \(N\), the result identifies the unique least-squares trigonometric polynomial of degree at most \(N\). It does not by itself assert that \(S_Nf\) converges to \(f\) as \(N\) tends to infinity, nor that convergence is pointwise or uniform. Those are separate convergence questions; the projection and best-approximation statements here concern one fixed finite-dimensional space at a time.

Check Your Understanding

Use the normalized measure on \(\mathbb T\) and distinguish carefully between competitors that belong to \(T_N\) and those that do not.

  1. For \(f(\theta)=2+e^{2i\theta}\), compute \(S_0f\) and \(\|f-S_0f\|_2^2\).
  2. Explain why the error decomposition for \(q\in T_N\) has no cross term, and identify the orthogonality used.
  3. For the function in the third worked example, compute the squared error of \(q=3\) and verify the result using the best-approximation identity.
  4. If \(q\in T_N\) has the same error as \(S_Nf\), what does the Pythagorean identity imply about \(q\) in \(L^2\)?
  5. Why does the best-approximation theorem for each fixed \(N\) not alone establish pointwise convergence of Fourier partial sums?