Find the matrix $M$, given four vectors If you have $4$ vectors in a plane $x_1, x_2, b_1, b_2$, and a matrix $M$ such that $Mx_1 = b_1$ and $Mx_2 = b_2$, how do you find $M$ from this given data? Any hints would be appreciated; I am not sure where to start with this problem. 
 A: If your ambient space is $\mathbb{C}^2$, than put $X=(x_1,x_2),B=(b_1,b_2) \in\mathbb{C}^{2\times 2}$. Then you would like the following to hold:
$$MX = B.$$
Hence, if $X$ is invertible (i.e. if $x_1,x_2$ are independent), you can compute 
$$M=BX^{-1}.$$
If the ambient space is $\mathbb{C}^n$, with $n>2$ and $x_1,x_2$ are independent, define $X$ and $B$ analogously and use the Moore-Penrose pesudoinverse:
$$M = BX^{+},$$
with $X^+:=(X^*X)^{-1}X^*$. You can verify that $X^+X=I$, and, consequently, we get
$$MX = BX^+X = B.$$
A: The most straightforward approach (assuming $x_1$ is not proportional to $x_2$) is to set up a set of four linear equations involving the known eight components---two each for $x_1$, $x_2$, $b_1$ and $b_2$---and the four unknown components of $M$ and use techniques of linear algebra.  As a check, here is $M$:
$$M =\left(
\begin{array}{cc}
 -\frac{b_{11} x_{22}-b_{21} x_{12}}{x_{12} x_{21}-x_{11} x_{22}} & -\frac{b_{11}
   x_{21}-b_{21} x_{11}}{x_{11} x_{22}-x_{12} x_{21}} \\
 -\frac{b_{12} x_{22}-b_{22} x_{12}}{x_{12} x_{21}-x_{11} x_{22}} & -\frac{b_{22}
   x_{11}-b_{12} x_{21}}{x_{12} x_{21}-x_{11} x_{22}} \\
\end{array}
\right)
$$
