  In this paper we study algebraic sets of pairs of matrices defined by the
vanishing of either the diagonal of their commutator matrix or its
anti-diagonal. We find a system of parameters for the coordinate rings of these
two sets and their intersection and show that they are complete intersections.
Moreover, we prove that these algebraic sets are $F$-pure over a field of
positive prime characteristic and the algebraic set of pairs of matrices with
the zero diagonal commutator is $F$-regular.
