Exercise for type classes: Matrix multiplication