# [SOLVED]Intersection of two spans

#### mathmari

##### Well-known member
MHB Site Helper
Hey!!

Let \begin{equation*}v_1:=\begin{pmatrix}1 \\ 2\\ -1 \\ 3\end{pmatrix}, v_2:=\begin{pmatrix}1 \\ 1\\ 1 \\ 1\end{pmatrix}, v_3:=\begin{pmatrix}-1 \\ 1\\ -5 \\ 3\end{pmatrix} , w_1:=\begin{pmatrix}1 \\ 2\\ -3 \\ 3\end{pmatrix}, w_2:=\begin{pmatrix}1 \\ 0\\ 0 \\ 1\end{pmatrix}\in \mathbb{R}^4\end{equation*}

I want to calculate the intersection of the spans $\text{Lin}(v_1, v_2, v_3)\cap \text{Lin}(w_1, w_2)$.

We have \begin{align*}&\text{Lin}(v_1, v_2, v_3)=\left \{\lambda_1v_1+\lambda_2v_2+\lambda_3v_3 : \lambda_1, \lambda_2, \lambda_3\in \mathbb{R}\right \}=\left \{\lambda_1\begin{pmatrix}1 \\ 2\\ -1 \\ 3\end{pmatrix}+\lambda_2\begin{pmatrix}1 \\ 1\\ 1 \\ 1\end{pmatrix}+\lambda_3\begin{pmatrix}-1 \\ 1\\ -5 \\ 3\end{pmatrix}: \lambda_1, \lambda_2, \lambda_3\in \mathbb{R}\right \} \\ & \text{Lin}(w_1, w_2)=\left \{\tilde{\lambda}_1w_1+\tilde{\lambda}_2w_2 : \tilde{\lambda}_1, \tilde{\lambda}_2\in \mathbb{R}\right \}=\left \{\tilde{\lambda}_1\begin{pmatrix}1 \\ 2\\ -3 \\ 3\end{pmatrix}+\tilde{\lambda}_2\begin{pmatrix}1 \\ 0\\ 0 \\ 1\end{pmatrix} : \tilde{\lambda}_1, \tilde{\lambda}_2\in \mathbb{R}\right \}\end{align*}

How could we continue?

Do we have to solve a system? We take a vector $(a,b,c,d)^T$ and try to write it as a linear combination of the $v_i$'s and then as a linear combination of the $w_i$'s ?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Hey mathmari !!

The intersection is all vectors that can both be written as $\lambda_1v_1+\lambda_2v_2+\lambda_3v_3$ and as $\tilde{\lambda}_1w_1+\tilde{\lambda}_2w_2$.
So let's solve:
$$\lambda_1v_1+\lambda_2v_2+\lambda_3v_3 = \tilde{\lambda}_1w_1+\tilde{\lambda}_2w_2 \\ \implies \lambda_1\begin{pmatrix}1 \\ 2\\ -1 \\ 3\end{pmatrix}+\lambda_2\begin{pmatrix}1 \\ 1\\ 1 \\ 1\end{pmatrix}+\lambda_3\begin{pmatrix}-1 \\ 1\\ -5 \\ 3\end{pmatrix} = \tilde{\lambda}_1\begin{pmatrix}1 \\ 2\\ -3 \\ 3\end{pmatrix}+\tilde{\lambda}_2\begin{pmatrix}1 \\ 0\\ 0 \\ 1\end{pmatrix}\\ \implies \lambda_1\begin{pmatrix}1 \\ 2\\ -1 \\ 3\end{pmatrix}+\lambda_2\begin{pmatrix}1 \\ 1\\ 1 \\ 1\end{pmatrix}+\lambda_3\begin{pmatrix}-1 \\ 1\\ -5 \\ 3\end{pmatrix} - \tilde{\lambda}_1\begin{pmatrix}1 \\ 2\\ -3 \\ 3\end{pmatrix}-\tilde{\lambda}_2\begin{pmatrix}1 \\ 0\\ 0 \\ 1\end{pmatrix} = 0 \\ \implies \begin{pmatrix} 1 & 1 & -1 & 1 & 1 \\ 2 & 1 & 1 & 2 & 0 \\ -1 & 1 & -5 & -3 & 0 \\ 3 & 1 & 3 & 3 & 1\end{pmatrix}\begin{pmatrix}\lambda_1 \\ \lambda_2\\ \lambda_3 \\ - \tilde{\lambda}_1\\ -\tilde{\lambda}_2\end{pmatrix} = 0$$
Can we solve that?

#### mathmari

##### Well-known member
MHB Site Helper
We apply the Gauss algorithm and we get the following: \begin{align*}\begin{pmatrix}
1 & 1 & -1 & 1 & 1 \\
2 & 1 & 1 & 2 & 0 \\
-1 & 1 & -5 & -3 & 0 \\
3 & 1 & 3 & 3 & 1\end{pmatrix} &\rightarrow \begin{pmatrix}
1 & 1 & -1 & 1 & 1 \\
0 & -1 & 3 & 0 & -2 \\
0 & 2 & -6 & -2 & 1 \\
0 & -2 & 6 & 0 & -2\end{pmatrix}\rightarrow \begin{pmatrix}
1 & 1 & -1 & 1 & 1 \\
0 & -1 & 3 & 0 & -2 \\
0 & 2 & -6 & -2 & 1 \\
0 & 0 & 0 & -2 & -1\end{pmatrix} \\ & \rightarrow \begin{pmatrix}
1 & 1 & -1 & 1 & 1 \\
0 & -1 & 3 & 0 & -2 \\
0 &0 & 0 & -2 & 1 \\
0 & 0 & 0 & -2 & -1\end{pmatrix}\rightarrow \begin{pmatrix}
1 & 1 & -1 & 1 & 1 \\
0 & -1 & 3 & 0 & -2 \\
0 &0 & 0 & -2 & 1 \\
0 & 0 & 0 & 0 & -2\end{pmatrix}\end{align*}

From here we get the following:
\begin{align*}\begin{pmatrix}
1 & 1 & -1 & 1 & 1 \\
2 & 1 & 1 & 2 & 0 \\
-1 & 1 & -5 & -3 & 0 \\
3 & 1 & 3 & 3 & 1\end{pmatrix}\begin{pmatrix}\lambda_1 \\ \lambda_2\\ \lambda_3 \\ - \tilde{\lambda}_1\\ -\tilde{\lambda}_2\end{pmatrix} = 0&\Rightarrow \begin{pmatrix}
1 & 1 & -1 & 1 & 1 \\
0 & -1 & 3 & 0 & -2 \\
0 &0 & 0 & -2 & 1 \\
0 & 0 & 0 & 0 & -2\end{pmatrix}\begin{pmatrix}\lambda_1 \\ \lambda_2\\ \lambda_3 \\ - \tilde{\lambda}_1\\ -\tilde{\lambda}_2\end{pmatrix} = 0 \\ & \Rightarrow \left\{\begin{matrix}\lambda_1+\lambda_2-\lambda_3-\tilde{\lambda}_1-\tilde{\lambda}_2=0 \\ -\lambda_2+\lambda_3+2\tilde{\lambda}_2=0 \\ 2\tilde{\lambda}_1-\tilde{\lambda}_2=0 \\ 2\tilde{\lambda}_2=0\end{matrix}\right.\end{align*}

From the last equation we get $\tilde{\lambda}_2=0$. From the third one we get then $\tilde{\lambda}_1=0$. From the second equation we get then $\lambda_2=\lambda_3$. Form the first equation we get $\lambda_1=0$.

Does this mean that the intersection contain only the zero vector?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Suppose we fill in your solution:
$$\begin{pmatrix} 1 & 1 & -1 & 1 & 1 \\ 2 & 1 & 1 & 2 & 0 \\ -1 & 1 & -5 & -3 & 0 \\ 3 & 1 & 3 & 3 & 1\end{pmatrix}\begin{pmatrix}0 \\ \lambda_2\\ \lambda_2 \\ 0 \\ 0 \end{pmatrix} = \begin{pmatrix}0 \\ 2\lambda_2\\ -4\lambda_2 \\ 4\lambda_2 \end{pmatrix}$$

That is not always zero is it?

What did you do in the second step of the Gaussian elimination?

#### mathmari

##### Well-known member
MHB Site Helper
Suppose we fill in your solution:
$$\begin{pmatrix} 1 & 1 & -1 & 1 & 1 \\ 2 & 1 & 1 & 2 & 0 \\ -1 & 1 & -5 & -3 & 0 \\ 3 & 1 & 3 & 3 & 1\end{pmatrix}\begin{pmatrix}0 \\ \lambda_2\\ \lambda_2 \\ 0 \\ 0 \end{pmatrix} = \begin{pmatrix}0 \\ 2\lambda_2\\ -4\lambda_2 \\ 4\lambda_2 \end{pmatrix}$$

That is not always zero is it?

What did you do in the second step of the Gaussian elimination?
I found a typo at the last step.

It should be as follows:

\begin{align*}\begin{pmatrix}
1 & 1 & -1 & 1 & 1 \\
2 & 1 & 1 & 2 & 0 \\
-1 & 1 & -5 & -3 & 0 \\
3 & 1 & 3 & 3 & 1\end{pmatrix}\begin{pmatrix}\lambda_1 \\ \lambda_2\\ \lambda_3 \\ - \tilde{\lambda}_1\\ -\tilde{\lambda}_2\end{pmatrix} = 0&\Rightarrow \begin{pmatrix}
1 & 1 & -1 & 1 & 1 \\
0 & -1 & 3 & 0 & -2 \\
0 &0 & 0 & -2 & 1 \\
0 & 0 & 0 & 0 & -2\end{pmatrix}\begin{pmatrix}\lambda_1 \\ \lambda_2\\ \lambda_3 \\ - \tilde{\lambda}_1\\ -\tilde{\lambda}_2\end{pmatrix} = 0 \\ & \Rightarrow \left\{\begin{matrix}\lambda_1+\lambda_2-\lambda_3-\tilde{\lambda}_1-\tilde{\lambda}_2=0 \\ -\lambda_2+3\lambda_3+2\tilde{\lambda}_2=0 \\ 2\tilde{\lambda}_1-\tilde{\lambda}_2=0 \\ 2\tilde{\lambda}_2=0\end{matrix}\right.\end{align*}

From the last equation we get $\tilde{\lambda}_2=0$. From the third one we get then $\tilde{\lambda}_1=0$. From the second equation we get then $\lambda_2=3\lambda_3$. Form the first equation we get $\lambda_1=0$.

And so with both linear combinations we get the zero vector, correct?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
From the last equation we get $\tilde{\lambda}_2=0$. From the third one we get then $\tilde{\lambda}_1=0$. From the second equation we get then $\lambda_2=3\lambda_3$. Form the first equation we get $\lambda_1=0$.

And so with both linear combinations we get the zero vector, correct?
If I substitute the new solution, I still don't get a zero vector.

#### mathmari

##### Well-known member
MHB Site Helper
If I substitute the new solution, I still don't get a zero vector.
Oh sorry, in my previous post I didn't corrected the value of $\lambda_1$.

It should be:

From the last equation we get $\tilde{\lambda}_2=0$. From the third one we get then $\tilde{\lambda}_1=0$. From the second equation we get then $\lambda_2=3\lambda_3$. Form the first equation we get $\lambda_1=-2\lambda_3$.

Therefore we have the following:

\begin{align*}-2\lambda_3\begin{pmatrix}1 \\ 2\\ -1 \\ 3\end{pmatrix}+3\lambda_3\begin{pmatrix}1 \\ 1\\ 1 \\ 1\end{pmatrix}+\lambda_3\begin{pmatrix}-1 \\ 1\\ -5 \\ 3\end{pmatrix} &=\lambda_3\begin{pmatrix}-2 \\ -4\\ 2 \\ -6\end{pmatrix}+\lambda_3\begin{pmatrix}3 \\ 3\\ 3 \\ 3\end{pmatrix}+\lambda_3\begin{pmatrix}-1 \\ 1\\ -5 \\ 3\end{pmatrix} \\ & =\lambda_3\left [\begin{pmatrix}-2 \\ -4\\ 2 \\ -6\end{pmatrix}+\begin{pmatrix}3 \\ 3\\ 3 \\ 3\end{pmatrix}+\begin{pmatrix}-1 \\ 1\\ -5 \\ 3\end{pmatrix}\right ]\\ & =\lambda_3\begin{pmatrix}0 \\ 0\\ 0 \\ 0\end{pmatrix} \\ & =\begin{pmatrix}0 \\ 0\\ 0 \\ 0\end{pmatrix}\end{align*}

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Ah okay.
So yes, then we have found indeed that the intersection is only the zero vector.

Moreover, the vectors $v_1,v_2,v_3$ are linearly dependent.

#### mathmari

##### Well-known member
MHB Site Helper
Ah okay.
So yes, then we have found indeed that the intersection is only the zero vector.

Moreover, the vectors $v_1,v_2,v_3$ are linearly dependent.
Ah ok! Thank you!!