HW#4, solutions to selected problems

2. (a) Let x be a vector in R^n. Let w_1,...,w_m be the rows of A. Then Ax is a vector whose components are the dot products of w_1,...,w_m with x. So x is in N(A) if and only if x is orthogonal to all of w_1,...,w_m. But this holds, by an argument given in class, if and only if x is orthogonal to the span of w_1,...,w_m, which by definition is W.

(b) As sketched in the hint, the RREF of A does not contain a zero row. Hence, again letting m=dim(W), there are n-m free variables, so dim(W^perp)=dim(N(A))=n-m=n-dim(W).

(c) (i) We first show that W is a subset of (W^perp)^perp. Let x be an element of W; we need to show that x is in (W^perp)^perp, i.e. show that if y is in W^perp, then x is orthogonal to y. But this clearly holds because x is in W. (ii) By part (b), dim((W^perp)^perp)=n-dim(W^perp)=n-(n-dim(W))=dim(W). By a homework problem from last week, it follows that W=(W^perp)^perp.

(d) Using part (a), we obtain a basis (-1,-1,1,0), (-1,-2,0,1).

4. (a) Show P_W(x+y)=P_W(x)+P_W(y). We need to show that P_W(x)+P_W(y) satisfies the two requirements that characterize P_W(x+y): namely, we must show that P_W(x)+P_W(y) is in W, and that x+y-P_W(x)-P_W(y) is in W^perp. The first statement holds because P_W(x) and P_W(y) are in W, and W is a subspace. The second holds because x-P_W(x) and y-P_W(y) are in W^perp, and W^perp is a subspace. In a similar manner we can show that P_W(cx)=cP_W(x).

(b) Since P_W(x) is in W, and e_1,...,e_m are a basis for W, we can write P_W(x)=c_1e_1+...+c_me_m for some c_1,...,c_m. Let's solve for c_i. Since x-P_W(x) is in W^perp, we have <x-P_W(x),e_i>=0, so <x,e_i>=<P_W(x),e_i>. But <P_W(x),e_i>=c_1<e_1,e_i>+...+c_m<e_m,e_i>=c_i, because <e_i,e_i>=1 and <e_j,e_i>=0 for i not equal to j.

5. Let w_0=(1,1,1,1), w_1=(x_1,x_2,x_3,x_4), and w_2=(x_1^2,x_2^2,x_3^2,x_4^2), and W=span(w_0,w_1,w_2). To minimize the error, we want to find a,b,c such that aw_2+bw_1+cw_0 is the orthogonal projection of y=(y_1,y_2,y_3,y_4) onto W. To do so we impose the conditions that y-(aw_2+bw_1+cw_0) be orthogonal to w_2, w_1, and w_0. This leads to the system of equations 18a+8b+6c=24, 8a+6b+2c=12, 6a+2b+4c=11. To solve this, we start MATLAB and enter a=[18,8,6,24;8,6,2,12;6,2,4,11], followed by rref(a), and read off the answer (a,b,c)=(.25,1.05,1.85). For this f we have f(-1)=1.05, f(0)=1.85, f(1)=3.15, f(2)=4.95, which seems like a pretty good fit.

7. ||x+y||=||x||+||y|| if and only if one of x,y is a positive multiple of the other. The "if" part is easy, so let's prove the "only if" part. Assume ||x+y||=||x||+||y||. We want to show that one of x,y is a nonnegative multiple of the other. We have ||x+y||^2=||x||^2+||y||^2+2<x,y&rt; and (||x||+||y||^2)=||x||^2+||y||^2+2||x|| ||y||. So for equality to hold in the triangle inequality we must have <x,y>=||x|| ||y||. This implies that equality holds in the Cauchy-Schwarz inequality, and <x,y> is nonnegative. WLOG y is nonzero. (If both vectors are zero it is trivial that one is a nonnegative multiple of the other.) Analyzing the proof of Cauchy-Schwarz, we see that if equality holds, then x equals its projection onto y, so x is a multiple of y. Since <x,y> is nonnegative, x is a nonnegative multiple of y.