Definition. The identity matrix [00IT]

For any m: \mathbb {N}, we define the identity {\mathopen {}\left (m\times m\right )\mathclose {}}-matrix over a given semiring S as follows:

I^m_{i,j} = \begin {cases} 1&\text {if } i=j\\ 0&\text {otherwise} \end {cases}

The identity matrix is sometimes called the diagonal matrix, for reasons that become apparent when visualising it according to Notation [00J4]:

I^4 = \begin {bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end {bmatrix}