mapreduce matrix