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 *i*th column of an identity matrix is the unit vector *e _{i}*

Since matrices can only be multiplied if their sizes are compatible, there are identity matrices for each size. *I _{n}*, 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:

*I*.

It can also be written using the Kronecker delta notation: