MATH307 April 2013
Work in progress: this question page is incomplete, there might be mistakes in the material you are seeing here.
• Q1 (a) • Q1 (b) • Q1 (c) • Q1 (d) • Q2 (a) • Q2 (b) • Q2 (c) • Q2 (d) • Q2 (e) • Q2 (f) • Q3 (a) • Q3 (b) • Q3 (c) • Q4 (a) • Q4 (b) • QS201 5(a) • QS201 5(b) • QS201 5(c) • QS201 6(a) • QS201 6(b) • QS201 6(c) • QS201 6(d) • QS201 7(a) • QS201 7(b) • QS201 7(c) • QS202 5(a) • QS202 5(b) • QS202 5(c) • QS202 5(d) • QS202 6(a) • QS202 6(b) • QS202 7(a) • QS202 7(b) • QS202 7(c) • QS202 7(d) • QS202 7(e) •
Question 04 (b)
Let S be the subspace of spanned by , and . Given the MATLAB/Octave calculation
> rref([1 2 4; 1 -1 1; 1 -1 -1])
1 0 2
0 1 1
0 0 0
(b) Write down the MATLAB/Octave commands that find the vector in S closest to
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!
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.
- If you are stuck on a problem: Read the solution slowly and as soon as you feel you could finish the problem on your own, hide it and work on the problem. Come back later to the solution if you are stuck or if you want to check your work.
- If you want to check your work: Don't only focus on the answer, problems are mostly marked for the work you do, make sure you understand all the steps that were required to complete the problem and see if you made mistakes or forgot some aspects. Your goal is to check that your mental process was correct, not only the result.
Found a typo? Is this solution unclear? Let us know here.
Please rate my easiness! It's quick and helps everyone guide their studies.
Vector in S closest to means minimizing .
This will happen when is the projection of b onto , that is,
Thus, MATLAB commands are following
> P=[1 0 0; 0 0.5 0.5; 0 0.5 0.5]
> b=[1; 0; 0]
I got P in (a) as follows.
We are given and its reduced row echelon form
Since column 1 and column 2 are pivot columns, we take corresponding columns of A.
Those are and , and they are linearly independent.
So, we define a new matrix
Projection matrix is given by
So, if we substitute and , we get