A1437 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A14 · Lesson 37 · Normed and inner-product spaces

Length, angle and projection, for signals as well as vectors

A matched-filter receiver correlates the incoming waveform with a template; a Fourier coefficient correlates a signal with a sinusoid; least-squares fitting finds the closest combination of basis signals. All three are the same geometry: an inner product that measures how much two signals point the same way, a norm that measures size (for signals, the square root of energy), and orthogonal projection, which finds the best approximation. Once signals are vectors in an inner-product space, everything from A7's linear algebra applies to them, with integrals in place of sums.

  • The solid line is f(x) = x on [−π, π]; the dashed curve is asin⁡x. The readout is the squared error ‖f−asin⁡x‖2=∫−ππ(x−asin⁡x)2dx.
  • Move a: the error is a parabola in a, smallest at a = 2. That's the projection coefficient ⟨f,sin⁡⟩⟨sin⁡,sin⁡⟩=2ππ.
  • At the best a, the leftover error is orthogonal to sin x: nothing more of it can be explained by that direction.

Predict

Over one period T, two tones cos⁡(2πf1t) and cos⁡(2πf2t) have inner product ∫0Tcos⁡(2πf1t)cos⁡(2πf2t)dt. When is it zero?

Name it

Norms

A norm on a vector space assigns a length ‖v‖≥0 with ‖v‖=0 only for v = 0, ‖cv‖=|c|‖v‖, and ‖u+v‖≤‖u‖+‖v‖. It gives a metric d(u,v)=‖u−v‖. A complete normed space is a Banach space.

Inner products

An inner product ⟨u,v⟩ is linear in each slot (for real spaces), symmetric, and positive: ⟨v,v⟩>0 for v ≠ 0. It defines a norm ‖v‖=⟨v,v⟩. For functions on [a, b]:

⟨f,g⟩=∫abf(x)g(x)dx,‖f‖2=∫abf2=energy

A complete inner-product space is a Hilbert space; L2 (lesson 40) is the one for signals.

Geometry

  • Cauchy–Schwarz: |⟨u,v⟩|≤‖u‖‖v‖, so cos⁡θ=⟨u,v⟩‖u‖‖v‖ defines an angle.
  • Orthogonal: ⟨u,v⟩=0; then ‖u+v‖2=‖u‖2+‖v‖2 (Pythagoras).
  • Projection: the multiple of e closest to f is ⟨f,e⟩⟨e,e⟩e, and the error is orthogonal to e. For an orthogonal set e1,…,en, project onto each separately and add: that's how Fourier coefficients are computed.

In receivers

A correlator computes ⟨r,s⟩ between the received signal and a template; by Cauchy–Schwarz it's largest when r is a multiple of s, which is why the matched filter maximizes the output signal-to-noise ratio.

Worked example

Project f(x) = x onto sin⁡(kx) on [−π, π].

Show the solution
  1. Inner product with sin⁡kx. ⟨x,sin⁡kx⟩=∫−ππxsin⁡kxdx=2π(−1)k+1k
  2. Norm of sin⁡kx. ⟨sin⁡kx,sin⁡kx⟩=π
  3. The coefficient. Dividing gives 2(−1)k+1k which is 2, −1, 23, ... These are the Fourier sine coefficients of x.
  4. The error with sin⁡x alone. The best approximation by sin⁡x alone leaves a squared error of 2π33−4π=8.10

Answer the coefficient of sin⁡kx is 2(−1)k+1k (2, −1, 23, ...), the Fourier sine coefficients of x.

Worked example

Find the angle between u = (1, 2, 2) and v = (2, 0, 1).

Show the solution
  1. Inner product. ⟨u,v⟩=2+0+2=4
  2. Lengths. ‖u‖=3 and ‖v‖=5.
  3. Angle. cos⁡θ=435=0.596 so θ = 53.4°.

Answer the angle is 53.4°.

Worked example

On [−1, 1] with ⟨f,g⟩=∫fg, orthogonalize 1, x, x² by Gram–Schmidt.

Show the solution
  1. 1 and x. They're already orthogonal, since ∫−11xdx=0.
  2. Project x2 on 1. ⟨x2,1⟩=23 and ⟨1,1⟩=2, so the component along 1 is 2/32=13
  3. Project x2 on x. ⟨x2,x⟩=0, so there's nothing to remove.
  4. Subtract. What's left is x2−13
  5. Recognize it. That's 23P2(x), a multiple of the Legendre polynomial.
  6. In general. Gram–Schmidt on the powers of x always produces the orthogonal polynomials for the chosen inner product: Legendre for this one, Chebyshev with the weight 11−x2.

Answer the orthogonal set is 1, x and x2−13.

Check

What's the coefficient of the best approximation of x by csin⁡(4x) on [−π, π]?

Check

What's cos⁡θ for the vectors (1, 2) and (3, 1)?

Check

What's the energy ∫0Tx(t)2dt of x(t)=1sin⁡(2πt/T) over one period, T = 0.01 s? (Treat x as volts across 1 Ω.)

Write units the way you normally would: 1.5 J, 1500 mJ and 0.0015 kJ are the same answer.

Check

Two tones lasting T = 0.001 s are to be orthogonal. What's the smallest frequency spacing that achieves it (for tones well above that spacing, starting in phase)?

Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.

Check

Vectors have lengths 3 and 4. What's the largest their inner product can be?

Check

A correlation receiver compares the received signal with a template by computing their inner product. Why does the matched template give the largest output for a given signal energy?

Check

Project x2 onto the constants in L2[0,1].

(a)

What is the best constant?

(b)

What is the norm of the residual?

Check

Vectors u and v have lengths a and b and the angle t between them.

Step 1

What is ‖u+v‖2?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Explain why

Why is the best approximation of f by a multiple of e given by the projection ⟨f,e⟩⟨e,e⟩e?

Practice

Keep practicing

9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.