SN2 reaction

# Overview
The SN2 reaction (also known as bimolecular substitution nucleophilic) is a type of nucleophilic substitution, where a lone pair from a nucleophile attacks an electron deficient electrophilic center and bonds to it, expelling another group called a leaving group. Thus the incoming group replaces the leaving group in one step. Since two reacting species are involved in the slow, rate-determining step of the reaction, this leads to the name bimolecular nucleophilic substitution, or SN2. The somewhat more transparently named analog to SN2 among inorganic chemists is the interchange mechanism.

# Reaction mechanism
The reaction most often occurs at an aliphatic sp3 carbon center with an electronegative, stable leaving group attached to it - 'X' - frequently a halide atom. The breaking of the C-X bond and the formation of the new C-Nu bond occur simultaneously to form a transition state in which the carbon under nucleophilic attack is pentavalent, and approximately sp2 hybridised. The nucleophile attacks the carbon at 180 to the leaving group, since this provides the best overlap between the nucleophile's lone pair and the C-X - antibonding orbital. The leaving group is then pushed off the opposite side and the product is formed.
If the substrate under nucleophilic attack is chiral, this leads to an inversion of stereochemistry, called the Walden inversion.
In an example of the SN2 reaction, the attack of OH (the nucleophile) on a bromoethane (the electrophile) results in ethanol, with bromide ejected as the leaving group.
SN2 attack occurs if the backside route of attack is not sterically hindered by substituents on the substrate. Therefore this mechanism usually occurs at an unhindered primary carbon centre. If there is steric crowding on the substrate near the leaving group, such as at a tertiary carbon centre, the substitution will involve an SN1 rather than an SN2 mechanism, (an SN1 would also be more likely in this case because a sufficiently stable carbocation intermediary could be formed.)

# Reaction kinetics
The rate of an SN2 reaction is second order, as the rate-determining step depends on the nucleophile concentration,  as well as the concentration of substrate, .
This is a key difference between the SN1 and SN2 mechanisms. In the SN1 reaction the nucleophile attacks after the rate-limiting step is over, whereas in SN2 the nucleophile forces off the leaving group in the limiting step. In cases where both mechanisms are possible (for example at a secondary carbon centre), the mechanism depends on solvent, temperature, concentration of the nucleophile or on the leaving group.
SN2 reactions are generally favoured in primary alkyl halides or secondary alkyl halides with an aprotic solvent. They occur at a negligible rate in tertiary alkyl halides due to steric hindrance.
It is important to understand that SN2 and SN1 are two extremes of a sliding scale of reactions, it is possible to find many reactions which exhibit both SN2 and SN1 character in their mechanisms. For instance, it is possible to get a contact ion pairs formed from an alkyl halide in which the ions are not fully separated. When these undergo substitution the stereochemistry will be inverted (as in SN2) for many of the reacting molecules but a few may show retention of configuration.

# E2 Competition
A common side reaction taking place with SN2 reactions is E2 elimination when the incoming anion, acting as a base rather than as the nucleophile, abstracts a proton and forms the alkene. This effect can be demonstated in the gas-phase reaction between an phenoxide and a simple alkyl bromide taking place inside a mass spectrometer :
With ethyl bromide the reaction product is predominantly the substitution product but as steric hindrance around the electrophilic center increases as in isopropyl bromide elimination takes the upper hand.  Other factors favoring elimination are the strength of the base. With the less basic benzoate substrate isopropyl bromide reacts with 55% substitution. In general gas phase reaction and solution phase reactions of this type follow the same trends even though in the first solvent effects are eliminated.