matrix * its inverse and AB=BA?

So, matrix A * its inverse gives you the identity matrix correct?

Also, if you have AB=BA, what does that tell you about the matrices? Is this only true when B is the inverse of A?

The definition of the inverse of a square matrix $A$ is a matrix $A^{-1}$ such that $A^{-1}A=I=AA^{-1}$.

It is possible for matrices $A$ and $B$ to satisfy the equation $AB=BA$. When that happens, we say that they commute. wiki

This does not imply that they are inverses of one another however. Take for trivial counterexample the $1\times 1$ matrices (which act exactly like real numbers). $==$ but $\neq $ so they are not inverses of one another.

Let $A\in\mathbb{R}^{n\times n}$, $\lambda\in\mathbb{R}$ and $B:=\lambda A\in\mathbb{R}^{n\times n}$, then one has: $$AB=BA.$$ Therefore, if $A\in GL(n,\mathbb{R})$, $B:=A^{-1}$ is not the only matrix such that $AB=BA$. One can define: $$\mathcal{C}(A):=\{B\in\mathbb{R}^{n\times n}\textrm{ s.t. }AB=BA\}\subset\mathbb{R}^{n\times n}.$$ $\mathcal{C}(A)$ is a vector subspace of $\mathbb{R}^{n\times n}$ and we have seen that: $$\{\lambda A;\lambda\in\mathbb{R}\}\subset\mathcal{C}(A).$$

If AB = BA this does not tell you that they are inverses. For example A = I. I will refer you to this for a more detailed answer.

As for your first question if what you mean is does $AA^{-1}=I$? It does as that is a definition of inverse.

Yes, every invertible matrix $A$ multiplied by its inverse gives the identity.

$AB=BA$ can be true iven if $B$ is not the inverse for $A$, for example the identity matrix or scalar matrix commute with every other matrix, and there are other examples.

• Not any diagonal matrix commutes with each element of $\mathbb{R}^{n\times n}$, indeed, let define $$\begin{pmatrix}1 & 0\\0 & 2\end{pmatrix}.$$ $A$ doesn't commute with $E_{1,2}$. – C. Falcon Nov 15 '15 at 22:36
• This was a typo, I hit enter by accident. Take a look now. :) – C. Falcon Nov 15 '15 at 22:42
• @Ah yes, you are correct. It is only if it is a scalar multiple of the identity, not any diagonal. – Morgan Rodgers Nov 15 '15 at 22:43
• @Sheol Thank you, I wrote diagonal, but in my head i was thinking of a scalar matrix. – mrprottolo Nov 15 '15 at 22:45