# Finding a basis for $W_1 \cap W_2$ and $W_1 + W_2$

Let two subspaces, $W_1, W_2$ of $\mathbb{R}^4$. I was asked to find the basis for $W_1 \cap W_2$ and $W_1 + W_2$.

Now, for the $W_1 \cap W_2$ - I arranged the vectors from both subspaces as rows of a matrix and row-reduced it. The vectors which are different from the zero-vector will be the basis for $W_1 \cap W_2$.

What should be done to find the basis for $W_1 + W_2$?

• Just a comment. You should probably specify that you are given bases of the two subspaces. – Andreas Caranti May 17 '14 at 21:18

To find the basis of $W_1 + W_2$, write the generating vectors of $W_1$ and $W_2$ into a single matrix, row-reduce it. The vectors corresponding to the pivot columns form a basis of $W_1 + W_2$.
To find basis of $W_1\cap W_2$, first find the dimension of $W_1 \cap W_2$ from $\dim W_1 \cap W_2 = \dim W_1 + \dim W_2 - \dim (W_1+W_2)$. Then, again, write all the generators of $W_1$ and $W_2$ into a single matrix and row reduce it. Now find $\dim W_1 \cap W_2$ linearly independent vectors from either $W_1$ or $W_2$, which are also in the other subspace, that is, by solving the homogeneous equation, find the coefficients you have to multiply the generators of $W_1$ and $W_2$, so that you get the same vector. This vector lies in $W_1\cap W_2$. Note you don't have to find the complete solution of the homogeneous equation. You can imagine the matrix as a system of linear equations with equal sign in between the generators of $W_1$ and $W_2$. If you know how to find the intersection of two lines, this is the same principle.
Say $W_1 = [\vec x_1, ..., \vec x_k]_\lambda$, $W_2 = [\vec y_1, ..., \vec y_l]_\lambda$. You have to find $\alpha_1, ... \alpha_k$, $\beta_1, ..., \beta_l$, such that
$\alpha_1\vec x_1 + ... + \alpha_k\vec x_k = \beta_1 \vec y_1 + ... + \beta_l \vec y_l$.
Then $\sum_{i=1}^{k}\alpha_i\vec x_i \in W_1 \cap W_2$.
• Actually that's what I did for $W_1\cap W_2$ so.. What should I do for finding the basis of $W_1\cap W_2$? :) – AnnieOK May 17 '14 at 20:48