You are viewing a single comment's thread. Return to all comments →
a1 = [1,2] a2 = [2,3] matrix_a = [a1,a2] b1 = [4,5] b2 = [7,8] matrix_b = [b1,b2] c1 = [0, 0] c2 = [0, 0] matrix_c = [c1,c2] for i in range(len(matrix_a)): for j in range(len(matrix_b[0])): for k in range(len(matrix_b)): matrix_c[i][j] += matrix_a[i][k] * matrix_b[k][j] for n in range(len(matrix_c)): for i in range(len(matrix_c[n])): print(matrix_c[n][i])
Seems like cookies are disabled on this browser, please enable them to open this website
Linear Algebra Foundations #3- Matrix Multiplication
You are viewing a single comment's thread. Return to all comments →