Learning machine learning? Try my machine learning flashcards or Machine Learning with Python Cookbook.

# 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.