The dot product operates on matrices of the same size. It is calculated as the sum of the products of the matrix components.
For example:
The WASM dot product instruction operates on 4 pairs of 2x1 matrices.
For a more detailed explanation of why the dot product is useful and how it can be derived, watch Grant Sanderson's excellent video, which is part of a larger series on the Essence of Linear Algebra