#### Introduction

An identity matrix is a special type of scalar matrix in which all elements along the main diagonal are equal to 1 and all other elements are 0.#### Example

#### code (Python)

```
import numpy as np
a = np.identity(4)
print(a)
```

```
import numpy as np
a = np.identity(4)
print(a)
```