Solution (source code)

= Solution

Row reduction of the matrices whose columns are the displayed spanning vectors gives
$$
\dim U=3,\qquad\dim W=3.
$$
Row-reducing the matrix formed from all six columns gives
$$
\dim(U+W)=4.
$$
The <dimension formula for a sum of subspaces> now yields
$$
\boxed{\dim(U\cap W)
=\dim U+\dim W-\dim(U+W)
=3+3-4=2}.
$$