I am trying to figure out a question: Let $W$ be the subspace $\mathbb{R^4}$ spanned by vectors
$$v_1=(1,1,1,1), v_2=(1,0,1,0) \text{ and }v_3=(1,1,0,0)$$
equipped with the standard Euclidean inner product (i.e. dot product).
a) Find the dimension of $W$
b) Construct an orthogonal basis for $W$.
Any help would be greatly appreciated as I am struggling to understand the difference between orthonormal bases, orthogonal bases, dimension of subspaces versus dimension of column row spaces etc!
Thanks
Best Answer
We have $\dim W$ since $(v_1, v_2, v_3)$ is linearly independent. To see that, suppose $$c_1v_1 + c_2v_2 + c_3v_3 = 0$$ for some $c_1,c_2,c_2\in\mathbb R$. This implies \begin{align} c_1 + c_2 + c_3 &= 0\tag 1\\ c_1 + c_3 &= 0\tag 2\\ c_1 + c_2 &= 0\tag 3\\ c_1 &= 0\tag 4 \end{align} $(4)$ directly implies $c_1=0$, which in turn implies $c_2=c_3 = 0$ from $(2)$ and $(3)$.
To construct an orthogonal basis for $W$, there is a standard inductive algorithm called Gram-Schmidt. In general, suppose we have a basis $(v_1, \ldots, v_n)$ for a subspace $V$ of $\mathbb R^m$ where $n<m$ (the case where $n=m$ isn't interesting because we can just take the standard basis). The algorithm proceeds as follows:
In this example, we have $u_1=v_1=(1,1,1,1)$, and then \begin{align} u_2 &= v_2 - P_{V_1}(v_2) = (1,0,1,0) - \frac{\langle (1,0,1,0), (1,1,1,1) \rangle}{\langle (1,1,1,1), (1,1,1,1) \rangle} \\ &= (1,0,1,0) - \frac24(1,1,1,1)\\ &= \left(\frac12,-\frac12,\frac12,-\frac12\right). \end{align} Finally,
\begin{align} u_3 =&\ v_3 - P_{V_2}(v_2)\\ =&\ (1,1,0,0)\\ &- \left[\frac{\langle (1,1,0,0), (1,1,1,1) \rangle}{\langle (1,1,1,1), (1,1,1,1) \rangle}(1,1,1,1)+\right.\\ &\quad\quad\left.\frac{\langle (1,1,0,0), \left(\frac12,-\frac12,\frac12,-\frac12\right) \rangle}{\langle \left(\frac12,-\frac12,\frac12,-\frac12\right), \left(\frac12,-\frac12,\frac12,-\frac12\right) \rangle} \left(\frac12,-\frac12,\frac12,-\frac12\right) \right]\\ =&\ (1,1,0,0) - \left(\frac24 (1,1,1,1) + 0 \right)\\ =&\ \left(\frac12, \frac12, -\frac12, -\frac12\right). \end{align}
(Notice that conveniently $v_3\perp u_2$, saving some computation). Hence, our orthogonal basis is $$\left(u_1, u_2, u_3 \right) = \left(\left(1,1,1,1\right), \left(\frac12,-\frac12,\frac12,-\frac12\right),\left(\frac12, \frac12, -\frac12, -\frac12\right) \right)$$
To convert this orthogonal basis, we need only divide the basis elements by their norm, i.e. compute $e_i = \frac1{\|u_i\|}$ where $\|u_i\| = \langle u_i,u_i\rangle^{\frac12}$. I'll spare the computation, but the result is
$$(e_1, e_2, e_3) = \left(\left(\frac14, \frac14, \frac14, \frac14 \right),\left(\frac12,-\frac12,\frac12,-\frac12\right),\left(\frac12, \frac12, -\frac12, -\frac12\right) \right). $$