To do matrix multplication in the standard sense, use the np.dot() function.

np.dot()

>>> A = np.array([[1,2,3],[4,5,6],[7,8,9]]) >>> B = np.array([[1,0,-1],[2,0,-2],[3,0,-3]]) >>> print(A) [[1 2 3] [4 5 6] [7 8 9]] >>> print(B) [[ 1 0 -1] [ 2 0 -2] [ 3 0 -3]] >>> np.dot(A,B) array([[ 14, 0, -14], [ 32, 0, -32], [ 50, 0, -50]])

*

>>> A*B array([[ 1, 0, -3], [ 8, 0, -12], [ 21, 0, -27]])