In linear algebra, the identity matrix is a matrix which is the identity element under matrix multiplication. That is, multiplication of any matrix by the identity matrix (where defined) has no effect. The ith column of an identity matrix is the unit vector ei
Since matrices can only be multiplied if their sizes are compatible, there are identity matrices for each size. In, the identity matrix of size n is defined as a diagonal matrix with 1 in every entry of its main diagonal. Thus:
Using the notation that is sometimes used to concisely describe diagonal matrices, it is:
It can also be written using the Kronecker delta notation: