Formula and method
For A × B, each output entry is a row-column dot product. A’s column count must match B’s row count; addition requires identical dimensions.
Worked example
Multiplying [[1, 2], [3, 4]] by [[5, 6], [7, 8]] gives [[19, 22], [43, 50]].