Working arithmetic and diagonals with zero matrix