Both 1,3-butadiene (4n) and 1,3,5-hexatriene (4n + 2) cyclize with light or heat to give cyclobutene and 1,3-cyclohexadiene, respectively.
Like Diels-Alder, electrocyclic reactions are concerted and stereospecific.
Stereochemistry of electrocyclic reactions
4n systems heat cycle through the Homo. The formation of the CC single bond supposes the rotation of the orbitals in the same direction (conrotatory).
The 4n + 2 systems close with heat through the Homo. The spin of the orbitals occurs in opposite directions (disrotatory)
The 4n systems with light close through the Somo. The spin of the orbitals occurs in opposite directions (disrotatory)
The 4n + 2 systems with light cycle through the Somo. The rotation of the orbitals is in the same sense (conrotatory)