# Find a matrix X∈V such that U∩W=span{X}

Here is my problem. I've tried reading other people's related questions, but they're always just slightly different, I can't find one like mine and don't really know how to approach this problem. Any help would be appreciated.

• If you just rotate horizontal matrices until they're vertical, then use those methods, then rotate it back, that's totally fine. Math doesn't depend on where we physically position numbers on the page. – Greg Martin Nov 15 '14 at 7:16
• It might be easier to work with $U^\bot, W^\bot$. – copper.hat Nov 15 '14 at 7:48

Concretely you have $\def\sp{\operatorname{span}}U=\sp(u_1,u_2)$ and $V=\sp(v_1,v_2)$, and you are looking for common linear combinations $au_1+bu_2=cv_1+dv_2$, for any scalars $a,b,c,d$. That equation can also be written $au_1+bu_2-cv_1-dv_2=0$, which is a linear relation between $u_1,u_2,v_1,v_2$ with coefficients $a,b,-c,-d$ (the minus signs for $c,d$ are annoying, but you can consider $-c,-d$ as new unknown scalars). You can find all linear relations by solving a linear system $A\cdot(a,b,-c,-d)^T=(0,0,0)^T$ where $A$ has $u_1,u_2,v_1,v_2$ as columns. Here concretely $$\begin{pmatrix}-3&-2&-5&-4\\-1&2&-1&2\\2&-1&0&-3\end{pmatrix} \cdot\begin{pmatrix}a\\b\\-c\\-d\end{pmatrix} =\begin{pmatrix}0\\0\\0\end{pmatrix}.$$ Solving this leaves one free parameter in the general solution, which I choose to be$~c$, and the general solution can be given as $(a,b,-c,-d)=c(1,-1,-1,1)$. This means that $u_1-u_2-v_1+v_2=0$ and this is essentially the only linear relation between those vectors (any other relation is a scalar multiple of it). The $u_1-u_2=v_1-v_2$ should be a common linear combination of $u_1,u_2$ and of $v_1,v_2$; indeed both sides check out to be $[-1,-3,3]$. Moreover all other common linear combination of $u_1,u_2$ and of $v_1,v_2$ are multiples of this vector, so $\{[-1,-3,3]\}$ is a basis of $U\cap V$.
More generally, the general solution of the homogeneous linear system $A\cdot\vec x=0$ can be written as a linear combination of certain specific solutions (with the coefficients being freely chosen parameters); those solutions (in the example there was only one) form a basis of $\ker(A)$. For each of those specific solutions one can take the first few coordinates and form the corresponding linear combination of the basis vectors of$~U$; this will also be minus the linear combination with the remaining coordinates of the basis vectors of$~U$, hence give a vector of $U\cap V$. Moreover, after running through the basis of $\ker(A)$, one is guaranteed to have obtained a basis of $U\cap V$ (since all vectors in $U\cap V$ must correspond to some common linear combination).