Find QR Decomposition

This example shows how to find the QR decomposition of a given matrix and then how to project a vector onto the range of said matrix


Problem:

Find the QR decomposition of , where:
Then find the , where:

Solution:

Part 1:
Start by determining and :
Now we use Gram-Schmidt to get the orthonormal basis of . This gives us the following:
So our is:
Now we find to get :
So now our is:
And our is:
Next we find by taking the inner products:
And we get our by simply adding the zero matrix bellow:
Now we have our and our and we are done.

Part 2:
We know that so we get that: