import numpy as np
n_array = np.array([[1, 2, 3],
                    [4, 5, 6],
                    [7, 8, 9]])
print("Numpy Matrix is:")
trace = np.trace(n_array)
print("\nTrace of given 3X3 matrix:")
print(trace)

#15 (trace-sum of diagonal elements)