Special Types of Matrices
Diagonal matrix
A square matrix is a diagonal matrix if every entry off the main diagonal is zero. The diagonal entries themselves can be anything, including zero.
Scalar matrix
A scalar matrix is a diagonal matrix where every diagonal entry is equal to the same number , a stricter version of "diagonal."
Identity matrix
The identity matrix, written , is the scalar matrix where that repeated diagonal value is specifically 1, the strictest of the three. It behaves like the number 1 does in ordinary multiplication: for any compatible matrix .
So every identity matrix is a scalar matrix, every scalar matrix is a diagonal matrix, but not the other way around.