This for-loop uses the indices as shown above
```
- for i in range(0, mat_X_num_rows):
- for k in range(0, mat_Y_num_cols):
- for j in range(0, mat_X_num_cols): # or mat_Y_num_rows
- mat_Z[i][k] += mat_X[i][j] * mat_Y[j][k]
+for i in range(0, mat_X_num_rows):
+ for k in range(0, mat_Y_num_cols):
+ for j in range(0, mat_X_num_cols): # or mat_Y_num_rows
+ mat_Z[i][k] += mat_X[i][j] * mat_Y[j][k]
```
Calculations:
The code:
```
- for i in range(mat_X_num_rows):
- for j in range(0, mat_X_num_cols): # or mat_Y_num_rows
- for k in range(0, mat_Y_num_cols):
- mat_Z[i][k] += mat_X[i][j] * mat_Y[j][k]
+for i in range(mat_X_num_rows):
+ for j in range(0, mat_X_num_cols): # or mat_Y_num_rows
+ for k in range(0, mat_Y_num_cols):
+ mat_Z[i][k] += mat_X[i][j] * mat_Y[j][k]
```
Index list: