2×2
- Input
- [[1,2],[3,4]] × [[5,6],[7,8]]
- Expected output
- [[19,22],[43,50]]
1·5+2·7 = 19.
matrix multiplication
A×B is computed by summing the products of each row of A with the columns of B.
1·5+2·7 = 19.
A's columns = B's rows.
When the number of columns of the first (A) equals the number of rows of the second (B). The result has A's rows and B's columns. Matrix multiplication is not commutative: A×B ≠ B×A in general.
No. The number of columns of the first must equal the number of rows of the second.
No. Order matters: A×B is usually different from B×A.
Calculations run in your browser. No data is sent to a server.