protecting DiagMatrixLinear