Add matrix calculation.