Matrix multiplication in mapreduce