# How to calculate a matrix $M$ by dividing 2 vectors?

Let $u = \begin{bmatrix}a\\b\\c\end{bmatrix}$

Let $v = \begin{bmatrix}d\\e\\f\end{bmatrix}$

There exists a $3\times3$ matrix, $M$, such that:

$Mu = v$

so $M = vu^{-1}$

But how do I go about calculating $vu^{-1}$?

My guess is that $u^{-1}$ will be a row vector in order to make the multiplication work... But apparently you can't do inverses on non-square matrices.

NO!!! Vectors do not have inverses. There are infinitely many matrices $M$ such that $M u = v$ (as long as $u \ne 0$).

You could, for example, take $M = v w$ where $w$ is any row vector such that $w u = 1$. And you could add to $M$ any matrix $N$ such that $N u = 0$.

• hmm but is there a way to create a general form for the matrix which satisfies such equation – Theo Walton Dec 17 '17 at 4:32
• As I said, take one and add $N$ such that $N u = 0$. – Robert Israel Dec 17 '17 at 4:33

Suppose that you are given $u, v$ and want to find a particular $M$ that satisfy $Mu=v$, we can't talk about $u^{-1}$ as it is not even a square a matrix, it is not well defined.

• if $u=0$ and $v=0$, $M$ can be any $3 \times 3$ matrix.
• if $u=0$ and $v \neq 0$, no such $M$ exists.
• if $u \neq 0$,suppose $u_i \neq 0$, let the $i$-th column of $M$ be $\frac{v}{u_i}$ and the other columns be zero columns.

$$M u=v$$ is a linear system of equations in the unknowns $M_{ij}$. Like for any underdetermined linear system, you can find all its solutions using the pseudoinverse.