Science:Math Exam Resources/Courses/MATH307/December 2010/Question 02 (e)
• Q1 (a) • Q1 (b) • Q1 (c) • Q1 (d) • Q1 (e) • Q2 (a) • Q2 (b) • Q2 (c) • Q2 (d) • Q2 (e) • Q3 (a) • Q3 (b) • Q3 (c) • Q3 (d) • Q4 (a) • Q4 (b) • Q5 (a) • Q5 (b) • Q5 (c) • Q6 (a) • Q6 (b) • Q6 (c) • Q6 (d) • Q6 (e) • Q6 (f) • Q7 (a) • Q7 (b) • Q7 (c) •
Question 02 (e) 

Suppose that (e) Write down the MATLAB/Octave commands that would compute the projection of onto R(A). 
Make sure you understand the problem fully: What is the question asking you to do? Are there specific conditions or constraints that you should take note of? How will you know if your answer is correct from your work only? Can you rephrase the question in your own words in a way that makes sense to you? 
If you are stuck, check the hint below. Consider it for a while. Does it give you a new idea on how to approach the problem? If so, try it! 
Hint 

The matrix P that projects onto the range of A is given by P = A(A^{T}A)^{1}A^{T}. 
Checking a solution serves two purposes: helping you if, after having used the hint, you still are stuck on the problem; or if you have solved the problem and would like to check your work.

Solution 

Found a typo? Is this solution unclear? Let us know here.
Please rate my easiness! It's quick and helps everyone guide their studies. To begin with, we define the matrix A: A = [1 1 0 1 0; 2 2 1 3 0; 3 3 1 4 1; 4 4 1 5 1]; Then, use the formula for the projection matrix to define P: P = A*inv(A'*A)*A'; Finally, compute the projection of the given vector: result = P*[1; 0; 0; 0] 