Adding 2 matrix functions