The first thing to note is that not any two matrices can be multiplied. To carry out the multiplication we must have the column dimension of the left factor equal to the row dimension of the right factor. Nonetheless, wherever defined, the product is associative and distributive relative to the standard matrix addition. Matrix multiplication changes dimensions; so it's hard to talk about a unit element in general. A fruitful approach is to confine the study to square (m=n) matrices of the same dimension. So, let's for a while assume that all matrices below have dimension nxn. The benefit is immediate: any two such matrices can be multiplied. Moreover, the product is a matrix with the same dimension. This may be expressed by saying that
With respect to addition, this set is an abelian group. Adding
multiplication makes it a ring. The unit element is uniquely defined by E = (eik), where eik is the Kronecker's symbol eik = 1 iff i = k, and eik = 0, otherwise. (In matrix theory, the matrix is known as the identity matrix. All elements of an identity matrix are zero, except for the main diagonal, where all elements are 1.)
Not all square matrices are invertible. But, if both A and B are, then so is their product AB. Furthermore,
(AB)-1 = B-1A-1
This is verified formally:
(B-1A-1)(AB) = B-1(A-1A)B = B-1EB = B-1(EB) = B-1B = E.
and in a similar manner (AB)(B-1A-1) = E. However, in general, AB≠BA. For example,