Best approximation of a vector $x=\begin{bmatrix}2&2&0&0\end{bmatrix}^\tau$ by the vectors in $M^\perp$, where $b\in M$ is given

260 Views Asked by At

In a unitary space $\Bbb R^4$, subspace $M=\operatorname{span}\left\{b=\begin{bmatrix}1\\1\\1\\1\end{bmatrix}\right\}\leqslant\Bbb R^4$ is given. Find the best approximation of the vector $x=\begin{bmatrix}2\\2\\0\\0\end{bmatrix}\in\Bbb R^4$ by the vectors from the subspace $M^\perp$.


My attempt:

Let's extend $\{b\}$ to the basis $\{b,c_1,c_2,c_3\}$ for the whole $\Bbb R^4$ and let's apply Gram-Schmidt to it. I thought the following choice of linearly independent vectors $c_1, c_2,c_3$ would be the most convenient one.

$$b=\begin{bmatrix}1\\1\\1\\1\end{bmatrix},c_1=\begin{bmatrix}1\\0\\0\\0\end{bmatrix},c_2=\begin{bmatrix}0\\1\\0\\0\end{bmatrix},c_3=\begin{bmatrix}0\\0\\1\\0\end{bmatrix}$$

$\begin{aligned}e_1&=\frac1{\|b\|}\cdot b=\frac12\begin{bmatrix}1\\1\\1\\1\end{bmatrix}\\f_2&=c_1-\langle c_1, e_1\rangle e_1=\begin{bmatrix}1\\0\\0\\0\end{bmatrix}-\frac12\left\langle\begin{bmatrix}1\\0\\0\\0\end{bmatrix},\begin{bmatrix}1\\1\\1\\1\end{bmatrix}\right\rangle\frac12\begin{bmatrix}1\\1\\1\\1\end{bmatrix}=\frac14\begin{bmatrix}3\\-1\\-1\\-1\end{bmatrix}\\e_2&=\frac1{\|f_2\|}\cdot f_2=\frac1{2\sqrt{3}}\begin{bmatrix}3\\-1\\-1\\-1\end{bmatrix}\\f_3&=c_2-\langle c_2, e_1\rangle e_1-\langle c_2, e_2\rangle e_2=\begin{bmatrix}0\\1\\0\\0\end{bmatrix}-\frac12\left\langle\begin{bmatrix}0\\1\\0\\0\end{bmatrix},\begin{bmatrix}1\\1\\1\\1\end{bmatrix}\right\rangle\frac12\begin{bmatrix}1\\1\\1\\1\end{bmatrix}-\frac1{2\sqrt{3}}\left\langle\begin{bmatrix}0\\1\\0\\0\end{bmatrix}\begin{bmatrix}3\\-1\\-1\\-1\end{bmatrix}\right\rangle\frac1{2\sqrt{3}}\begin{bmatrix}3\\-1\\-1\\-1\end{bmatrix}\\&=\begin{bmatrix}-\frac14+\frac14\\\frac34-\frac1{12}\\-\frac14-\frac1{12}\\-\frac14-\frac1{12}\end{bmatrix}=\begin{bmatrix}0\\\frac23\\-\frac13\\-\frac13\end{bmatrix}\\\\e_3&=\frac1{\|f_3\|}\cdot f_3=\frac1{\sqrt{6}}\begin{bmatrix}0\\2\\-1\\-1\end{bmatrix}\\\\f_4&=c_3-\langle c_3,e_1\rangle e_1-\langle c_3,e_2\rangle e_2-\langle c_3, e_3\rangle e_3\\&=\begin{bmatrix}0\\0\\1\\0\end{bmatrix}-\frac12\left\langle\begin{bmatrix}0\\0\\1\\0\end{bmatrix},\begin{bmatrix}1\\1\\1\\1\end{bmatrix}\right\rangle\frac12\begin{bmatrix}1\\1\\1\\1\end{bmatrix}-\frac1{2\sqrt{3}}\left\langle\begin{bmatrix}0\\0\\1\\0\end{bmatrix},\begin{bmatrix}3\\-1\\-1\\-1\end{bmatrix}\right\rangle\frac1{2\sqrt{3}}\begin{bmatrix}3\\-1\\-1\\-1\end{bmatrix}-\frac1{\sqrt{6}}\left\langle\begin{bmatrix}0\\0\\1\\0\end{bmatrix},\begin{bmatrix}0\\2\\-1\\-1\end{bmatrix}\right\rangle\frac1{\sqrt{6}}\begin{bmatrix}0\\2\\-1\\-1\end{bmatrix}\\&=\begin{bmatrix}-\frac14+\frac14\\-\frac14-\frac1{12}+\frac13\\\frac34-\frac1{12}-\frac16\\-\frac14-\frac1{12}-\frac16\end{bmatrix}=\begin{bmatrix}0\\0\\\frac12\\-\frac12\end{bmatrix}\\\\e_4&=\frac1{\|f_4\|}\cdot f_4=2\begin{bmatrix}0\\0\\1\\-1\end{bmatrix}\end{aligned}$

We obtain an orthonormal basis $$\left\{\frac1{2\sqrt{3}}\begin{bmatrix}3\\-1\\-1\\-1\end{bmatrix},\frac1{\sqrt{6}}\begin{bmatrix}0\\2\\-1\\-1\end{bmatrix},2\begin{bmatrix}0\\0\\1\\-1\end{bmatrix}\right\}\ \text{for}\ M^\perp$$

$$x=\underset{\in\ M}{m}+\underset{ \in\ M^\perp}{n}$$

$\begin{aligned}n&=\sum_{i=2}^4\langle x, e_i\rangle e_i\\&=\frac1{2\sqrt{3}}\left\langle\begin{bmatrix}2\\2\\0\\0\end{bmatrix},\begin{bmatrix}3\\-1\\-1\\-1\end{bmatrix}\right\rangle\frac1{2\sqrt{3}}\begin{bmatrix}3\\-1\\-1\\-1\end{bmatrix}+\frac1{\sqrt{6}}\left\langle\begin{bmatrix}2\\2\\0\\0\end{bmatrix},\begin{bmatrix}0\\2\\-1\\-1\end{bmatrix}\right\rangle\frac1{\sqrt{6}}\begin{bmatrix}0\\2\\-1\\-1\end{bmatrix}+2\left\langle\begin{bmatrix}2\\2\\0\\0\end{bmatrix},\begin{bmatrix}0\\0\\1\\-1\end{bmatrix}\right\rangle2\begin{bmatrix}0\\0\\1\\-1\end{bmatrix}\\&=\begin{bmatrix}1\\-\frac13+\frac43\\-\frac13-\frac23\\-\frac13-\frac23\end{bmatrix}=\begin{bmatrix}1\\1\\-1\\-1\end{bmatrix}\end{aligned}$

So, $$\boxed{n=\begin{bmatrix}1\\1\\-1\\-1\end{bmatrix}}$$


Update note: arithmetic mistake corrected.

Is this correct? If so, how could I improve it using, maybe, more efficient methods? Thank you in advance!

1

There are 1 best solutions below

0
On BEST ANSWER

The method looks right but you must have made a mistake in your calculation because the correct answer is $(1, 1, -1, -1)^\top$.

The easiest way is to find $\operatorname{Proj}_{b}(x)$ and then what you call $n$ is $x - \operatorname{Proj}_{b}(x)$. And of course

$$ \operatorname{Proj}_{b}(x) = \frac{\langle x,b\rangle}{\langle b,b\rangle}b = \frac{4}{4} b = b. $$

So $n = x - b$.