Matlab1 example:
A = [1,2,3;4,5,6] B = [7,8,9;10,11,12] dot(A,B)
Result: 47 71 99
Matlab2 example:
sum(A.*B)
Result: 47 71 99
Nump variant of Matlab example2 example:
A = np.matrix([[1,2,3],[4,5,6]]) B = np.matrix([[7,8,9],[10,11,12]]) np.multiply(A,B).sum(axis=0)
Result: matrix ([[47, 71, 99]])
source share