add matrix mapred code

add matrix mapred code , neet to be tested