In linear algebra, the identity matrix of size n is the n-by-n square matrix with ones on the main diagonal and zeros elsewhere. It is denoted by In, or simply by I if the size is immaterial or can be trivially determined by the context.
The important property of In is that
- AIn = A and InB = B
whenever these matrix multiplications are defined. In particular, the identity matrix serves as the unit of the ring of all n-by-n matrices, and as the identity element of the general linear group GL(n) consisting of all invertible n-by-n matrices. (The identity matrix itself is obviously invertible, being its own inverse.)
The ith column of an identity matrix is the unit vector ei.
Using the notation that is sometimes used to concisely describe diagonal matrices, we can write:
- In = diag(1,1,...,1)
It can also be written using the Kronecker delta notation:
- (In)ij = δij