3

Here is an example:

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

$x = \begin{bmatrix} 3 \\ 8 \end{bmatrix}$

$b = Ax$ so

$b = \begin{bmatrix} 30 \\ 23 \end{bmatrix}$

Now i want to find $A$ using $x$ and $b$ matrices. How can i do that ? Some says there is a way to invert a non-square matrix (something like right and left) so i can find $A$, but i dunno how to do that.

Additional: What if i had $det(A)$ and sum of entries in $A$ (which is $-13$ & $11$ in this case).

Kitiara
  • 195
  • Your problem does not have a unique solution (unless $N=1$) : $N^2$ unknowns and $N$ equations. – Joce Jun 06 '14 at 12:16

2 Answers2

3

If $\bf x$ and $\bf b$ are given vectors in $\Bbb R^n$ and you want to find an $n\times n$ matrix $A$ such that $A\bf x=b$, you have to find the $n^2$ unknown entries of $A$ by solving $n$ linear equations. Such a system will never have a unique solution (except in the case $n=1$), so you cannot find a definite matrix $A$. In some cases there will be no solution (if $x$ or $b$ is the zero vector but $x\ne b$), in some cases there will be many solutions.

Addendum, for the revised question in which the determinant and the sum of entries in the matrix are knowm. For the case $n\ge3$ we still have more unknowns than equations and so we cannot expect a unique solution.

For the $2\times2$ case, suppose that $D$, the determinant of the matrix, and $S$, the sum of its entries, are given. If the entries of $\bf x$ are equal, then specifying the sum of the entries is either inconsistent, in which case there are no solutions, or redundant. In the latter case we solve two linear equations to find the four entries of $A$ in terms of two parameters; substituting into the equation for the determinant will in general give infinitely many solutions.

So, consider the following problem: find the matrix $$A=\pmatrix{w&x\cr y&z\cr}\ ,$$ given that $$A\pmatrix{a\cr b\cr}=\pmatrix{c\cr d\cr}\ ,\quad a\ne b\ ,\quad w+x+y+z=S\ ,\quad wz-xy=D\ .$$ Now $a$ and $b$ are not both zero; without loss of generality assume that $a\ne0$. Then the system of three linear equations $$aw+bx=c\ ,\quad ay+bz=d\ ,\quad w+x+y+z=S$$ has solutions $$w=-bt+\frac{c}{a}\ ,\quad x=at\ ,\quad y=bt+\frac{d-bz_0}{a}\ ,\quad z=-at+z_0$$ where $$z_0=\frac{aS-c-d}{a-b}\ ;$$ the system has nullity $1$, so this is in fact the general solution. Substituting into $wz-xy=D$ and simplifying, all the $t^2$ terms vanish and we have $$(c+d)t=\frac{c}{a}\frac{aS-c-d}{a-b}-D\ .$$ This has a unique solution if $c+d\ne0$; no solution or infinitely many solutions if $c+d=0$; and accordingly we get a unique solution, no solution or infinitely many solutions for $A$.

estownya
  • 103
David
  • 82,662
  • 2
    Note in addition that the only situation in which there would be no solution for $A$ is when $\vec x = \vec 0$ and $\vec b \neq \vec 0$ – Ben Grossmann Jun 06 '14 at 12:16
  • Hmm yes i understand. What if i had det(A) and sum of all elements in A (which is -13 & 11 in this case), would it be possible to get a unique solution ? – Kitiara Jun 07 '14 at 11:23
  • Sure. Actually if $c=d$ then $x$ cannot be the same matrix for the same $A$, it is impossible. Because $2x_1+3x_2 = 5x_1+x_2$ then $x$ has to be \begin{bmatrix} 2 \ 3 \end{bmatrix} so $b$ will be \begin{bmatrix} 13 \ 13 \end{bmatrix} As you can see $c=d$ and we can find the matrix $A$, still unique solution. – Kitiara Jun 08 '14 at 14:51
  • Sorry, there was a slip: the important point is whether or not $c=-d$. See revised solution. – David Jun 09 '14 at 01:41
  • Yes you're right. Thanks for your help. Let's think $A$ is a $n x n$ matrix with $n > 2$ ($x$ and $b$ are $n x 1$ of course). What do you think i need in order to get an unique $A$ ? (rather than det(A) & sum(A) or plus more) – Kitiara Jun 09 '14 at 18:23
  • Well in general, to find $n^2$ unknowns you need $n^2$ equations. So really you are probably looking at being given something like $AX=B$ where $X$ is an invertible matrix. – David Jun 10 '14 at 00:07
1

In the 2x2 case, if you want to find $A$ based on what it does to $x$, then you will need the result of $A$ on two linearly independent $x$'s. $$Ax_1 = b_1$$ $$Ax_2 = b_2$$ Then you can make a new matrix representation of the linear transformation: $$B = \left[ b_1, b_2 \right]$$ This is in the $(x_1,x_2)$ basis represented in terms of the columns $b_1$ and $b_2$. Next you will need to transform this back to the original basis using the matrix $$X = \left[ x_1, x_2 \right]$$ where we find: $$A = B X^{-1}$$

Joel
  • 16,256
  • Minor correction: by looking at the product one column at a time we have $AX=B$, so $A=BX^{-1}$. – David Jun 06 '14 at 12:27
  • Thanks David :) I just realized this as I was running out the door. – Joel Jun 06 '14 at 12:30
  • Unfortunately i'm not going to have the result of $A$ on two linearly independent $x$'s. Just for curiosity; how do you invert $X$ ? It is a 1x2 matrix. – Kitiara Jun 09 '14 at 18:13
  • $X$ is represented in column form here. So $x_1$ represents a $2\times 1$ matrix on its own. – Joel Jun 09 '14 at 18:40
  • Oh, I got misunderstood. That's definitely a solution but unfortunately no use to me. Thanks anyway :) – Kitiara Jun 09 '14 at 22:11
  • Sure thing. Have a great day :) – Joel Jun 09 '14 at 22:53