Electrocyclic reactions are a class of pericyclic reactions in organic chemistry that involve the formation or cleavage of a cyclic structure through the concerted movement of $\pi$ electrons. These reactions play a crucial role in the synthesis and interconversion of various organic compounds.