# Find the basis of subspaces sum and intersection

Let

$$V=\mathrm{span}\{(1,0,0,1),(0,1,0,1),(0,0,1,-1)\}$$

and

$$W=\mathrm{span}\{(1,2,0,1),(2,0,-1,2),(1,1,1,1)\}$$

How I can find the basis of the subspaces sum and the subspaces intersection? There is a general way to do that? I know only the Grassmann formula to find the dimension.

I'm new and I don't know how to proceed.

Since $$V$$ and $$W$$ are each generated by three linearly independent vectors, it follows that $$\dim V = \dim W = 3$$.

In general, when you have two finite-dimensional subspaces $$V$$ and $$W$$, their sum $$V + W$$ will be finite-dimensional as well and will be spanned by the union of any two bases of $$V$$ and $$W$$. So in this case, we know that that the list

$$(1,0,0,1), (0,1,0,1), (0,0,1,-1), (1,2,0,1), (2,0,-1,2), (1,1,1,1)$$

spans $$V + W$$. Notice that the first three vectors in this list are linearly independent, so $$\dim (V + W) \geq 3$$. Since $$V + W \subseteq \mathbb{R}^{4}$$, we also have $$\dim (V + W) \leq 4$$. You can then show that

$$(1,0,0,1), (0,1,0,1), (0,0,1, -1), (1,2,0,1)$$

are linearly independent in $$V + W$$, so they must be a basis for $$V + W$$. This in turn implies that $$\dim V + W = 4$$, so $$V + W = \mathbb{R}^{4}$$. Now using Grassmann formula, we see that

$$\dim (V \cap W) = \dim V + \dim W - \dim (V + W) = 2$$

so we only need to find two linearly independent vectors in $$V \cap W$$ and we'll be done.

First, notice that $$(1,1,1,1) \in V$$ because

$$(1,1,1,1) = (1,0,0,1) + (0,1,0,1)+ (0,0,1,-1).$$

Thus, $$(1,1,1,1) \in V \cap W$$.

Notice also that $$(1,0,0,1) \in W$$, because

$$(1, 0,0,1) = (-\frac{1}{5})(1,2,0,1) + \frac{2}{5}(2,0,-1,2) + \frac{2}{5}(1,1,1,1).$$

Thus, $$(1,0,0,1) \in V \cap W$$.

Since $$(1,1,1,1), (1,0,0,1)$$ are linearly independent, they form a basis for $$V \cap W$$.