# Ylide

An ylide (/ˈɪlaɪd/) or ylid (/ˈɪlɪd/) is a neutral dipolar molecule containing a formally negatively charged atom (usually a carbanion) directly attached to a heteroatom with a formal positive charge (usually nitrogen, phosphorus or sulfur), and in which both atoms have full octets of electrons. The result can be viewed as a structure in which two adjacent atoms are connected by both a covalent and an ionic bond; normally written X$^+$–Y$^−$. Ylides are thus 1,2-dipolar compounds, and a subclass of zwitterions. They appear in organic chemistry as reagents or reactive intermediates.
The class name "ylide" for the compound should not be confused with the suffix "-ylide".

## Resonance structures

Many ylides may be depicted by a multiply bonded form in a resonance structure, known as the ylene form, while the actual structure lies in between both forms:
The actual bonding picture of these types of ylides is strictly zwitterionic (the structure on the right) with the strong Coulombic attraction between the "onium" atom and the adjacent carbon accounting for the reduced bond length. Consequently, the carbon anion is trigonal pyramidal.

## Phosphonium ylides

    Structure of methylenetriphenylphosphorane
Phosphonium ylides are used in the Wittig reaction, a method used to convert ketones and especially aldehydes to alkenes. The positive charge in these Wittig reagents is carried by a phosphorus atom with three phenyl substituents and a bond to a carbanion. Ylides can be 'stabilised' or 'non-stabilised'. A phosphonium ylide can be prepared rather straightforwardly. Typically, triphenylphosphine is allowed to react with an alkyl halide in a mechanism analogous to that of an S$_N$2 reaction. This quaternization forms an alkyltriphenylphosphonium salt, which can be isolated or treated in situ with a strong base (in this case, butyllithium) to form the ylide.
Due to the S$_N$2 mechanism, a less sterically hindered alkyl halide reacts more favorably with triphenylphosphine than an alkyl halide with significant steric hindrance (such as tert-butyl bromide). Because of this, there will typically be one synthetic route in a synthesis involving such compounds that is more favorable than another.
Phosphorus ylides are important reagents in organic chemistry, especially in the synthesis of naturally occurring products with biological and pharmacological activities. Much of the interest in the coordination properties of a-keto stabilized phosphorus ylides stems from their coordination versatility due to the presence of different functional groups in their molecular structure.

## Non-symmetric phosphorus ylides

The a-keto stabilized ylides derived from bisphosphines like dppe, dppm, etc., viz., [Ph$_2$PCH$_2$PPh$_2$]C(H)C(O)R and [Ph$_2$PCH$_2$CH$_2$PPh$_2$]C(H)C(O)R (R = Me, Ph or OMe) constitute an important class of hybrid ligands containing both phosphine and ylide functionalities, and can exist in ylidic and enolate forms. These ligands can therefore be engaged in different kinds of bonding with metal ions like palladium and platinum.

## Other types
### Based on sulfur

Other common ylides include sulfonium ylides and sulfoxonium ylides; for instance, the Corey-Chaykovsky reagent used in the preparation of epoxides or in the Stevens rearrangement.

### Based on oxygen

Carbonyl ylides (RR'C=O$^+$C$^−$RR') can form by ring-opening of epoxides or by reaction of carbonyls with electrophilic carbenes, which are usually prepared from diazo compounds. Oxonium ylides (RR'-O$^+$-C$^−$R'R) are formed by the reaction of ethers with electrophilic carbenes.

### Based on nitrogen

Certain nitrogen-based ylides also exist such as azomethine ylides with the general structure:
These compounds can be envisioned as iminium cations placed next to a carbanion. The substituents R$_1$, R$_2$ are electron withdrawing groups. These ylides can be generated by condensation of an α-amino acid and an aldehyde or by thermal ring opening reaction of certain N-substituted aziridines.
The further-unsaturated nitrile ylides are known almost exclusively as unstable intermediates.
A rather exotic family of dinitrogen-based ylides are the isodiazenes (R$^1$R$^2$N$^+$=N$^–$), which generally decompose by extrusion of dinitrogen.
Stable carbenes also have a ylidic resonance contributor, e.g.:

### Other

Halonium ylides can be prepared from allyl halides and metal carbenoids. After a [2,3]-rearrangement, a homoallylhalide is obtained.
The active form of Tebbe's reagent is often considered a titanium ylide. Like the Wittig reagent, it is able to replace the oxygen atom on carbonyl groups with a methylene group. Compared with the Wittig reagent, it has more functional group tolerance.

## Reactions

An important ylide reaction is of course the Wittig reaction (for phosphorus) but there are more.

### Dipolar cycloadditions

Some ylides are 1,3-dipoles and interact in 1,3-dipolar cycloadditions. For instance an azomethine ylide is a dipole in the Prato reaction with fullerenes.

### Dehydrocoupling with silanes

In the presence of the group 3 homoleptic catalyst Y[N(SiMe$_3$)$_2$]$_3$, triphenylphosphonium methylide can be coupled with phenylsilane. This reaction produces H$_2$ gas as a byproduct, and forms a silyl-stabilised ylide.

### Sigmatropic rearrangements

Many ylides react in sigmatropic reactions. The Sommelet-Hauser rearrangement is an example of a [2,3]-sigmatropic reaction. The Stevens rearrangement is a [1,2]-rearrangement.
A [3,3]-sigmatropic reaction has been observed in certain phosphonium ylides.

### Allylic rearrangements

Wittig reagents are found to react as nucleophiles in S$_N$2' substitution:
The initial addition reaction is followed by an elimination reaction.