Update 2-D matrix with matrix add and matrix multiply functions