The challenge of understanding the collective behaviours of social systems can benefit from methods and concepts from physics1,2,3,4,5,6, not because humans are similar to electrons, but because certain large-scale behaviours can be understood without an understanding of the small-scale details7, in much the same way that sound waves can be understood without an understanding of atoms. Democratic elections are one such behaviour. Over the past few decades, physicists have explored scaling patterns in voting and the dynamics of political opinion formation (for example, see refs. 8,9,10,11,12,13). Here, we define the concepts of negative representation, in which a shift in electorate opinions produces a shift in the election outcome in the opposite direction, and electoral instability, in which an arbitrarily small change in electorate opinions can dramatically swing the election outcome, and prove that unstable elections necessarily contain negatively represented opinions. Furthermore, in the presence of low voter turnout, increasing polarization of the electorate can drive elections through a transition from a stable to an unstable regime, analogous to the phase transition by which some materials become ferromagnetic below their critical temperatures. Empirical data suggest that the United States’ presidential elections underwent such a phase transition in the 1970s and have since become increasingly unstable.