modified ld of matrix