Find the basis of the intersection of two vector subspaces I know there is lots of topics about intersection of two vector subspaces and basis but i still dont fully understand how we should handle these question.
So this is my homework:
Suppose U and W are subspaces of $R^3:\\$
$U=[(1,0,-1),(0,1,1)]\\W=[(2,4,0),(0,0,\sqrt{3})]\\$
Find a basis of $U\cap W \\$
So i know $U \cap W$ -> $a_1*(1,0,-1)+a_2*(0,1,1)-b_1*(2,4,0)-b_2*(0,0,\sqrt{3})=0\\$
a possible combination of coefficients $a_1=1,a_2=2,b_1=\frac12,b_2=-\sqrt{3}\\$
then i put the $1*(1,0,-1)+2*(0,1,1)$ in a matrix $$
        \begin{bmatrix}
        1 & 0 \\
        0 & 2 \\
        -1 & 2  \\
        \end{bmatrix}
\\$$
then i bring it to row-achelon form
$$
        \begin{bmatrix}
        1 & 0 \\
        0 & 2 \\
        0 & 0  \\
        \end{bmatrix}
\\$$
so Basis=$\{ (1,0,-1),(0,1,1) \}$ (i m not sure if the last vector should be $(0,1,1)$ or $(0,2,2)) $?
So is the solution correct ?
 A: Let $U=\left\{\begin{pmatrix}1\\0\\-1\end{pmatrix}\lambda+\begin{pmatrix}0\\1\\1\end{pmatrix}\mu\mid \lambda,\mu\in\mathbb{R}\right\}$, $W=\left\{\begin{pmatrix}2\\4\\0\end{pmatrix}\lambda+\begin{pmatrix}0\\0\\\sqrt{3}\end{pmatrix}\mu\mid \lambda,\mu\in\mathbb{R}\right\}$
For $U\cap W,$ $\begin{bmatrix}1&0\\0&1\\-1&1\end{bmatrix}\cdot\begin{bmatrix}\lambda_1\\\mu_1\end{bmatrix}=\begin{bmatrix}2&0\\4&0\\0&\sqrt{3}\end{bmatrix}\cdot\begin{bmatrix}\lambda_2\\\mu_2\end{bmatrix}$
$$ \lambda_1=2\lambda_2 $$
$$ \mu_1=4\lambda_2 $$
$$ -\lambda_1+\mu_1=\sqrt{3}\mu_2 $$
$$ \Rightarrow\lambda_2=\frac{\sqrt{3}}{2}\mu_2 $$
Thus $U\cap W=\left\{\begin{pmatrix}2\\4\\0\end{pmatrix}\frac{\sqrt{3}}{2}\mu+\begin{pmatrix}0\\0\\\sqrt{3}\end{pmatrix}\mu\mid \mu\in\mathbb{R}\right\}=\left\{\begin{pmatrix}\sqrt{3}\\2\sqrt{3}\\\sqrt{3}\end{pmatrix}\mu\mid \mu\in\mathbb{R}\right\}$
Note that the magnitude of the basis vector is largely irrelevant, so you can normalize it to make it $\langle1,2,1\rangle$.
A: Let me try a comprehensive answer. The Zassenhaus algorithm does this job, but it is somehow difficult to explain. Another approach is to remember that elementary row operations preserve linear dependence between columns of a matrix. Suppose that
$$U=[u_1=(1,0,0,-1),u_2=(0,1,0,-1),u_3=(0,0,1,1)]$$ and $$W=[w_1=(1,0,-1,0),w_2=(0,1,-1,0),w_3=(0,0,0,1)].$$
Note that the generators of $U$ and $W$ are linearly independent, otherwise we could exclude the dependent vectors. Now, form a matrix whose columns are the vectors of U followed by the vectors of W:
$$M=\left[\begin{matrix}
1 & 0 & 0 & 1 & 0 & 0 \\ 
0 & 1 & 0 & 0 & 1 & 0 \\
0 & 0 & 1 & -1 & -1 & 0 \\ 
-1 & -1 & 1 & 0 & 0 & 1 \\  
\end{matrix}\right].
$$
Computing the reduced row echelon form of $M$ we obtain that
$$\text{rref}(M)=\left[\begin{matrix}
1 & 0 & 0 & 0 & -1 & -\frac{1}{2} \\ 
0 & 1 & 0 & 0 & 1 & 0 \\
0 & 0 & 1 & 0 & 0 & \frac{1}{2} \\ 
0 & 0 & 0 & 1 & 1 & \frac{1}{2} \\  
\end{matrix}\right].
$$
Therefore we can conclude from the aforementioned fact, that
$$\begin{aligned}
w_2&=-u_1+u_2+w_1 \\
w_3&=-\frac{1}{2}u_1+\frac{1}{2}u_3+\frac{1}{2}w_1
\end{aligned}$$
and that $u_1$, $u_2$, $u_3$ and $w_1$ form a basis of $U+W$.
We cannot say that $w_2$ and $w_3$ form a basis of $U\cap W$, because they are not linear combinations of vectors of $U$, but defining
$$\begin{aligned}
w_2'&:=w_2-w_1 = -u_1+u_2 \\
w_3'&:=w_3-\frac{1}{2}w_1=-\frac{1}{2}u_1+\frac{1}{2}u_3
\end{aligned}$$
we see that $w_2'\in U\cap W$ and $w_3'\in U\cap W$. It is easy to see from general considerations that $w_2'$ and $w_3'$ are linearly independent and from
$$\text{dim}(U+W)+\text{dim}(U\cap W)=\text{dim}(U)+\text{dim}(W),$$
it turns out that they form a basis of $U\cap W$. This procedure can clearly be generalized and even transformed into a proof of the theorem about the dimension of the sum of subspaces.
A: Since $\{(1,0,-1),(0,1,1), (0,0,\sqrt 3\}$ is a basis for $\mathbb{R}^3$ then $U \cup W=\mathbb{R}^3$. So, $\dim (U \cap W)=1$. Moreover we can choose $\{(1,2,1)\}$ a basis of $U \cap W$ because $\{(1,2,1)\} \in U \cap W$.
A: This is my idea: just like we can obtain a basis from an expression $ax+by+cz=0$ to a basis $(x_0,y_0,z_0),(x_1,y_1,z_1)$ for the plane described by that equation (by using the basic linear -algebra -fact that $ax+by+cz=0$ has 2 free variables; say $ y,z $), we can reverse the process to get an equation $ax+by+cz=0$ when we're given two basis vectors $(x_0,y_0,z_0),(x_1,y_1,z_1)$. Once we have the two planes associated to the given basis in the form $ax+by+cz=0$, we can easily find their intersection.
Then, the plane spanned by $(1,0,-1),(0,1,1)$ is $x-y+z=0$ , and the plane spanned by $(2,4,0),(0,0,\sqrt 3)$ is $4\sqrt 3x-2\sqrt3 y$. It then just comes down to solving the simple system:
$i)x-y+z=0$
$ii)4\sqrt3x-2\sqrt3y=0$
Whose solution is $y=2z$ ; back-substitution in $i$ gives us $x-2z+z=0$ , so $x=z$, and $y=2z$ gives us the line $(x,2x,x)$, spanned by, e.g. $(1,2,1)$ 
