Try   HackMD

Find an orthonormal basis of a subspace

Problem

Let

A=[11010011].

Find an orthonormal basis of

ker(A) and the projection matrix onto
ker(A)
.

Thought

We may find a basis by the process in How to solve a system of linear equations?, but the given basis is likely to be not orthogonal. To find an orthonormal basis, we may find a nonzero vector

u1 in the subspace first, and then add the condition
u1x=0
to our equations. For example, it is not hard to find one vector in
ker(A)
, say, for example,
(1,1,0,0)
. Now, we are looking for a vector
u2
such that
Au2=0
and
u1u2=0
. Equivalently,
u2
is a vector in the kernel of

[110100111100],

which can be easily found.

Once we have an orthogonal basis, one may normalize the lengths to make it orthonormal. Moreover, let

U be the matrix whose columns are composed of the vectors in the orthonormal basis, then
U(UU)1U
is the projection matrix. Since the columns of
U
are orthonormal,
UU=I
, and the projection matrix is simply
UU
.

Sample answer

Pick a nonzero vector

vker(A), for example,
u1=(1,1,0,0)
. Then we are looking for a vector
u2
such that
Au2=0
and
u1u2=0
. Equivalently,
u2
is in the kernel of

[110100111100],

whose reduced echelon form is

[1000.50100.50011].

Thus,

u2 can be chosen as
(1,1,2,2)
. By replacing
ui
with
1uiui
for each
i
, we have

u1=12[1100] and u2=110[1122].

Thus,

{u1,u2} is an orthornormal basis of
ker(A)
.

For the projection matrix, we may let

U=[||u1u2||]=[121101211002100210].

Then

P=U(UU)1U=UU=[35251515253515151515252515152525].

Note

By choosing a different

u1, you might get a different
u2
. However, the projection matrix remains the same. Give a try and think about why.

In general, every subspace has an orthonormal basis, which can be found by the Gram–Schmidth process.

This note can be found at Course website > Learning resources.