Let W be the subspace of R^{3} defined by
W = {x: x = \left[\begin{array}{l}x_{1} \\x_{2} \\x_{3}\end{array}\right], \quad x_{1}+x_{2}-3 x_{3}=0}.
Let v be the vector v =[1,-2,-4]^{T}. Use Eq. (4) w ^{*}=\sum_{i=1}^{p} \frac{ v ^{T} u _{i}}{ u _{i}^{T} u _{i}} u _{i} to find the best least-squares approximation to v.