Suppose that MM is an
mm-dimensional subspace with basis
x1…xm
x1
…
xm
We transform this into an orthonormal basis
q1…qm
q1
…
qm
for MM via
-
Set
y1=x1
y1
x1
and
q1=y1∥y1∥
q1
y1
y1
-
y2=x2
y2
x2
minus the projection of
x2x2
onto the line spanned by
q1q1. That is
y2=x2-q1q1Tq1-1q1Tx2=x2-q1q1Tx2
y2
x2
q1
q1
q1
q1
x2
x2
q1
q1
x2
Set
q2=y2∥y2∥
q2
y2
y2
and
Q2=q1q2
Q2
q1
q2
.
-
y3=x3
y3
x3
minus the projection of x3x3
onto the plane spanned by q1q1
and q2q2. That is
y3=x3-Q2Q2TQ2-1Q2Tx3=-q2q2Tx3
y3
x3
Q2
Q2
Q2
Q2
x3
x3
q1
q1
x3
q2
q2
x3
Set
q3=y3∥y3∥
q3
y3
y3
and
Q3=q1q2q3
Q3
q1
q2
q3
.
Continue in this fashion through step
(mm).
-
(mm)
ym=xm
ym
xm
minus its projection onto the subspace spanned by the columns of
Q
m
−
1
Q
m
−
1
.
That is
ym=xm-
Q
m
−
1
Q
m
−
1
T
Q
m
−
1
-1
Q
m
−
1
Txm
=xm-∑j=1m-1qjqjTxm
ym
xm
Q
m
−
1
Q
m
−
1
Q
m
−
1
Q
m
−
1
xm
xm
j
1
m
1
qj
qj
xm
Set
qm=ym∥ym∥
qm
ym
ym
To take a simple example, let us orthogonalize the following basis for
ℝ3
3
,
x1=100
x2=110
x3=111
x1
1
0
0
x2
1
1
0
x3
1
1
1
-
q1=y1=x1
q1
y1
x1
.
-
y2=x2-q1q1Tx2=010T
y2
x2
q1
q1
x2
0
1
0
and so,
q2=y2
q2
y2
.
-
y3=-q2q2Tx3=001T
y3
x3
q1
q1
x3
q2
q2
x3
0
0
1
and so,
q3=y3
q3
y3
.
We have arrived at
q1=100
q2=010
q3=001
q1
1
0
0
q2
0
1
0
q3
0
0
1
.
Once the idea is grasped the actual calculations are best left
to a machine. Matlab accomplishes this via the orth
command. Its implementation is a bit more sophisticated than a
blind run through our steps (1) through
(
mm). As a result, there is no
guarantee that it will return the same basis. For example
>>X=[1 1 1;0 1 1 ;0 0 1];
>>Q=orth(X)
Q=
0.7370 -0.5910 0.3280
0.5910 0.3280 -0.7370
0.3280 0.7370 0.5910
This ambiguity does not bother us, for one orthogonal basis is as
good as another. Let us put this into practice, via (10.8).