 In this video we present the solution to question number 16 from the practice exam number three for math 2270 in which case we need to find an orthogonal basis for the subspace W spanned by the vectors x1, x2, x3 which are vectors in R4 that we see right here. In order to compute an orthogonal basis we're going to need to use the Graham-Smith procedure for which recall what that looks like. What we're going to do is we're going to take our first vector x or v1 just to be the first vector x2 assuming it's not the zero vector. If the zero vector is there we would discard it. So v1 here is just going to be x1 so it's just going to be 1011 no change is necessary as we do v1. v2 on the other hand what we need to do to compute v2 is we need to take x2 the second vector in our basis right here. We need to subtract from it v1.x2 over v1.v1 times that by v1. Now with real vectors it doesn't matter the order of the dot product but for complex vectors it does the Hermitian product changes to the conjugate if you get the wrong order. So make sure the x2 shows up second in this situation here. So x2 given what it was listed above you get 0203 we're going to subtract from it we have to take some dot products of v1 with x2 which notice v1 is just x1 right so we take the dot product there we're going to get 0 plus 0 plus 0 plus 3 then we have to take the dot product of v1 with itself which are going to get 1 plus 0 plus 1 plus 1 and then we take v1 which is 1011 like so simplifying these calculations again we get 0203 not ready to do anything with that one yet and then we have to subtract what we have here we have a 3 over 3 so that conveniently cancels out we get 1011 so taking the difference we're going to end up with 0 minus 1 which is a negative 1 2 minus 0 which is a 2 0 minus 1 which is a negative 1 and then 3 minus 1 which is a 2 so we end up with the vector negative 1 2 negative 1 2. Okay now the next step was we need to compute v3 v3 right here which by the gradient-smith formula we get that v3 is going to equal x3 minus v1 dot x3 over v1 dot v1 times v1 and then we have to also subtract v2 dot x3 over v2 dot v2 times v2 so let's work that one out x3 like we saw previously is negative 3 negative 1 1 and 5 so we record that down negative 3 negative 1 1 and 5 was the numbers and then we have to subtract from that v1 dot x3 which v1 remember was just x1 so we need to take the dot product of v1 and v3 x3 right there excuse me so if we do that calculation v1 dot x3 that gives us a negative 3 plus 0 plus 1 plus 5 and that should just equal a 3 right so I'm going to record that down below so we end up with a 3 over we're supposed to also compute v1 dot v1 but we did that calculation earlier right that one also turned out to be 3 because you had 1 plus 0 plus 1 plus 1 so you got a 3 right there and then we're going to times it by v1 which we've seen already a couple times 1 0 1 1 like so next we have to take v2 dot x3 which v2 is right here we're going to take negative 1 2 negative 1 and 2 and we can see we can see x3 right here so we take its dot product you're going to get a 3 minus 2 minus 1 plus 10 and in which case that's going to be a 10 right because those things just cancel out right there and then we have to do the dot product of v2 with itself for which you're going to get 1 plus 4 plus 1 plus 4 notice that's going to be 10 over 10 so that also cancels out so that's kind of nice all these coefficients all the foyer coefficients are going to cancel out here and then the next thing we get is going to be just x it's not x excuse me v2 which is negative 1 2 negative 1 and 2 like so so continuing on with v3 right here we see that v3 is going to equal negative 3 negative 1 1 and 5 minus 1 0 1 1 minus we end up with a negative 1 2 negative 1 and 2 so combining this the components there and then over here so you can see it a little better so we're going to take negative 3 minus 1 plus 1 so it's a negative 3 we're then going to take negative 1 minus 0 minus 2 so that's also a negative 3 we're going to take 1 minus 1 that cancels out then plus 1 so it's a plus 1 there and then last we take 5 minus 1 minus 2 so that should just give us a 2 when we're done like so and so this is our x3 so now let's record the orthogonal basis that we computed here so our orthogonal basis is going to consist of the vectors v1 v2 v3 which recall what we have here v1 turned out to be 1 0 1 1 v2 turned out and you know we look down what we have before negative 1 2 negative 1 2 negative 1 2 and then the last one was v3 which we saw here on the very bottom this was negative 3 negative 3 1 and 2 which we then record that down negative 3 negative 3 1 and 2 and so this then gives us an orthogonal basis for w here which you could double check that this thing is orthogonal with each other that's a good thing to double check it's not too hard to calculate if we take the dot product of the first of the first two vectors there you're gonna get negative 1 plus 0 minus 1 plus 2 that's a 0 take the first and the last one you're gonna get negative 3 plus 0 plus 1 plus 2 that's 0 and then the last one right here you're gonna get 3 minus 6 that's a negative 3 minus 1 plus 4 and so assuming we did all that correctly there that should then add up to be 0 as well if you were then asked to compute a orthonormal basis then you'd have to normalize each of these vectors we're not required to do that so the fact that they're not normal vectors is acceptable for us