Thermal electrocyclic reactions proceed via the ground state HOMO of the conjugated system. The stereochemical outcome depends on the mode of ring closure and the number of π electrons. For example, consider the electrocyclization of a triene containing six π electrons and a diene with four π electrons. Let's examine the mode of ring closure in both systems under thermal conditions. The ground state HOMO of the triene has two nodes and symmetric terminal lobes. For the bond to form, the terminal lobes must overlap constructively. This can only happen if both lobes rotate in opposite directions, favoring a disrotatory ring closure and a cis product. In comparison, the ground state of the diene has one node and antisymmetric terminal lobes. Here, the lobes must rotate in the same direction to form the new σ bond, resulting in a conrotatory ring closure and a trans product. In summary, thermally allowed electrocyclic reactions are disrotatory if the number of π electron pairs is odd and conrotatory if it is even.