Homework due Class 39
1. Let A be the following matrix:
[ 1 2 3 ]
[ 3 4 5 ]
[ 2 1 3 ]
[ 3 3 6 ]
[ 4 6 8 ]

Find a vector v=(x,y,z) which makes Av closest to the vector (1,2,3,4,5). Thus, we want to opimize the following:
[ 1 2 3 ]
[ 3 4 5 ]
[ 2 1 3 ]
[ 3 3 6 ]
[ 4 6 8 ]
*
[ x ]
[ y ]
[ z ]
=
[ 1 ]
[ 2 ]
[ 3 ]
[ 4 ]
[ 5 ]
From the webnotes, (and from class), we can work this problem by letting:
c1 = (1,3,2,3,4)
c2 = (2,4,1,3,6)
c3 = (3,5,3,6,8)
and finding the projection of (1,2,3,4,5) on {c1, c2, and c3}.

First, we will use the Gramm Schmidt Algorithm to find an orthogonal basis of the space spanned by {c1, c2, and c3}.

v1 = c1 = (1,3,2,3,4)


v2 = c2 - [(c2,v1)/(v1,v1)]*v1 = (2,4,1,3,6) - 49/39 * (1,3,2,3,4) = (29/39, 9/39, -59/39, -30/39, 38/39)


Now, we will define a new v2 which is 39*(the old v2) thus, the new v2 = (29,9,-59,-30,38)
v3 = c3 - [(c3,v1)/(v1,v1)]*v1 - [(c3,v2)/(v2,v2)]*v2

= (3,5,3,6,8) - 74/39 * (1,3,2,3,4) - 79/6747 * (29,9,-59,-30,38)

= (132/173, -138/173, -18/173, 114/173, -6/173)

Now, we will define a new v3 which is 173*(the old v3) thus, the new v3 = (132, -138, -18, 114, -6)
Thus,
v1 = c1
v2 = 39*c2 - 49*c1
v3 = 173*c3 - 12802/39*c1 - 79/39*(39*c2 - 49*c1)
= 173*c3 - 79*c2 -229*c1
Now, letting b = (1,2,3,4,5), we will find the proj(b).

proj(b) = [(b,v1)/(v1,v1)]*v1 + [(b,v2)/(v2,v2)]*v2 + [(b,v3)/(v3,v3)]*v3 = 45/39*v1 + (-60)/6747*v2 + 228/49824*v3

We need to represent this as x*c1 + y*c2 + z*c3 Thus, we have:

proj(b) = 45/39*c1 + (-60)/6747*(39*c2 - 49*c1) + 228/49824*(173*c3 - 79*c2 -229*c1)
= 45/39*c1 - 2340/6747*c2 + 2940/6747*c1 + 39444/49824*c3 - 18012/49824*c2 - 52212/49824*c1
= 13/24*c1 - 17/24c2 + 19/24*c3

Thus:
x = 13/24
y = -17/24
z = 19/24