FINDING ORTHOGONAL BASES WITH FEWER SQUARE ROOTS

```FINDING ORTHOGONAL BASES WITH FEWER SQUARE ROOTS
As presented in your textbook, finding orthogonal bases involves a lot of computations with
square roots. This is fine if you are using a computer, and if round off error isn’t a big deal for
you. But if either (1) you actually want to do this by hand or (2) you are doing a very large
computational example, and don’t want to introduce more sources of error than necessary, then
you might want to know the following method. In this method, we first make all the vectors at
right angles to each other, and only fix the lengths at the last step.
We first discuss the following situation: Suppose that v1 , v2 , . . . , vk are orthogonal vectors,
meaning that vi &middot; vj = 0 for i 6= j. However, suppose that they are not orthonormal, meaning that
vi &middot; vi is not 1. Let V = Span(v1 , v2 , . . . , vk ). What is the formula for the orthogonal projection of
w onto V ?
I claim that it is
v2 &middot; w
vk &middot; w
v1 &middot; w
v1 +
v2 + &middot; &middot; &middot; +
vk .
v1 &middot; v1
v2 &middot; v2
vk &middot; vk
Notice that, if the vi do have length 1, then all the denominators are 1 and this becomes the formula
that we saw in class and in the textbook.
To see that this works, let u be given by the above formula; we must check that w − u is
perpendicular to V . We compute
vk &middot;w
v2 &middot;w
&middot;w
v
&middot;
v
+
v
&middot;
v
+
&middot;
&middot;
&middot;
+
v
&middot;
v
(w − u) &middot; vj = w &middot; vj − vv11&middot;v
1
j
j
j
v2 &middot;v2 2
vk&middot;vk k
1
vj &middot;w
= w &middot; vj − 0 + 0 + &middot; &middot; &middot; + vj &middot;vj vj &middot; vj + &middot; &middot; &middot; + 0
= w &middot; vj − w &middot; vj = 0
Now, let’s see how we use this. Start with nonzero vectors v1 , v2 , . . . , vk forming a basis of V .
We want to find an orthonormal basis of V . Here is what we do.
u1
u2
u3
&middot;&middot;&middot;
uk
= v1
= v2 −
= v3 −
v2 &middot;u1
u1 &middot;u1 u1
v3 &middot;u1
u1 &middot;u1 u1
−
v3 &middot;u2
u2 &middot;u2 u2
= vk −
vk &middot;u1
u1 &middot;u1 u1
−
vk &middot;u2
u2 &middot;u2 u2
− &middot;&middot;&middot; −
vk &middot;uk−1
uk−1 &middot;uk−1 uk−1 .
Now the uk are a basis for V , and they are orthogonal, but they are not orthonormal. So take
√
wi = ui / ui &middot; ui .
The wi are our orthonormal basis.
If you try doing any computation by hand, you’ll see how much easier it is when you take the
square roots at the last minute.
```