  Diagonal groups are one of the classes of finite primitive permutation groups
occurring in the conclusion of the O'Nan-Scott theorem. Several of the other
classes have been described as the automorphism groups of geometric or
combinatorial structures such as affine spaces or Cartesian decompositions, but
such structures for diagonal groups have not been studied.
  The main purpose of this paper is to describe and characterise such
structures, which we call diagonal semilattices. Unlike the diagonal groups in
the O'Nan-Scott theorem, which are defined over finite characteristically
simple groups, our construction works over any group, finite or infinite.
  A diagonal semilattice depends on a dimension m and a group T. For m=2, it is
a Latin square, the Cayley table of T, though in fact any Latin square
satisfies our axioms. However, for m>=3, the group T emerges naturally and
uniquely from the axioms. (The situation somewhat resembles projective
geometry, where projective planes exist in profusion but higher-dimensional
structures are coordinatised by an algebraic object, a division ring.)
  A diagonal semilattice is contained in the partition lattice on a set, and we
provide an introduction to the calculus of partitions. Many of the concepts and
constructions come from experimental design in statistics.
  We also determine when a diagonal group can be primitive, or quasiprimitive
(these conditions are equivalent for diagonal groups).
  Associated with the diagonal semilattice is a graph, the diagonal graph,
which has the same automorphism group except in four small cases with m<=3. The
class of diagonal graphs includes some well-known families, Latin-square graphs
and folded cubes. We obtain partial results on the chromatic number of a
diagonal graph, and mention an application to synchronization.
