In linear algebra, the identity matrix of size n is the n × 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 term unit matrix has also been widely used, but the term identity matrix is now standard. The term unit matrix is ambiguous, because it is also used for a matrix of ones and for any unit of the ring of all n×n matrices.
In some fields, such as group theory or quantum mechanics, the identity matrix is sometimes denoted by a boldface one, 1, or called "id" (short for identity); otherwise it is identical to I. Less frequently, some mathematics books use U or E to represent the identity matrix, meaning "unit matrix" and the German word Einheitsmatrix respectively.
In particular, the identity matrix serves as the multiplicative identity of the ring of all n×n matrices, and as the identity element of the general linear group GL(n) (a group consisting of all invertible n×n matrices). In particular, the identity matrix is invertible—with its inverse being precisely itself.
Using the notation that is sometimes used to concisely describe diagonal matrices, we can write
When the identity matrix is the product of two square matrices, the two matrices are said to be the inverse of each other.
The identity matrix is the only idempotent matrix with non-zero determinant. That is, it is the only matrix such that:
The principal square root of an identity matrix is itself, and this is its only positive-definite square root. However, every identity matrix with at least two rows and columns has an infinitude of symmetric square roots.