Discovered by Georg Wittig, the Wittig reaction is an extremely versatile and commonly used method for the production of alkenes from carbonyl compounds in synthetic chemistry. It involves the replacement of a carbonyl (C=O) bond by an alkene (C=C) bond through the use of a phosphonium ylid.

An ylid is a zwitterion in which the opposite charges are on adjacent atoms, and the phosphonium ylid used in the Wittig reaction - that is, the Wittig reagent - is based on triphenylphosphine, or PPh3 where Ph is a phenyl group, C6H5.

First, triphenylphosphine is reacted with a haloalkane in a suitable solvent, such as toluene, to form a phosphonium salt where the anion is the halide ion, X-, and the cation is P+ bonded to the carbon chain from the haloalkane. It is this carbon chain which will be replace oxygen in the carbonyl compound to form the alkene, the target product, so the choice of haloalkane is critical.

The phosphonium salt is then reacted with n-butyllithium, CH3CH2CH2CH2Li, which abstracts a proton (H+) from the salt, leaving the carbon chain with a negative charge. (The halogen also leaves at this point.) This creates an ylid, where positively charged phosphorous is bonded to negatively charged carbon: Ph3P+-C--R. (This is actually a simplification of the structure of the ylid - the true structure includes a resonance contribution in which neutral phosphorous is doubly bonded to neutral carbon, Ph3P=C-R.)

The ylid is then reacted with the carbonyl compound: the negatively charged carbon in the ylid attacks the positively polarised carbon in the carbonyl compound, while the negatively polarised carbonyl oxygen attacks the positively charged phosphorous. This leads to the creation of two new double bonds: between the two carbons to form an alkene, the target product, and between the phosphorous and the oxygen to form triphenylphosphine oxide, Ph3P=O. It is the high strength of the P=O bond that drives the Wittig reaction.

As a simple example, imagine you want to synthesise 1-butene, H2C=CHCH2CH3. First, react triphenylphosphine with iodomethane (methyl iodide, CH3I) to form the phosphonium salt Ph3P+-CH3 I-. With n-butyllithium this is converted to the ylid Ph3P+-C-H2. This is then reacted with propanal, CH3CH2COH, and the C=O bond in propanal is replaced by C=C to form an alkene in which the three-carbon chain from propanal is doubly bonded to the single carbon from the ylid - this is 1-butene.

The Wittig reaction is among the most general syntheses of alkenes, and is one of the most common carbon-carbon bond-forming reactions in synthetic chemistry. It is similar in some ways to the Grignard reaction, in which carbon is made negatively charged with magnesium instead of phosphorous, but the Wittig reaction gives you an alkene instead of an alcohol.