How to find matrix $A$ given $Ax=b$. Also $det(A)$ & $sum(A)$ are known. 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).
 A: 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$.
A: 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}$$
