The reactions of the singlet methylene (1a) and dimethylcarbene (1b), with their diazirine precursors, diazirine (2a), and dimethyldiazirine (2b), have been studied theoretically using ab initio and density functional theory. The reaction has no activation barriers for the parent system (1a+2a) and proceeds via a reactive complex and a transition state with a small negative enthalpy of activation &Dgr;Hnot =298= -1.1 kcal mol-1, &Dgr;Snot =298= -34.4 cal mol-1K-1, &Dgr;G°298= 9.2 kcal mol-1) for the dimethyl derivatives (1b+2b). The formation ofN-methylene diazirinium ylides (3a,b) is exothermic by 64-80 kcal mol-1. The isomer, 1,3-diazabicyclo[1.1.0]butane (4a), is more stable (5-12 kcal mol-1) than isomer3a, but can neither be formed by direct thermal reaction of1awith2anor undergo the direct rearrangement into formaldazine (5a). The rearrangement of ylides3a,binto azines5a,bproceeds by conrotatory C3-N1ring opening. The predicted activation barrier of ca. 15 kcal mol-1for the ring opening in ylide3bis in excellent agreement with experimental data. The formation of pyridinium ylides from carbenes and pyridine is also studied.Key words: diazirinium ylide, ab initio MO (molecular orbital) theory, density functional theory, pyridinium ylide, CIS (singles configuration interaction) transition energies