LINEAR-ALGEBRA ยท Interactive Practice | Unit 23 ยท Video 4

From Dot Products to Fourier: Orthonormal Bases

IKey Formulas

Formula Name Description
qiTqj=ฮดijq_i^T q_j = \delta_{ij} Orthonormality 11 if i=ji=j, else 00
xk=qkTvx_k = q_k^T v Coordinate extraction Dot product with basis vector
QTQ=Iโ‡’Qโˆ’1=QTQ^T Q = I \Rightarrow Q^{-1} = Q^T Inverse trick True for square orthonormal QQ
โŸจf,gโŸฉ=โˆซ02ฯ€f(x)g(x)โ€‰dx\langle f, g \rangle = \int_0^{2\pi} f(x)g(x)\, dx Function inner product Replace sum with integral
ak=1ฯ€โˆซ02ฯ€f(x)cosโก(kx)โ€‰dxa_k = \frac{1}{\pi}\int_0^{2\pi} f(x)\cos(kx)\, dx Fourier coefficient Project ff onto cosโก(kx)\cos(kx)

IIVisualization 1 โ€” Coordinates as Dot Products

For an orthonormal basis, each coordinate is a single dot product: xk=qkTvx_k = q_k^{T} v.

๐Ÿ’ก Challenge: drag vv, then rotate the basis until q1q_1 lines up with it โ€” now x2=0x_2 = 0 and vv collapses to a single coordinate.

IIIVisualization 2 โ€” Orthogonality of Sine and Cosine

Distinct Fourier modes are orthogonal: the positive and negative areas of their product cancel to zero.

๐Ÿ’ก This is the same orthogonality that gave qiTqj=0q_i^{T} q_j = 0 for vectors โ€” now lifted from finite sums to integrals over functions.

IVVisualization 3 โ€” Building a Square Wave

Add orthogonal sine modes one at a time and a jagged square wave emerges from smooth curves.

๐Ÿ’ก Each mode is a projection onto one orthogonal direction โ€” the same trick as xk=qkTvx_k = q_k^{T} v, now giving bk=1ฯ€โˆซ02ฯ€f(x)sinโก(kx)โ€‰dxb_k = \frac{1}{\pi}\int_0^{2\pi} f(x)\sin(kx)\,dx.

VQuiz Questions

Question 1

Let {q1,q2}\{q_1, q_2\} be an orthonormal basis with q1=(10)q_1 = \begin{pmatrix} 1 \\ 0 \end{pmatrix}, q2=(01)q_2 = \begin{pmatrix} 0 \\ 1 \end{pmatrix}, and let v=(3โˆ’4)v = \begin{pmatrix} 3 \\ -4 \end{pmatrix}.

What is the coordinate x1=q1Tvx_1 = q_1^T v?

โœ… Correct! x1=q1Tv=3x_1 = q_1^T v = 3.

โŒ Not quite. Compute the dot product q1Tvq_1^T v entry by entry.

Show solution

Solution:

The trick for orthonormal bases is xk=qkTvx_k = q_k^T v.

x1=q1Tv=(10)(3โˆ’4)=(1)(3)+(0)(โˆ’4)=3.x_1 = q_1^T v = \begin{pmatrix} 1 & 0 \end{pmatrix} \begin{pmatrix} 3 \\ -4 \end{pmatrix} = (1)(3) + (0)(-4) = 3.

No row reduction needed โ€” just a dot product.

Question 2

True or False: If QQ is a square matrix whose columns form an orthonormal basis, then Qโˆ’1=QTQ^{-1} = Q^T.

โœ… Correct! Square + orthonormal columns โŸน Qโˆ’1=QTQ^{-1} = Q^T.

โŒ Not quite. Re-read the squareness condition โ€” it makes QTQ=IQ^T Q = I enough.

Show solution

Solution:

Stacking the orthonormality conditions qiTqj=ฮดijq_i^T q_j = \delta_{ij} as a matrix product gives QTQ=I.Q^T Q = I.

For a square matrix, this single identity is enough to conclude Qโˆ’1=QTQ^{-1} = Q^T (both products QTQQ^T Q and QQTQ Q^T equal II).

For a non-square QQ with orthonormal columns, QTQ=IQ^T Q = I still holds but QQTโ‰ IQ Q^T \neq I in general, so QQ has no two-sided inverse. The question specifies square QQ, so the statement is True.

Question 3

Consider the inner product โŸจf,gโŸฉ=โˆซ02ฯ€f(x)โ€‰g(x)โ€‰dx\displaystyle \langle f, g \rangle = \int_0^{2\pi} f(x)\, g(x)\, dx.

Which of the following pairs is NOT orthogonal under this inner product?

Select the pair that is NOT orthogonal:

โœ… Correct! โˆซ02ฯ€sinโก2(x)โ€‰dx=ฯ€\int_0^{2\pi}\sin^2(x)\,dx = \pi, the squared norm of sinโก(x)\sin(x).

โŒ Not quite. Three of these pairs integrate to zero โ€” find the one that doesn't.

Show solution

Solution:

Two functions are orthogonal iff their inner product is 00.

  • โˆซ02ฯ€sinโก(x)cosโก(x)โ€‰dx=12โˆซ02ฯ€sinโก(2x)โ€‰dx=0\int_0^{2\pi} \sin(x)\cos(x)\, dx = \tfrac{1}{2}\int_0^{2\pi}\sin(2x)\,dx = 0. Orthogonal.
  • โˆซ02ฯ€cosโก(x)cosโก(2x)โ€‰dx=0\int_0^{2\pi} \cos(x)\cos(2x)\, dx = 0 (Fourier basis). Orthogonal.
  • โˆซ02ฯ€1โ‹…cosโก(x)โ€‰dx=0\int_0^{2\pi} 1 \cdot \cos(x)\, dx = 0. Orthogonal.
  • โˆซ02ฯ€sinโก2(x)โ€‰dx=ฯ€โ‰ 0\int_0^{2\pi} \sin^2(x)\, dx = \pi \neq 0. Not orthogonal โ€” this is a function paired with itself, giving its squared norm.

So sinโก(x)\sin(x) and sinโก(x)\sin(x) is the non-orthogonal pair.

Question 4

The Fourier coefficient formula is ak=1ฯ€โˆซ02ฯ€f(x)cosโก(kx)โ€‰dx.a_k = \frac{1}{\pi}\int_0^{2\pi} f(x)\cos(kx)\, dx.

What is the role of the prefactor 1ฯ€\dfrac{1}{\pi}?

โœ… Correct! The 1/ฯ€1/\pi exactly compensates for โˆฅcosโก(kx)โˆฅ2=ฯ€\|\cos(kx)\|^2 = \pi.

โŒ Not quite. Think about โˆซ02ฯ€cosโก2(kx)โ€‰dx\int_0^{2\pi}\cos^2(kx)\,dx โ€” it's the squared norm of the basis function.

Show solution

Solution:

When we apply the inner-product trick to f(x)=a0+โˆ‘k(akcosโก(kx)+bksinโก(kx))f(x) = a_0 + \sum_k(a_k\cos(kx) + b_k\sin(kx)) and multiply by cosโก(kx)\cos(kx) before integrating, every cross term vanishes by orthogonality. The one surviving term is

โˆซ02ฯ€f(x)cosโก(kx)โ€‰dx=akโˆซ02ฯ€cosโก2(kx)โ€‰dx=akโ‹…ฯ€.\int_0^{2\pi} f(x)\cos(kx)\, dx = a_k \int_0^{2\pi} \cos^2(kx)\, dx = a_k \cdot \pi.

So ak=1ฯ€โˆซ02ฯ€f(x)cosโก(kx)โ€‰dxa_k = \tfrac{1}{\pi}\int_0^{2\pi} f(x)\cos(kx)\, dx.

The Fourier basis is orthogonal but not orthonormal โ€” each cosโก(kx)\cos(kx) has squared norm ฯ€\pi, not 11. The 1/ฯ€1/\pi prefactor is precisely the normalization fix. If we rescaled each basis function by 1/ฯ€1/\sqrt{\pi}, we'd get a true orthonormal basis and the prefactor would disappear.

Solved: 0 / 4