A unit matrix is an integer matrix consisting of all 1s. The unit matrix is often denoted , or if . Square unit matrices have determinant 0 for .
An unit matrix can be generated in the Wolfram Language as ConstantArray[1, m, n].
Let be a commutative ring with a multiplicative identity. Then the term "unit matrix" is also used to refer to an square matrix with entries in for which there exists an square matrix such that
with is the identity matrix (MacDuffee 1943, p. 27; Marcus and Minc 1988, p. 69; Marcus and Minc 1992, p. 42).
The term "unit matrix" is sometimes also used as a synonym for identity matrix (Akivis and Goldberg 1972, p. 71).