Electrocyclic reactions
In an electrocyclic reaction, the ends of a conjugated polyene rotate by 90° to form a σ bond. If they rotate in the same direction, the closure is conrotatory; if in opposite directions, disrotatory. With 4n electrons the thermal reaction is conrotatory and the photochemical one disrotatory; with 4n + 2, the other way round. That is why these reactions are stereospecific.
Conrotatory or disrotatory
For the σ bond to form, the lobes that meet at the ends must have the same phase. In butadiene, the thermal HOMO (ψ2) has its ends in opposite phase: only conrotation brings them together in phase. With light the reacting orbital is ψ3, with the ends in phase, and the rotation is disrotatory. Closure of butadiene to cyclobutene is unfavourable because of ring strain; what is observed in practice is the opening of cyclobutene, which follows the same path in reverse.

| π electrons | Thermal (Δ) | Photochemical (hν) |
|---|---|---|
| 4n (4, 8…) | conrotatory | disrotatory |
| 4n + 2 (2, 6…) | disrotatory | conrotatory |
The animations show the two twists in (E,E)-hexa-2,4-diene in the s-cis conformation. When the ends turn in the same direction (conrotatory), one methyl ends up above the plane of the ring and the other below: the product is trans-3,4-dimethylcyclobutene. When they turn in opposite directions (disrotatory), both methyls end up on the same side: the cis isomer. Notice also the inner hydrogens, which turn towards the inside of the ring.
Stereospecificity
cis-3,4-Dimethylcyclobutene opens on heating to give exclusively (2E,4Z)-hexa-2,4-diene, and the trans isomer gives the (2E,4E) diene. In the trans isomer there are two possible conrotatory twists; the one that turns both methyls outwards is much more favourable than the one that would turn them inwards, where they would clash (torquoselectivity). With six electrons, (E,Z,E)-octa-2,4,6-triene closes thermally by the disrotatory path to the cis cyclohexadiene, and with light, by the conrotatory path, to the trans one.

The rules apply equally to ions: the allyl cation (2 electrons) closes to the cyclopropyl cation by the disrotatory path, and the pentadienyl cation (4 electrons) by the conrotatory one. The pentadienyl anion, with six electrons, closes in a disrotatory fashion.

An example of the closure of an allyl cation is one of the pathways of the Favorskii rearrangement of α-haloketones. If the enolate loses the halide before attacking the carbon, an oxyallyl cation is left: an allyl cation with an O− on the central carbon, that is, a two-π-electron system. Like the allyl cation, it closes in a disrotatory fashion and gives the cyclopropanone, which the nucleophile then opens.

The Nazarov cyclization
A divinyl ketone activated by a Brønsted or Lewis acid is a pentadienyl cation with an oxygen on the central carbon. Its four π electrons close in a conrotatory fashion to give an oxyallyl cation, which loses a proton and, after tautomerization, gives a cyclopentenone. This is the Nazarov reaction (1941), one of the best methods for building five-membered rings. The double bond of the product usually ends up in the more substituted position.

Nature also makes use of electrocyclic reactions: vitamin D3 is formed in the skin by the photochemical conrotatory opening of a cyclohexadiene, as shown in the example on the previous page.
