Calculates the negation of a matrix.