# Linear algebra ( orthonormal basis)

$U$ is subspace for $\mathbb{R}^3$ with orthonormal basis $u_1,u_2$.

Given $v\in \mathbb{R}^3,\;$ let $a_1=\langle v,u_1\rangle ,\;\; a_2=\langle v,u_2\rangle$

So it must be the case that:

If $\,a_1u_1+a_2u_2\neq v\;$ then $\,v\notin U$.

Can someone explain me why?

Thanks

-

$v\in U \Leftrightarrow d(v,U) = 0$

Now $d(v,U) = \lVert v-v' \rVert$, where $v'$ is the orthogonal projection $v' = \langle v,u_1 \rangle u_1 + \langle v,u_2\rangle u_2$. So $v\in U$ iff $v =v' = \langle v,u_1 \rangle u_1 + \langle v,u_2\rangle u_2$

-

Intuitive Explanation:

Let $u_1$ and $u_2$ be those 2 vectors spanning whatever subspace of $\mathbb{R}^3$, realize that $k=a_1u_1+a_2u_2$ can be also written out as : $$k = (v^Tu_1)u_1+(v^Tu_2)u_2$$ Further, realize that the vectors $u_1$ and $u_2$ are of unit magnitude. $$k = \dfrac{(v^Tu_1)u_1}{||u_1||}+\dfrac{(v^Tu_2)u_2}{||u_2||}$$ Does this formula remind you of something? The first term is the projection of $v$ on $u_1$ and the second term is the projection of $v$ on $u_2$. If the sum of these terms is not equal to $v$, that means, $v$ has a component that is not contained in the subspace spanned by $u_1$ and $u_2$.

Example:

Let $v=2i+3j+4k$ and Let $u_1=i$ and $u_2=j$. Using above notation: $$k = (v^Tu_1)u_1+(v^Tu_2)u_2=(2)i+(3)j\neq v$$ This was clear just by looking at the vector and the subspace. You can convince yourself that any vector in the X-Y plane obeys $k=v$.

This forms the basis for Gram Schmidt Orthogonalization. Given a set of $n$ linearly independent vectors spanning $\mathbb{R}^n$, I can always create a Orthonormal basis based on the above approach.
If you attempt to resolve $v$ along $u_1$ and $u_2$ then $a_1$ is component along $u_1$ and $a_2$ is component along $u_2$. So if $v\neq a_1 u_1 + a_2 u_2$ it means $v$ has still a third component perpendicular to plane of $u_1$ and $u_2$.
As an example if $u_1=i$ and $u_2=j$ and $v=(1,2,3)$ then $a_1=1$, $a_2=2$ and $v\neq a_1u_1+a_2u_2=(1,2,0)$