Find $A$ given $A^2$ and $B$ and $(A^2)^{-1} = A^{-1}B$ This excersice took place in class I had today. The exercise was the following:


  Let the regular matrix $A$,$B$:
  
  $$A^2 = \left[ \begin{matrix} 2 &amp;-2 &amp; 2\\ -2 &amp; 2 &amp; 2 \\ 4&amp;4&amp;-4 \end{matrix} \right]  \hspace{2cm}  B = \left[ \begin{matrix} 0 &amp;-1 &amp; 2\\ 0 &amp; 2 &amp; 0 \\ 1&amp;3&amp;-1 \end{matrix} \right]$$
  
  Knowing that $(A^2)^{-1} = A^{-1}B$, find A.


My Attempt

During the exam I tried the following:

$(A^2)^{-1} = A^{-1}B \Leftrightarrow A^2(A^2)^{-1} = A^2A^{-1}B \Leftrightarrow I_n = AB \Leftrightarrow A = B^{-1}$

And procedeed to find the inverse of B, which is:

$A = B^{-1} = \left[ \begin{matrix} \frac{1}{2} &amp;\frac{-5}{4} &amp;  1\\ 0 &amp; \frac{1}{2} &amp; 0 \\ \frac{1}{2}&amp; \frac{1}{4}&amp;0 \end{matrix} \right]$

But, as I tend to make silly mistakes, I figured out that it would be a better way to do find $A$ just by using matrix products. We had $I_n = AB \Leftrightarrow A = A^2B$. Using this method I got that

$A = A^2B = \left[ \begin{matrix} 2 &amp; 0 &amp;  2\\ 2 &amp; 12 &amp; -6 \\ -4&amp; -8&amp;12 \end{matrix} \right]$

But as you can see the $2$ matrix are different. Where is the mistake in my logic?

Another thing I noticed is that $I_n = AB \Leftrightarrow A*I_n*B = A*(AB)*B \Leftrightarrow I_n = AB = A^2B^2$, but $A^2B^2$ isn't the identity matrix, so maybe the exercise is wrong, but I rather not rush into that thinking.
Use the properties of determinant to show that the given relationship does not hold.
$$\det ((A^2)^{-1})=-\frac1{64}=\det (A^{-1})\cdot(-4)$$
from the given relationship and properties of determinant. So $\det (A)=64\cdot 4$ and this cannot be true.
Long story short, matrix multiplication is not commutative.



Te equation $A=A^2B$ is not correct. From the equation $$(A^2)^{-1} = A^{-1}B$$

you have to multiply it by $A$ from the left to get
$$A(A^2)^{-1} = B$$

and the multiply it by $A^2$ from the right and you get

$$A=B\cdot A^2$$

which is not the same as $A=A^2B$.



However, even using $A=BA^2$ results in two different calculations of what $A$ is, and this seems to me like a mistake in the exercise. Indeed, from $(A^2)^{-1} = A^{-1}B$, it should follow that $I=A^2A^{-1}B=AB$, and from that, it should follow that $A=B^{-1}$. However, it is not true that $(B^{-1})^2=A^2$ which means that $A=B^{-1}$ cannot hold, which is a contradiction.