We have revisited the photochromic spiro-dihydroindolizine/betaine (DHI/B) system applying state-of-the-art density functional theory (DFT) calculations in combination with stationary and time-resolved absorption measurements. DHI/B-systems are becoming increasingly important as potential molecular machines, molecular switches, and photoswitchable electron-acceptors. The knowledge of the exact mechanisms of ring opening and closure, as well as of the geometries of DHI and betaine can provide critical information that will enable the design of better molecular machines and optical switches. The first surprising result concerns the electronic structure of the betaines, which is quite different than commonly assumed. The photochemical ring opening of DHI's to betaines is a conrotatory 1,5 electrocyclic reaction, whereas the thermal ring-closing occurs in the disrotatory mode. According to our results, the electrocyclic back reaction of the betaines to the DHI is NOT rate determining, as previously thought, but instead the kinetics are dictated by the cis-trans-isomerization of the betaine. [ABSTRACT FROM AUTHOR]