# How to find the bases for two spanning sets and for their sum?

Let $u_1=(1,2,0,-1)$, $u_2=(0,2,-1,1)$, $u_3=(3,4,1,-4)$ and $v_1=(-2,-2,1,3)$, $v_2=(2,3,2,-6)$, $v_3=(-1,4,6,-2)$. Let $H =span\{u_1,u_2,u_3\}$ and $K = span\{v_1,v_2,v_3\}$.

In here I have to find bases for $H$, $K$ and $H+K$. I can't understand how to do it. I wrote vectors in $H$ and $K$ as linear combinations. Then I think I have to prove that those vectors are linearly independent. But I don't know how to do it. Can you help me to find an answer for this question?

Note that $u_3 = 3u_1-u_2$, then $\{u_1,u_2,u_3\}$ is linearly dependent and $u_3\in span\{u_1,u_2\}$.
Hint. In general, to see that vectors $w_1,\cdots,w_k$ are linearly independent, write $$\alpha_1 w_1 + \cdots + \alpha_k w_k = 0$$ and try to prove that $\alpha_i = 0$ for all $i\leq k$.
So $$\alpha \cdot v_1 +\alpha_2\cdot v_2= v_3\implies \alpha_1\cdot (-2,-2,1,3)+\alpha_2 \cdot (2,3,2,-6)=(-1,4,6,-2) \implies -2\alpha _1+2\alpha _2=-1,-2\alpha_1+3\alpha_2=4,\alpha _1+2\alpha_2=6 \text { and }3\alpha_1-6\alpha _2=-2 \implies -1-2\alpha_2=4-3\alpha_2 \implies \alpha_2=5 \text { and } \alpha_1= \frac {11}2 \text { and } \alpha_1+2\alpha_2=6$$, a contradiction. So $v_1, v_2 \text { and }v_3$ are linearly independent. .. Now we know $\{u_1, u_2\}$ is a basis for H (by @ridias), and $\{v_1,v_2, v_3\}$ a basis for K... Now for H+K, check if any $v_i , i=1,2,3$ is a linear combination of $u_1$ and $u_2$ . This will enable you to determine how many and which of $u_1,u_2,v_1,v_2,\text {and }v_3$are linearly independent, and get a basis for H +K...