rearranging matrix equation and solving/isolating for X matrix For whatever reason the only part of my linear algebra class I am struggling with is manipulating matrices equations to solve and isolate for a certain matrix. 
In the form of 
Example:  
Consider the following two elementary matrices 
$E_1 = \begin{bmatrix}1&0\\0&1/7\end{bmatrix} $
$E_2 = \begin{bmatrix}1&1\\0&1\end{bmatrix} $ 
Suppose that $A$ is a 2 x 2 matrix such that $E_2E_1A = I_2$. Find the matrix $A$
The way I went about solving to isolate $A$ was by doing the following: 


*

*$E_2E_1A = I_2$

*$A = I_2E_2^{-1}E_1^{-1}$
Now this is my problem. Obviously order matters in matrix multiplication, so from point 2 is it $A = I_2E_2^{-1}E_1^{-1}$ or $A = I_2E_1^{-1}E_2^{-1}$. 
I don't know why this is giving me a hard time to wrap my head around. I  care about the answer obviously, but I would much rather an explanation as to why it is suppose to be that way so that I can in future figure these things out myself.
Also, any documentation on the subject would be great. I obviously googled myself but found little documentation on manipulating matrices in the format I described above.  
 A: Just apply the proper inverses, one at a time, to "peel off" the unwanted matrix factors. You have to apply the on the correct "end" of the expression, so that the inverse is multiplied directly next to the factor you want to remove. That means you have to work from the outside in. So:
$$E_1E_2A=I$$
$$E_1^{-1}(E_1E_2A)=E_1^{-1}(I)\tag{apply $E_1^{-1}$ on left}$$
$$(E_1^{-1}E_1)E_2A=E_1^{-1}(I)\tag{associativity}$$
$$(I)E_2A=E_1^{-1}(I)\tag{inverse}$$
$$E_2A=E_1^{-1}\tag{identities}$$
Then do it again for $E_2$, since it is now the "outside" factor, and still on the left end:
$$E_2A=E_1^{-1}$$
$$E_2^{-1}(E_2A)=E_2^{-1}(E_1^{-1})\tag{apply $E_2^{-1}$ on left}$$
$$(E_2^{-1}E_2)A=E_2^{-1}E_1^{-1}\tag{associativity}$$
$$(I)A=E_2^{-1}E_1^{-1}\tag{inverse}$$
$$A=E_2^{-1}E_1^{-1}\tag{identity}$$
Does that help? The main thing to realize is that IT IS CRITICAL to apply a factor on the correct side of an expression, since you can't slide it around just anywhere -- you have to treat both sides of the equation of the same, either left-mulitply or right-multiply. Remember, $AB$ and $BA$ aren't necessarily the same thing. You have to decide which side to hit in order to effect the desired cancellation.
A: Does this clarify your mind?
$$
E_2 E_1 A = I
$$
$$
E_2^{-1} E_2 E_1 A = E_2^{-1} I 
$$
$$
E_1 A = E_2^{-1} 
$$
$$
E_1^{-1} E_1 A = E_1^{-1} E_2^{-1}
$$
$$
A = E_1^{-1} E_2^{-1} 
$$
In case of doubt, take your time and write things. 
(also check that $E_1$, $E_2$ are invertibles... this is the case here)
A: We have (using associativity) :
$$E_2E_1E_1^{-1}E_2^{-1} = E_2(E_1E_1^{-1})E_2^{-1} = I_2$$
Yet we have (except if the matrices commute) :
$$E_2E_1E_2^{-1}E_1^{-1} \ne I_2$$
So $ A = E_1^{-1}E_2^{-1}$
