In this paper we use a duality result between equations and coequations for automata, proved by Ballester-Bolinches, Cosme-Ll´opez, and Rutten to characterize nonempty classes of deterministic automata that are closed under products, subautomata, homomorphic images, and sums. One characterization is as classes of automata defined by regular equations and the second one is as classes of automata satisfying sets of coequations called varieties of languages. We show how our results are related to Birkhoff’s theorem for regular varieties.