# Finding a basis for intersection of two subspaces

Let two subspaces of $V=\mathbb{R}^4$:
$$w1 = \left\{ {\left( {\matrix{ 1 \cr 1 \cr 1 \cr 1 \cr } } \right),\left( {\matrix{ 1 \cr 0 \cr 2 \cr 0 \cr } } \right),\left( {\matrix{ 0 \cr 2 \cr 1 \cr 1 \cr } } \right)} \right\},w2 = \left\{ {\left( {\matrix{ 1 \cr 1 \cr 1 \cr 1 \cr } } \right),\left( {\matrix{ 3 \cr 2 \cr 3 \cr 2 \cr } } \right),\left( {\matrix{ 2 \cr { - 1} \cr 2 \cr 0 \cr } } \right)} \right\}$$

I row-reduced them and compared the generalized form (because those vectors are in $w_1 \cap w_2$:

$$\left( {\matrix{ {{\alpha _1}} \cr {{\alpha _1} + {\alpha _2}} \cr { - 2{\alpha _2} + 5{\alpha _3}} \cr {{\alpha _1} + {\alpha _2} + {\alpha _3}} \cr } } \right) = \left( {\matrix{ {{\beta _1}} \cr {{\beta _1} + {\beta _2}} \cr {{\beta _1}} \cr {{\beta _1} + {\beta _2} + {\beta _3}} \cr } } \right)$$

What action should I take from here to find the basis of $w_1 \cap w_2$?
Thanks.

• A small notational point that lots of people get wrong - the sets you have written are not subspaces. You probably mean that $w_1$ and $w_2$ are the spans of those sets. Also, you should say "a basis", rather than "the basis". – mdp May 20 '14 at 13:33
• A different way to do it is to note that $$\begin{pmatrix}1 \\1 \\1 \\1 \end{pmatrix}\in \langle w_1\rangle\cap \langle w_2\rangle,$$ $$\begin{pmatrix} 2\\ -1\\ 2\\ 0\end{pmatrix}=\begin{pmatrix} 1\\ 1\\ 1\\ 1\end{pmatrix}+\begin{pmatrix} 1\\ 0\\ 2\\ 0\end{pmatrix}-\begin{pmatrix} 0\\ 2\\ 1\\ 1\end{pmatrix}\in \langle w_1\rangle\cap \langle w_2\rangle$$ and to prove that $\begin{pmatrix} 3\\ 2\\ 3\\ 2\end{pmatrix}\not \in \langle w_1\rangle$. – Git Gud May 20 '14 at 13:40

One way to do this is to find the vectors in your basis of $$W_2$$ that are in (the span of your basis for) $$W_1$$. That is, take the matrix $$[v_1 \ v_2\ v_3\ w_1 \ w_2 \ w_3] = \pmatrix{ 1&1&0&1&3&2\\ 1&0&2&1&2&-1\\ 1&2&1&1&3&2\\ 1&0&1&1&2&0 }$$ and row-reduce it. The free columns (columns without a pivot) will correspond to non-trivial relations between these basis elements, and we can use these to form a basis for the intersection $$W_1 \cap W_2$$.
In this particular example, row-reducing yields $$\pmatrix{1& 0& 0& 1& 0& 1 \\ 0 & 1 & 0 & 0 & 0 & 1\\ 0 & 0 & 1 & 0 & 0 & -1 \\ 0 & 0 & 0 & 0 & 1 & 0}$$ Reading the free columns indicates that we have the relations $$v_1 = w_1\\ v_1 + v_2 - v_3 = w_3.$$ Since these equations have the $$v$$'s on the left and the $$w$$'s on the right, we may say that $$w_1$$ will be the first basis element of our intersection, and $$w_3$$ will be the second.
• If you want a basis for $W_1 + W_2$, then instead of looking for the free columns, take the pivot columns – Ben Grossmann May 20 '14 at 14:18
• @AJ_ looking at the rref we see that the basis vectors satisfy the relation $$(1,2,2,-2) = 1 \cdot (1,1,0,-1) + (-1)\cdot (0,-1,-2,1)$$ and indeed, this is not enough to deduce that $(1,2,2,-2)$ spans the intersection. So it seems that my method (while it does indicate the correct dimension) does not give a basis for the intersection. Thanks for pointing out the example. – Ben Grossmann Sep 28 '19 at 11:37
• @AJ_ in order to correct the method, I would need to add a step wherein we take the relation indicated and rewrite it with vectors from the first basis on the left and vectors from the other on the right. In this case, rewriting the relation yields $$1 \cdot (1,1,0,-1) = 1 \cdot (1,2,2,-2) + 1 \cdot (0,-1,-2,1)$$ The vector attained (on each side) after this step (I believe) is the vector we should use to form our basis of $W_1 \cap W_2$. – Ben Grossmann Sep 28 '19 at 11:53