 In this video we're going to provide the solution to question number four from exam three for math 2270 in which case we're given a vector y which is has the coordinates two three and negative three we're given another vector u whose coordinates are given as zero one negative one and we're told that w is the span of u so we think of w here as the line passing through the origin in the direction of u so it's the line spanned by u so with these with these vectors and vector space specified we're asked to compute the orthogonal projection onto w of the vector y so remember the formula that we're looking for in this example here so this prods w of y we often are going to abbreviate as just y hat because it's kind of a mouthful to to write all that down or to say it all the time in which case the orthogonal projection is going to be computed as the sum where let's say we are w here is the we have the span and we have some orthogonal basis say like ui right here in which case then i ranges from one to n and what we're going to then compute is we're going to take ui dot y so we take we're going to take the inner product of these vectors divided by ui dot ui which of course if this is an orthonormal basis then ui dot ui will always equal one so you can ignore the denominator if it were orthonormal and which and then you also scale that by ui so you take the sum of those things this will give us the orthogonal projection if we have an orthogonal basis which you will have that on this example now in this example in this question i should say we only have one vector u right here as that spans spans w and since it's a non-zero vector it does give us an orthogonal basis for w so we're ready to go so what we need to compute here is we're going to compute u dot y over u dot u and we're going to times that by u itself right here now the order of a dot product doesn't matter but the order of a hermitian product does matter so if this was a complex vector make sure that the y the vector you're projecting from is the second factored in order for this calculation to be correct for which case then we see here that the inner product of y and u we're going to get zero plus three plus three zero plus three plus three then we sit over u dot u which case we're going to get zero plus one plus one and then we times that by zero one and negative one simplifying the scalars we're going to end up with six over two times zero one and negative one if we simplify the fraction of course that's just a three so it's three times zero one and negative one for which then if we multiply by three we then get zero three and negative three which we can see is choice a right here