The **identity matrix** of size is an square matrix where all of the values in its main diagonal are ones and all other values are zeroes. Alternatively, an identity matrix is a square diagonal matrix whose diagonal is one in every position. For example, the identity matrix of size 3 is

The identity matrix of size is the identity element of all invertible matrices of size .