import numpy as np A = np.array([[1,1],[3,4]]) B = np.array([[5,1],[0,-2]]) C = np.dot(A,B) D = np.dot(B,A) if np.all(C==D): print ("true") else : print ("false")
To embed this project on your website, copy the following code and paste it into your website's HTML: