Left and right multiplying of matrices I am new to matrix multiplication and trying to understand something. Suppose you have a matrix equation $ A x=b $. I know to solve for $x$ you should left multiply by the inverse of A. But what is the reason you can't solve for $b$ like this: $ A A^{-1} x=b A^{-1} $ so that  $ x=b A^{-1} $? 
I tried with an example to see that it doesn't work but I don't have a good understanding of the mechanics why not.
What if you had something like this instead:
$ A x = By $
could you solve like this?
$ AA^{-1} x = BA^{-1}y $
and then get the solution 
$  x = BA^{-1}y $
or do you have to solve like this
$ A^{-1}A x = A^{-1}By $
to get the solution
$  x = A^{-1}By $

Emanuele and user228113 have already given very good answers. If I may add, the reason why $$Ax=By \nRightarrow AA^{-1}x = BA^{-1}y$$  is same one behind $$f(x) = g(y) \nRightarrow (f \circ f^{-1})(x) = (g \circ f^{-1})(y).$$
Matrix multiplication is defined so that it works right to left, just like function composition. This allows matrices to represent linear transformations more intuitively. It's also why we conventionally represent vectors as column matrices.
