# Create A Matrix

## Preliminaries

```
# Load library
import numpy as np
```

## Create Matrix

```
# Create matrix
matrix = np.array([[1, 4],
[2, 5]])
```

Note NumPy’s `mat`

data structure is less flexible for our purposes and should be avoided.

```
# Load library
import numpy as np
```

```
# Create matrix
matrix = np.array([[1, 4],
[2, 5]])
```

Note NumPy’s `mat`

data structure is less flexible for our purposes and should be avoided.