Calculating dimension of the intersection of two subspaces

To calculate the dimension of $U\cap V$ you can

  1. Calculate a basis of $U\cap V$ and count the vectors, or
  2. Use $\dim(U\cap V)=\dim(U)+\dim(V)-\dim(U+V)$.

The second method can be realized as the following:

  • Collect all the $U$-vectors as columns of the matrix $A$ and all the $V$-vectors as columns of the matrix $B$.
  • Calculate $\dim(U)=\operatorname{rank}A$, $\dim(V)=\operatorname{rank}B$, $\dim(U+V)=\operatorname{rank}[A\ B]$.
  • Calculate $\dim(U\cap V)$ using the formula above.

P.S. In your attempt: the nullspace you've got $$ \begin{pmatrix}-2y-5z & 5y+6z & y+2z & y & z\end{pmatrix}^T $$ is exactly all the coefficients $(a,b,x,y,z)$ such that the corresponding linear combinations with $(a,b)$, or with $(x,y,z)$, generate the subspace $U\cap V$ (because you were looking for linear combinations from $U$ that were equal to linear combinations from $V$). Let's take, for example, $(a,b)$ in $U$ $$ \begin{bmatrix} 1 & 1\\ 3 & 4\\ -3 & -1\\ -1 & -2\\ -4 & -2 \end{bmatrix} \begin{bmatrix} a\\ b \end{bmatrix}= \begin{bmatrix} 1 & 1\\ 3 & 4\\ -3 & -1\\ -1 & -2\\ -4 & -2 \end{bmatrix} \begin{bmatrix} -2y-5z\\ 5y+6z \end{bmatrix}= \begin{bmatrix} 1 & 1\\ 3 & 4\\ -3 & -1\\ -1 & -2\\ -4 & -2 \end{bmatrix} \begin{bmatrix} -2 & -5\\ 5 & 6 \end{bmatrix} \begin{bmatrix} y\\ z \end{bmatrix}= \underbrace{\begin{bmatrix} 3 & 1\\ 14 & 9\\ 1 & 9\\ -8 & -7\\ -2 & 8 \end{bmatrix}}_{\text{basis of }U\cap V} \begin{bmatrix} y\\ z \end{bmatrix}. $$ The dimension of $U\cap V$ is, thus, $2$ (as the two columns are linearly independent).


Hint: $Dim(U + V) = Dim(U) + Dim(V) - Dim (U\cap V)$.