Identity matrix by Marco Taboga, PhD An identity matrix is a square matrix whose diagonal entries are all equal to one and whose off-diagonal entries are all equal to zero. Identity matrices play a key role in linear algebra. In particular, their role in matrix multiplication is similar to the role played by the number 1 in the multiplication of real numbers: a real number remains unchanged when it is multiplied by 1; a matrix remains unchanged when it is multiplied by the identity matrix . An identity matrix is a square matrix with ones on the main diagonal and zeros elsewhere. It has unique properties in linear algebra, such as being the multiplicative identity of the matrix ring and the identity function of a vector space. An identity matrix is a square matrix in which all the elements along the main diagonal are 1, and all other elements are 0. It is often denoted by I or In (where n is the matrix order). You’ll find this concept applied in areas such as matrix multiplication, matrix inversion, and solving equations using matrices in maths and computer science.