Deep-ML is a free, open-source machine learning challenge platform. Practice ML coding problems, work with real datasets in labs, and learn through interactive articles.
Please enable JavaScript to use the full platform.
A = [[1,2],[2,4]], B = [[2,1],[3,4]]
[[8, 9], [16, 18]]
Reasoning: Each entry of C is the dot product of a row of A with a column of B. C[0][0] = 1·2 + 2·3 = 8 C[0][1] = 1·1 + 2·4 = 9 C[1][0] = 2·2 + 4·3 = 16 C[1][1] = 2·1 + 4·4 = 18
Moe Chabot
multiply two matrices together (return -1 if shapes of matrix don't align), i.e. C=A⋅BC = A \cdot BC=A⋅B