Matrix multiplication is backwards

IIRC, matrix multiplication is the dot products between the _rows_ of the first matrix, and the _columns_ of the second. You were doing the vice versa.