1

Given column vectors $X$ and $Y$, how can I solve the equation $AX=Y$ for the matrix $A$? E.g., $$\begin{bmatrix} 1 & 2 \\ 3 & 4\end{bmatrix}\begin{bmatrix}1\\2\end{bmatrix} = \begin{bmatrix}5\\11\end{bmatrix}$$

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$.

J. Doe
  • 11

4 Answers4

1

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.

Nick Peterson
  • 33,058
0

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

Shinja
  • 1,385
  • 7
  • 8
0

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.

InsideOut
  • 7,003
  • Thank you, but I have a follow-up question. If I have A that some nXn, how do I select X and Y so that when I multiply them I get A again. They are all real numbers and X and Y have n numbers that are not zero. A trivial 2X2 example would be great. I don't need all solutions, just one solution. Thank you. – J. Doe Mar 07 '17 at 16:22
  • @J.Doe Does Theophile's answer below work in the case you want? Their answer is perfect, though like they say you would need to know that $x_{i} \neq 0$ unless $y_{i}=0$ also. Does this work for whatever application you had in mind? – Benighted Mar 07 '17 at 17:47
  • My goal is to take an NXN matrix and factor into 1XN and NX1 matrix, then take the 1XN and NX1 matrices and multiply them together to get the original NXN. All matrices are non-zero and real. I cannot assign the NXN matrix, but I can pick whatever 1XN and NX1 matrices I want. – J. Doe Mar 08 '17 at 17:41
  • I realize that I might be asking the impossible. – J. Doe Mar 08 '17 at 17:42
0

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.

T L Davis
  • 468
  • Thank you. I love the approach. However, A is not the A that I started off with. How do I select X and Y from A (any X and Y, real numbers and they can be nonzero) so that when I multiply X and Y, I get A again. – J. Doe Mar 07 '17 at 16:25
  • @J. Doe If I understand your question, I don't know of a way in general unless $A=kR$ where $k$ is a scalar and $R$ is orthogonal with $\det(R)=\pm1$. – T L Davis Mar 07 '17 at 19:44
  • @J.Doe Perhaps you could explain why you want to do this in the first place. That might lead to answers that you might find more relevant. As it stands, you are asking the impossible. – Théophile Mar 07 '17 at 21:16
  • My goal is take a NXN matrix and factor into any NX1 and 1XN matrixes. – J. Doe Mar 08 '17 at 17:35
  • And then take the NX1 and 1XN matrices and multiply them together to get the original NXN. All matrices are non-zero, and I cannot change my NXN matrices. – J. Doe Mar 08 '17 at 17:37
  • I can pick whatever NX1 and 1XN matrices I want though. – J. Doe Mar 08 '17 at 17:41
  • I realize that I might be asking the impossible. – J. Doe Mar 08 '17 at 17:41