Plate4
Unit 1 · Topic 4 of 11
Matrix multiplication
Medium, 7 min, 7 steps
Step 1 of 7 Matrices
Two matrices
A has 2 rows and 3 columns, B has 3 rows and 2 columns. We will find their product C.
A = [[2.0, -1.0, 3.0],[4.0, 0.0, 2.0]]B = [[1.0, 2.0],[0.0, 1.0],[3.0, -2.0]]C = [[sum(A[i][k] * B[k][j]for k in range(3))for j in range(2)]for i in range(2)]print(C)
- i
- 1
- j
- 1
- sonuc
- 11