Question: Write a Python program to implement matrix multiplication using numpy array.

Solution:

X = [[8,5,1],[9,3,2],[4 ,6,3]]
Y = [[8,5,3],[9,5,7],[9,4,1]]

result = [[0,0,0],[0,0,0],[0,0,0]]

for i in range(len(X)):
    for j in range(len(Y)):

        for k in range(len(Y)):
            result[i][j] += X[i][k] * Y[k][j]
print(result)

Output:  [[118, 69, 60], [117, 68, 50], [113, 62, 57]]

Video Solution For Python program to implement matrix multiplication using array.