import numpy as np # create a 5x5 random matrix mat = np.random.rand(5,5) # normalize the matrix using mean and std normalized_mat = (mat - np.mean(mat)) / np.std(mat) print(normalized_mat)