Find the orthogonal projection of y onto subspace of $R^3$ spanned by S, where S is not orthogonal.

1.1k Views Asked by At

y and S are defined below:

$$y= \begin{bmatrix} 9 \\ 2 \\ -4 \\ \end{bmatrix} $$

$$S=\{ \begin{bmatrix} 1 \\ 0 \\ 1 \\ \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \\ 1 \\ \end{bmatrix} \} $$

My first step would be to make the subspace S orthogonal via Gram-smith process:

$$ v_1 = s_1$$

$$ v_2 = s_2 - \frac{s_2 \cdot v_1}{v_1 \cdot v_1}v_1$$

and then use the formula:

$$ \hat y = \frac{y \cdot v_1}{v_1 \cdot v_1}v_1 + \frac{y \cdot v_2}{v_2 \cdot v_2}v_2$$

I end up with:

$$V=\{ \begin{bmatrix} 1 \\ 0 \\ 1 \\ \end{bmatrix}, \begin{bmatrix} -\frac{1}{2} \\ 1 \\ \frac{1}{2} \\ \end{bmatrix} \} $$

As orthogonal basis.

And use the formula $ \hat y $ to end up with: $$\hat y = \begin{bmatrix} 4 \\ -3 \\ 1 \\ \end{bmatrix} $$

  1. Is this the correct way to approach this?
  2. Is there an easier way to approach this?
1

There are 1 best solutions below

2
On BEST ANSWER

Your answer is fine.

Alternatively, you can find a vector perpendicular to $S$. For example, $$p=\begin{pmatrix}1\\1\\-1\end{pmatrix}$$ is perpendicular to both of the generators of $S$. Then you get:

$$\hat y = y-\frac{y\cdot p}{p\cdot p}= \begin{pmatrix} 9 \\ 2 \\ -4 \\ \end{pmatrix} -5\begin{pmatrix}1\\1\\-1\end{pmatrix}=\begin{pmatrix}4\\-3\\1\end{pmatrix}$$ which is the same as your answer.

In this case, finding $p$ might be easier since there is only one vector perpendicular to $S$ and it was easy to find.

More generally, you'd have to find a set of pairwise orthogonal $p_1,p_2,\dots,p_{n-k}$ which generate the space orthogonal to the $k$-dimensional subspace $S.$ That won't be easier than finding a basis for $S$ unless $k$ is close to $n.$