Go to http://mathworld.wolfram.com/MatrixMultiplication.html. In there you will find an algorithm for multiplying any two matrices that can be multiplied.