Identity Matrix

An identity matrix is a square matrix having 1s on the main diagonal, and 0s everywhere else.

For example, the 2 × 2 and 3 × 3 identity matrices are shown below.

These are called identity matrices because, when you multiply them with a compatible matrix, you get back the same matrix.

Example: