# Nucleophilic substitution

In chemistry, a nucleophilic substitution (S$_N$) is a class of chemical reactions in which an electron-rich chemical species (known as a nucleophile) replaces a functional group within another electron-deficient molecule (known as the electrophile). The molecule that contains the electrophile and the leaving functional group is called the substrate.
The most general form of the reaction may be given as the following:
    ${\text{Nuc}}\mathbf {:} +{\ce {R-LG -> R-Nuc}}+{\text{LG}}\mathbf {:}$
The electron pair (:) from the nucleophile (Nuc) attacks the substrate (R−LG) and bonds with it. Simultaneously, the leaving group (LG) departs with an electron pair. The principal product in this case is R−Nuc. The nucleophile may be electrically neutral or negatively charged, whereas the substrate is typically neutral or positively charged.
An example of nucleophilic substitution is the hydrolysis of an alkyl bromide, R-Br under basic conditions, where the attacking nucleophile is hydroxyl (OH$^−$) and the leaving group is bromide (Br$^−$).
    ${\ce {OH- + R-Br -> R-OH + Br-}}$
Nucleophilic substitution reactions are common in organic chemistry. Nucleophiles often attack a saturated aliphatic carbon. Less often, they may attack an aromatic or unsaturated carbon.

## Saturated carbon centres
### S$_N$1 and S$_N$2 reactions

In 1935, Edward D. Hughes and Sir Christopher Ingold studied nucleophilic substitution reactions of alkyl halides and related compounds. They proposed that there were two main mechanisms at work, both of them competing with each other. The two main mechanisms were the S$_N$1 reaction and the S$_N$2 reaction, where S stands for substitution, N stands for nucleophilic, and the number represents the kinetic order of the reaction.
In the S$_N$2 reaction, the addition of the nucleophile and the elimination of leaving group take place simultaneously (i.e. a concerted reaction). S$_N$2 occurs when the central carbon atom is easily accessible to the nucleophile.
Nucleophilic substitution at carbon :
* S$_N$2 mechanism
In S$_N$2 reactions, there are a few conditions that affect the rate of the reaction. First of all, the 2 in S$_N$2 implies that there are two concentrations of substances that affect the rate of reaction: substrate (Sub) and nucleophile. The rate equation for this reaction would be Rate=k[Sub][Nuc]. For a S$_N$2 reaction, an aprotic solvent is best, such as acetone, DMF, or DMSO. Aprotic solvents do not add protons (H$^+$ ions) into solution; if protons were present in S$_N$2 reactions, they would react with the nucleophile and severely limit the reaction rate. Since this reaction occurs in one step, steric effects drive the reaction speed. In the intermediate step, the nucleophile is 185 degrees from the leaving group and the stereochemistry is inverted as the nucleophile bonds to make the product. Also, because the intermediate is partially bonded to the nucleophile and leaving group, there is no time for the substrate to rearrange itself: the nucleophile will bond to the same carbon that the leaving group was attached to. A final factor that affects reaction rate is nucleophilicity; the nucleophile must attack an atom other than a hydrogen.
By contrast the S$_N$1 reaction involves two steps. S$_N$1 reactions tend to be important when the central carbon atom of the substrate is surrounded by bulky groups, both because such groups interfere sterically with the S$_N$2 reaction (discussed above) and because a highly substituted carbon forms a stable carbocation.
Nucleophilic substitution at carbon :
* S$_N$1 mechanism
Like S$_N$2 reactions, there are quite a few factors that affect the reaction rate of S$_N$1 reactions. Instead of having two concentrations that affect the reaction rate, there is only one, substrate. The rate equation for this would be Rate=k[Sub]. Since the rate of a reaction is only determined by its slowest step, the rate at which the leaving group "leaves" determines the speed of the reaction. This means that the better the leaving group, the faster the reaction rate. A general rule for what makes a good leaving group is the weaker the conjugate base, the better the leaving group. In this case, halogens are going to be the best leaving groups, while compounds such as amines, hydrogen, and alkanes are going to be quite poor leaving groups. As S$_N$2 reactions were affected by sterics, S$_N$1 reactions are determined by bulky groups attached to the carbocation. Since there is an intermediate that actually contains a positive charge, bulky groups attached are going to help stabilize the charge on the carbocation through resonance and distribution of charge. In this case, tertiary carbocation will react faster than a secondary which will react much faster than a primary. It is also due to this carbocation intermediate that the product does not have to have inversion. The nucleophile can attack from the top or the bottom and therefore create a racemic product. It is important to use a protic solvent, water and alcohols, since an aprotic solvent could attack the intermediate and cause unwanted product. It does not matter if the hydrogens from the protic solvent react with the nucleophile since the nucleophile is not involved in the rate determining step.
Table 1. Nucleophilic substitutions on RX (an alkyl halide or equivalent) :
| Factor | S$_N$1 | S$_N$2 | Comments |
| Kinetics | Rate = k[RX] | Rate = k[RX][Nuc] |
| Primary alkyl | Never unless additional stabilising groups present | Good unless a hindered nucleophile is used | |
| Secondary alkyl | Moderate | Moderate | |
| Tertiary alkyl | Excellent | Never | Elimination likely if heated or if strong base used |
| Leaving group | Important | Important | For halogens, I > Br > Cl >> F |
| Nucleophilicity | Unimportant | Important | |
| Preferred solvent | Polar protic | Polar aprotic | |
| Stereochemistry | Racemisation (+ partial inversion possible) | Inversion | |
| Rearrangements | Common | Rare | Side reaction |
| Eliminations | Common, especially with basic nucleophiles | Only with heat & basic nucleophiles | Side reaction esp. if heated |

## Reactions

There are many reactions in organic chemistry involving this type of mechanism. Common examples include:
* Organic reductions with hydrides, for example
       R−X → R−H using LiAlH$_4$ (S$_N$2)
* Hydrolysis reactions such as
       R−Br + OH$^−$ → R−OH + Br$^−$ (S$_N$2) or
       R−Br + H$_2$O → R−OH + HBr (S$_N$1)
* Williamson ether synthesis
       R−Br + OR'$^−$ → R−OR' + Br$^−$ (S$_N$2)
* The Wenker synthesis, a ring-closing reaction of aminoalcohols.
* The Finkelstein reaction, a halide exchange reaction. Phosphorus nucleophiles appear in the Perkow reaction and the Michaelis–Arbuzov reaction.
* The Kolbe nitrile synthesis, the reaction of alkyl halides with cyanides.

### Borderline mechanism

An example of a substitution reaction taking place by a so-called borderline mechanism as originally studied by Hughes and Ingold is the reaction of 1-phenylethyl chloride with sodium methoxide in methanol.
The reaction rate is found to the sum of S$_N$1 and S$_N$2 components with 61% (3,5 M, 70 °C) taking place by the latter.

### Other mechanisms

Besides S$_N$1 and S$_N$2, other mechanisms are known, although they are less common. The S$_N$i mechanism is observed in reactions of thionyl chloride with alcohols, and it is similar to S$_N$1 except that the nucleophile is delivered from the same side as the leaving group.
Nucleophilic substitutions can be accompanied by an allylic rearrangement as seen in reactions such as the Ferrier rearrangement. This type of mechanism is called an S$_N$1' or S$_N$2' reaction (depending on the kinetics). With allylic halides or sulphonates, for example, the nucleophile may attack at the γ unsaturated carbon in place of the carbon bearing the leaving group. This may be seen in the reaction of 1-chloro-2-butene with sodium hydroxide to give a mixture of 2-buten-1-ol and 1-buten-3-ol:
    ${\ce {CH3CH=CH-CH2-Cl -> CH3CH=CH-CH2-OH + CH3CH(OH)-CH=CH2}}$
The Sn1CB mechanism appears in inorganic chemistry. Competing mechanisms exist.
In organometallic chemistry the nucleophilic abstraction reaction occurs with a nucleophilic substitution mechanism.

## Unsaturated carbon centres

Nucleophilic substitution via the S$_N$1 or S$_N$2 mechanism does not generally occur with vinyl or aryl halides or related compounds. Under certain conditions nucleophilic substitutions may occur, via other mechanisms such as those described in the nucleophilic aromatic substitution article.
Substitution can occur at the carbonyl group, such as acyl chlorides and esters.