[Math] To find basis of intersection of two subspaces.

linear algebra

$W_1$ and $W_2$ are subspaces of $R^{4}$ spanned by $[{(1,2,3,4),(2,1,1,2)]}$ and $[(1,0,1,0),(3,0,1,0)]$ respectively.Question is to find basis of $W_1 \cap W_2$ and also basis of $W_1 + W_2$ containing $[{(1,0,1,0),(3,0,1,0)}]$.I find rref of matrix $A=\left[\begin{array}{cccc}1&3&1&2\\0&0&2&1\\1&1&3&1\\0&0&4&2\end{array}\right]$ which gives me rank of this matrix 3.So the span of first three columns of matrix $A$ forms basis of $W_1 + W_2$ and last column of matrix $A$ forms basis of $W_1 \cap W_2.$Have I done it correctly?I have one more doubt.Suppose If I calculate rref of $A=\left[\begin{array}{cccc}1&2&1&3\\2&1&0&0\\3&1&1&1\\4&2&0&0\end{array}\right]$,then in this case last column of matrix again the basis of $W_1 \cap W_2$.So,in first case basis of $W_1 \cap W_2$ was span{[2,1,1,2]} and in second case it is ${[3,0,1,0]}$.What is correct then?

Best Answer

You know that $W_1 + W_2 = \operatorname{span} (W_1 \cup W_2)$, so the set $$\{(1,0,1,0),(3,0,1,0), (1,2,3,4),(2,1,1,2)\}$$

certainly spans $W_1 + W_2$.

Also, $$(2,1,1,2) = -\frac32(1,0,1,0) + (3,0,1,0) + \frac12(1,2,3,4)$$

and $\{(1,0,1,0),(3,0,1,0), (1,2,3,4)\}$ is linearly independent so it is a basis for $W_1 + W_2$.

We have:

$$\dim (W_1 \cap W_2) = \dim W_1 + \dim W_2 - \dim (W_1 \cap W_2) = 1$$

so it suffices to find one nontrivial vector in $W_1 \cap W_2$. After inspection, we see that it is:

$$-\frac32(1,0,1,0) + (3,0,1,0) = \left(\frac32, 0, -\frac12, 0\right) = -\frac12 (1, 2, 3, 4) + (2, 1, 1, 2)$$

so $\left\{\left(\frac32, 0, -\frac12, 0\right)\right\}$ is a basis for $W_1 \cap W_2$. You can also take $\left\{\left(3, 0, -1, 0\right)\right\}$ as a basis to get rid of fractions.

Related Question