Chapter 4 - Inner Product Spaces
Chapter 4 - Inner Product Spaces
Chapter 4 - Inner Product Spaces
0 b θ
b
a
Definition 4.2 If a, b ∈ Rn are non-zero then the angle θ
between a and b is defined by
a·b
cos θ = , θ ∈ [0, π].
||a|| ||b||
Y = {y ∈ Rp : y · x = 0 for all x ∈ X}
||a + b||2 = (a + b) · (a + b)
= ||a||2 + 2a · b + ||b||2
≤ ||a||2 + 2||a|| ||b|| + ||b||2
(by Cauchy-Schwarz)
= (||a|| + ||b||)2 .
hX, Y i = tr(X ∗ Y )
and hence
q X
X p
tr(X ∗ X) = |xki |2 ≥ 0 .
i=1 k=1
hu, vi = u1 v1 − u1 v2 − u2 v1 + 7u2 v2
! !
1 −1 v1
= (u1 u2 )
−1 7 v2
= uT Av, A symmetric.
Then hu, ui = u21 − 2u1 u2 + 7u22
= (u1 − u2 )2 + 6u22
1 2
|ak bk | ≤ (ak + b2k ) .
2 P∞
Then the comparison test implies that k=1 ak bk is absolutely
convergent, hence converges, so the definition does make
sense.
MATH2601 Slides, 2021 – p. 17
Lemma 4.7 Let V be an inner product space. Then for
u, v, w ∈ V and α ∈ C:
a) ||u|| > 0 if and only if u 6= 0.
b) hu + v, wi = hu, wi + hv, wi.
c) hαu, vi = αhu, vi and ||αu|| = |α| ||u||.
d) hx, ui = 0 for all u if and only if x = 0.
e) |hu, vi| ≤ ||u|| ||v|| (Cauchy-Schwarz inequality)
f) ||u + v|| ≤ ||u|| + ||v|| (the triangle inequality).
Proof: Parts a) to d) are routine EXERCISES, and f) will follow
from e) as in the proof of theorem 4.5 with one minor
modification.
Cauchy-Schwarz requires a slightly different argument, but as
before we assume neither u nor v are zero.
A − 2Bλ + Cλ2 ≥ 0 .
B 2 ≤ AC
is zero if p 6= q . So
hv, ui
projv (u) = v.
hv, vi
Note: u − αv ⊥ v ⇐⇒ u − αv = u − projv u.
The picture in R2 is:
u
0 b
projv u v
Note that the projection operator is linear (EXERCISE):
And so
2
projg (f ) = (−1)p+1 sin(px).
p
Some of you will recognise the sort of calculation we are doing
here: hg, f i is a Fourier coefficent (up to a scale factor).
We can push this idea on a little more. . .
hvi , vi
Thus αi = and so αi vi = projvi v.
hvi , vi i
The second part follows trivially.
MATH2601 Slides, 2021 – p. 29
Corollory 4.9 If {e1 , . . . , en } is an orthonormal basis for V
Xn
then v = hei , viei .
i=1
w1 = v 1
w2 = v2 − projw1 (v2 )
w3 = v3 − projw1 (v3 ) − projw2 (v3 )
.. .. ..
. . ·················· .
k
X
wk+1 = vk+1 − projwj (vk+1 )
j=1
v 1 = w1
w1
We now have to prove that {w1 , . . . , wp } is an orthogonal
basis, which we do by induction:
Let P (k) be the proposition that
span{v1 , . . . , vk } = span{w1 , . . . , wk }
and wk ⊥ wi , 1 ≤ i ≤ k − 1
span{v1 , . . . , vj } = span{w1 , . . . , wj }
and wj ⊥ wi , 1 ≤ i ≤ j − 1
k−1
X hwi , vk i
Now wk = v k − wi and as the vi are l.i.,
hwi , wi i
i=1
wk ∈
/ span{v1 , . . . , vk−1 } = span{w1 , . . . , wk−1 } .
As wk 6= 0,
V = W ⊕ W⊥ and (W ⊥ )⊥ = W .
B = {v1 , . . . , vk , . . . , vn }.
X ∩ W = {0 }, X ⊕W =V and X ⊥ W
So X ≤ W ⊥ .
But if v ∈ W ⊥ then hvi , vi = 0 for 1 ≤ i ≤ k , and so
Xn
v= αi vi for some αi , and hence v ∈ X , so W ⊥ ≤ X .
i=k+1
Thus W ⊥ = X and V = W ⊕ W ⊥ .
By symmetry (W ⊥ )⊥ = W .
v = a + b, a ∈ W, b ∈ W ⊥
In the same way that projection onto a vector is linear, for any
W ≤ V , projW is a linear map on V .
It follows from the corollary that im(projW ) = W and
ker(projW ) = W ⊥ (in finite dimensions at least).
2 2
3 + 24t − 10t
35
and so t is suitable.
MATH2601 Slides, 2021 – p. 47
Uniqueness follows from definiteness as usual: if s is another
such vector then we have ht, vi = hs, vi for all v ∈ V .
But then ht − s, vi = 0 for all v ∈ V , and so t − s = 0.
∗ 5 15 2
T (q0 + q1 t) = − q1 + 3q0 t + q1 t .
2 2
Since T and the inner product are linear, ω is linear and hence
is in V ∗ .
Now define T ∗ (w) = ω ♯ ∈ V , so that hT ∗ (w), vi = hw, T (v)i.
Now T ∗ is linear as for all v ∈ V
hv, wi = hT ∗ ◦ T (v), wi
v1 = ||w1 ||q1
k−1
X
vk = hqj , vk iqj + ||wk ||qk , 2 ≤ k ≤ q.
j=1
So that
A = v1 ... · · · ... vq
||w1 || hq1 , v2 i . . . hq1 , vq i
||w || . . . hq , v i
.. .. 2 2 q
= q1 . · · · . qq . .
. . .
.
||wq ||
= QR
and
√ √ √ √ √
1 1 0 1/ 3 2/ 6 0 3 1/ 3 −i/ 3
√ √ √ √ √
i 0 1 = i/ 3 −i/ 6 1/ 2 6/3 i/ 6
√ √ √ √
1 0 0 1/ 3 −1/ 6 i/ 2 1/ 2
SOLUTION:
√ √ √ √ √ √
1/ 2 1/ 6 1/ 12 1/2 2 1/ 2 1/ 2
√ √ √
−1/ 2 1/ 6 1/ 12 √ √
1/2 0 6/2 1/ 6
A= √ √ √
0 2/ 6 −1/ 12 −1/2 0 0 2/ 3
√
0 0 3/ 12 −1/2 0 0 0
SOLUTION:
2i 2 −i 3 4i 0
1
A = 1 2i −2 0 1 i
3
2 i 2 0 0 2
We have proved:
Theorem 4.25 A least squares solution to the system of
equations Ax = b is a solution to the equations A∗ Ax = A∗ b
which are known as the normal equations.
b b
! ! !
4 10 α 7
Normal equations = .
10 30 β 14
Line of best fit is y = 3.5 − 0.7x.
W = {x ∈ R3 : 2x1 + 3x2 − x3 = 0} ≤ R3 .
b b
Answer: y = − 41 + 61
20 t − 3 2
4t
We could go on of course: note that there will be a cubic going
exactly through these four points.
I will leave you to prove that if the original equations have a
solution, the least squares method will give it.
MATH2601 Slides, 2021 – p. 77
A practical difficulty with the least squares procedure, if we
calculate with decimal approximations, is that A∗ A may be
ill–conditioned, meaning that numerical inversion or
row-reduction of the matrix incurs large rounding errors.
It may improve matters if we make use of a QR factorisation for
A, but the Gram-Schmidt method can also throw up numerical
issues, (e.g. subtracting two numbers that are close).
There is a modified Gram-Schmidt process that minimises
these issues, but there is a method of finding a QR
factorisation called the Householder algorithm that is
purposely designed to avoid all these problems. It is rather
clumsy for hand calculations though.
I will leave it to you to investigate these matters if you are
interested, but it is important to see how we could use a QR
factorisation to find least squares solutions.
R∗ Q∗ QRx = R∗ Q∗ b so that R∗ Rx = R∗ Q∗ b
Rx = Q∗ b