The Properties of Matrices 
If $A$ and $B$ are a square matrix and $AB=I$ where $I$ is the identity matrix, show that $AB=BA$.
  I solve it, but does my solution correct ?

My Solution:
$$AB=I$$
 multiplying by $B$
$$BAB=BI$$
multiplying by $A$
$$BABA=BIA$$
by using the properties of matrices
$$(BA)(BA)=BA$$
from the last relation $BA=I$ so $$AB=BA$$

(1) We can use statement $n\times n$  matrix $A$ is invertible if ${\rm det}(A)\not= 0$. We have:
$$1= {\rm det}(I) = {\rm det}(AB)= {\rm det}(A){\rm det}(B). $$
So ${\rm det}(A)\not= 0$, hence $A$ is invertible, that is, there is $A^{-1}$ such that $AA^{-1}=A^{-1}A=I$. But we note that: 
$$ B= IB= (A^{-1}A)B= A^{-1}(AB)=A^{-1}I= A^{-1}.$$
(2) Or we can use statement:  for $n\times n$  matrix $M$, if ${\rm rank}(M) =n$ then there is $n\times n$ matrix $N$ such that $MN=I$ (multiple Gaussian reduction). In our case, as $AB=I$, then ${\rm rank}(B) =n$ ($Bx=0$ implies $A(Bx)=0$ which implies $x=0$). So, there is $C$ such that $BC=I$. Finally, we note that: $$C=IC=(AB)C=A(BC)=AI=A.$$
