# How do I determine the intersection of span A and span B? [duplicate]

Consider the following 2 sets of vectors in $\mathbb R^4$: $A = \{v_1, v_2, v_3\}, B = \{w_1, w_2, w_3\}$. You are given that $A$ is a set of linearly independent vectors and that $B$ is a set of linearly independent vectors.

Let $v_1 = (3,1,4,1), v_2 = (5,9,2,6), v_3 = (5,3,5,8), w_1 = (9,7,9,3), w_2 = (2,3,6,4), w_3 = (6,2,8,4)$.

(Wrote them sideways when it should be top to bottom in brackets but left to right shown)

Determine the intersection of span$\,A$ and span$\,B$ and write your answer as the span of a set of linearly independent vectors.

-

## marked as duplicate by user1551, vonbrand, Davide Giraudo, rschwieb, Asaf KaragilaMar 26 '13 at 11:25

A way to get start is to see if any of $w_1,w_2,w_3$ are contained in $A$. That would mean that there's a solution to (for example) $av_1+bv_2+cv_3=w_1$ This would mean (using $w_1$ as an example) \begin{align*} 3a+5b+5c=9\\ a+9b+3c=7\\ 4a+2b+5c=9\\ a+6b+8c=3 \end{align*} has a solution. Say you figure out which of the $w_i$ are in $A$. What does that tell you about the intersection of the spans? What if you tried to figure out which of the $v_i$ are in $B$? Just some things to get you started. –  Ian Coley Mar 26 '13 at 6:37

Ultimately you need to solve a system of equations:

$$\alpha_1 v_1 + \alpha_2 v_2 + \alpha_3 v_3 = \beta_1 w_1 + \beta_2 w_2 + \beta_3 w_3$$

This will give you $3$ equations in $6$ variables, you can then solve for possible values of $\alpha_i$ and $\beta_i$. Look at a basis for the solutions to $\alpha_i$ and $\beta_i$ and use these to generate a spanning set of $V \cap W$. Then reduce this spanning set to a basis.

-

The intersection will have dimension 2 or 3 so we can control our results. As your vectors doesn't look very nice we will use the gauss algorithm to make them sweeter. Sweet vectors are vectors with a lot of zeroes. When we calculate $$a_1=v_2-v_3=\begin{pmatrix} 5-5 \\ 9-3 \\ 2-5 \\ 6-8\\ \end{pmatrix} = \begin{pmatrix} 0 \\ 6 \\ -3 \\ -2 \\ \end{pmatrix}$$ Calculating $$a_2=3 v_2 -5 v_1= \begin{pmatrix} 15-15 \\ 27-5 \\ 6-20 \\ 18-5\\ \end{pmatrix}= \begin{pmatrix} 0 \\ 22 \\-14\\ 13 \end{pmatrix}$$ When we calculate now $$a_3=3a_2-11 a_1= \begin{pmatrix} 0 \\ 66-66\\ -42+33\\ 39+22\\ \end{pmatrix}= \begin{pmatrix} 0 \\ 0 \\-9 \\ 61 \end{pmatrix}$$ Now we calculate $$a_4=3a_1 -a_3=\begin{pmatrix} 0 \\ 18\\ -9+9\\ -2-61 \\ \end{pmatrix}=\begin{pmatrix} 0 \\18 \\ 0 \\ 63\\ \end{pmatrix}=9\cdot \begin{pmatrix} 0\\ 2 \\ 0 \\ 7 \\\end{pmatrix}$$ Simplify $v_1$ like this too and the other set, and it will give you an easy (easier) system of equations.

Mathematica gives me those reduced echolons forms $$A=\left( \begin{array}{cccc} 1 & 0 & 0 & \frac{191}{18} \\ 0 & 1 & 0 & -\frac{67}{18} \\ 0 & 0 & 1 & -\frac{61}{9} \\ \end{array} \right)\qquad B= \left( \begin{array}{cccc} 1 & 0 & 0 & -\frac{28}{61} \\ 0 & 1 & 0 & -\frac{6}{61} \\ 0 & 0 & 1 & \frac{53}{61} \\ \end{array} \right)$$ where every row is a vector.

-
"Sweet vectors are vectors with a lot of zeroes." LOL So vectors with lots of complex and transcendental numbers are sour then ? –  GinKin Jun 26 '14 at 20:40