Nucleophilic substitution
A nucleophilic substitution 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: 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 OH and the leaving group is 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. S1 and S2 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 S1 reaction and the S2 reaction, where "S" stands for substitution, "N" stands for nucleophilic, and the number represents the kinetic order of the reaction. In the S2 reaction, the addition of the nucleophile and the elimination of leaving group take place simultaneously (i.e. a concerted reaction). S2 occurs when the central carbon atom is easily accessible to the nucleophile. In S2 reactions, there are a few conditions that affect the rate of the reaction. First of all, the 2 in  S2 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 S2 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 S2 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 S1 reaction involves two steps. S1 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 S2 reaction (discussed above) and because a highly substituted carbon forms a stable carbocation. Like S2 reactions, there are quite a few factors that affect the reaction rate of S1 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 S2 reactions were affected by sterics, S1 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. Reactions . There are many reactions in organic chemistry involve this type of mechanism. Common examples include: 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 S1 and S2 components with 61% (3,5 M, 70 °C) taking place by the latter. Other mechanisms. Besides S1 and S2, other mechanisms are known, although they are less common. The Si mechanism is observed in reactions of thionyl chloride  with alcohols, and it is similar to S1 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 S1' or S2' 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: 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 S1 or S2 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. When the substitution occurs at the carbonyl group, the acyl group may undergo nucleophilic acyl substitution. This is the normal mode of substitution with carboxylic acid derivatives such  as acyl chlorides, esters and amides.