import numpy as np
# Create a 1D array with 9 evenly spaced values ranging from 0 to 8
arr = np.linspace(0, 8, 9)  
# Reshape the 1D array into a 3x3 matrix
matrix = arr.reshape(3, 3)
print(matrix)