DiagonalMatrix operator/(double x, const DiagonalMatrix &d) { return d.inv() * x; }
DiagonalMatrix operator/(const DiagonalMatrix &m1, const DiagonalMatrix &m2) { DiagonalMatrix ans(m2.inv()); ans *= m1; return ans; }