How do you determine dimension Suppose $U$ and $V$ are $2$ dimensional subspaces of $\mathbb{R}^4$. How do you determine the dimension of $U \cap V$? I know that 
\begin{equation*}
\text{dim}(U + V) = \text{dim}(U)+ \text{dim}(V) - \text{dim}(U \cap V). 
\end{equation*}
So it seems that $\text{dim}(U \cap V) = 0$.
 A: First: it is incorrect, in general, to even write $\dim(U\cup V)$, because $U\cup V$ is almost never a subspace: it is a subspace if and only if $U\subseteq V$ or $V\subseteq U$. Not being a subspace, it doesn't even make sense to talk about its dimension.
Rather, what you probably meant is the correct equation
$$\dim(U+V) = \dim(U) + \dim(V) - \dim(U\cap V)$$
(though I prefer to put the intersection on the left hand side, because in that form it is valid even in the infinite dimensional case). Here, $U+V$ is the smallest subspace that contains $U$ and $V$, and it happens to equal the set of all vectors of the form $u+v$ with $u\in U$ and $v\in V$.
The equation does not give you the full answer, because there are several situations that can occur: you could have $U$ and $V$ intersect trivially: this is what happens when $U+V=\mathbb{R}^4$. For an explicit example, you could have $U=\{(a,b,0,0):a,b\in\mathbb{R}\}$, and $V=\{(0,0,c,d) : c,d\in\mathbb{R}\}$. Here, $\dim(U\cap V)=0$.
Or you could have that $U$ and $V$ intersect in a one-dimensional subspace (for example, take $U$ as above, but take $V=\{(0,b,c,0) : b,c\in\mathbb{R}\}$). 
Or you could have $U=V$, in which case the intersection has dimension $2$.
What you can say is: if the spaces are distinct, then the intersection will either have dimension 1 or dimension 0. But that is all you can say with the given information.
A: If you have B and B', basis of U and V respectively, you can check if the vectors of B are linearly independent with those of B'. If so, then $\dim(U\cap V) = 0$. If not, you may be able to write a new basis of $U+V$ eliminating the linearly dependent vectors. $\dim(U\cap V)$ is the amount of vectors you have eliminated from $U+V$'s basis.
Also, $\dim(U+V) = \dim(U) + \dim(V) - \dim(U\cap V)$.
