text: # All solutions to the matrix equation $AX=B$
  
  Could you please give me some tips, directions, on how to find all $3\times 3$ matrices$X$, so that $AX=B$. The matrices $A$ and $B$ are given.
  
  I've made a long way, multiplying $A$ with $x_{k}$: \begin{align} Ax_{1} &= b_{1}\\ Ax_{2} &= b_{2}\\ Ax_{3} &= b_{3}\end{align} Solved them as matrices and got $X$ with all it $x_{k}$ (columns), but it appears, that it wrong. Because when I substitute $X$ I get another $B$ matrix (the last column is wrong).
  
  Do I use wrong strategy? Or the strategy is right and the answer should be right? How can I find all $X$? What does it mean?
  
  Best.
  
  -
  If $\mathbf A$ is nonsingular, $\mathbf X$ is unique. Just treat the columns of $\mathbf B$ as successive right-hand sides of a linear system, and the solutions of those linear systems are the columns of $\mathbf X$. – J. M. Nov 2 '11 at 1:11
  Did you check the rank of $A$? Is $A$ invertible? – user13838 Nov 2 '11 at 1:11
  If your last column is wrong you probably made a mistake when you solved the LAST equation. – N. S. Nov 2 '11 at 1:20
  Yes, It's invertible (checked it online). @percusse, what should rank tell me? – Lissa Nov 2 '11 at 1:24
  @Lissa After having rest, please take your time and accept the answers of your questions (which you have not done yet!) by using the tick mark next to your favorite answers. In a way, it wraps up the question. – user13838 Nov 2 '11 at 2:15
  
  Your strategy is right: $A X = B$ does mean the product of $A$ with each column of $X$ is the corresponding column of $B$. Perhaps something went wrong in your calculation.
  If $A$ is nonsingular, $X$ is unique, and in fact it is $A^{-1} B$. If $A$ is singular (and $3 \times 3$), then depending on $B$ there might not be any solution; and if there is a solution, it will not be unique, because you can add any vector $x$ with $Ax = 0$ to any column of a solution $X$ and get another solution.
  That's one way to prove it. Another way is to calculate the determinant of $A$: if that is not 0, the matrix is nonsingular. – Robert Israel Nov 2 '11 at 23:43