Given two columns vectors, $X$ and $Y$, solve $AX=Y$ for the matrix $A$

3.1k Views Asked by At

Given two column vectors, $X$ and $Y$, how can I solve the equation $AX=Y$ for the matrix $A$?

I can solve for column vector $Y$ given matrix $A$ and column vector $X$. I would like to compute $A$ from columns vectors $X$ and $Y$.
I tried the pseudo-inverse for a vector with little success as $A=YX+$ did not give me $A$.

Example

$$\begin{bmatrix} 1 & 2 \\ 3 & 4\end{bmatrix}\begin{bmatrix}1\\2\end{bmatrix} = \begin{bmatrix}5\\11\end{bmatrix}$$

Thank you.

4

There are 4 best solutions below

0
On

You cannot generally do that. For example the matrix $(3, 1;3, 4)$ would also work for your example.

0
On

To elaborate a little further on other answers:

Think of this way. Say that your vectors are each of length $n$. Then your matrix $A$ will be $n\times n$; so, it contains $n^2$ numbers.

The assumption that $AX=B$ can be broken out as a system of equations which involves $n^2$ variables, but only $n$ equations (one for each coordinate of the vectors); so, as a rule, it need not have a unique solution.

4
On

As Bobbie said on its comment two vector columns $X,Y$ are not enough to determine a matrix $A$ such that $AX=Y$, unless they are real numbers!!

Suppose that $X,Y\in\Bbb R^n=V$ for some $n\ge2$, then you can complete $X$ to a basis of $V$ and complete $Y$ to another basis of $V$. Then there exists a unique matrix $A$ sending $X$ to $Y$, but if you complete one of them or both to a basis of $V$ choosing different vectors, then the matrix $A$ change. So in general a matrix $A$ is not uniquely determinated.

7
On

You can solve this problem by finding a rotation matrix R that rotates $x = {X \over|X|}$ to $y = {Y \over|Y|}$ so that $Rx=y$. Then $A={|Y|\over|X|}R$ so that $AX=Y$. To find $R$, see, for example, this. As others have stated, $R$ and $A$ are not unique. In your example, $$A=\begin{bmatrix} 5.4 & -.2 \\ .2 & 5.4 \\ \end{bmatrix} $$ is a solution. This technique also works for dimensions greater than two.