Carboxylic Acids & Derivatives Section 83 of 123

Esters & amides

the why on every wrong step

15 min readfree

Add a few drops of acetyl chloride to water and it reacts at once, giving off fumes of HCl. Methyl acetate in the same water barely changes unless an acid or a base is added. Acetamide survives until it is heated with strong acid or base for hours. All three are derivatives of acetic acid, and all three react in the same way. What differs is the group bonded to the carbonyl carbon, and across the whole family that one change spreads the rates over a factor of about 10¹³.

Two questions about that group explain the spread: how easily does it leave, and how strongly does it share its lone pairs with the carbonyl?

Four derivatives, one core structure

Start from acetic acid, CH₃–C(=O)–OH, and replace its OH. Put Cl in its place and you have acetyl chloride. Put in O–C(=O)–CH₃, the acetate part of a second acetic acid molecule, and you have acetic anhydride. With OCH₃ you have methyl acetate, and with NH₂ you have acetamide.

Each of these is a carboxylic acid derivative: a compound R–C(=O)–X, in which a group X has taken the place of the acid's OH. The four families are the acid chloride (X = Cl), the anhydride (X = O–C(=O)–R), the ester (X = OR) and the amide (X = NR₂, where either R may be an H). The R–C(=O)– part that they share is called an acyl group.

Nitriles, R–C≡N, are usually studied alongside them, because water converts a nitrile into the same carboxylic acid. They are left off the ladder below because they have no group X to lose. Their own section, later in this chapter, explains what they do instead.

In every derivative, the atom of X that is bonded to the carbonyl carbon carries lone pairs, and it shares them with the C=O by resonance. The OH of a carboxylic acid does the same, as the previous section showed.

How a derivative reacts

Take hydroxide and acetyl chloride. The hydroxide adds to the carbonyl carbon just as a nucleophile adds to a ketone in Carbonyl Chemistry, giving a tetrahedral intermediate with an O⁻. A ketone's intermediate has nothing to lose except the nucleophile that just added, so it usually picks up a proton. This one carries a Cl, and Cl can leave: the O⁻ re-forms the C=O and chloride departs. The OH has replaced the Cl.

This add-then-expel exchange is nucleophilic acyl substitution. Nearly every reaction on this page runs this way (the one exception, LiAlH₄ with an amide, comes at the end), and the next section works through it step by step. What matters here is that the second step expels X, so the reaction depends on how willingly X leaves.

ORXCNu−O−RNuXCORNuC+X−tetrahedral intermediate1. Nu⁻ adds to the C=O carbon2. the C=O re-forms and X leaves3. Nu has replaced X
The coral carbon starts flat, becomes tetrahedral in the middle stage, and ends flat again, now carrying Nu in place of X.

The reactivity ladder

Rank the four acetic acid derivatives by how easily X leaves and you get the ladder below: acetyl chloride at the top, then acetic anhydride, then methyl acetate, with acetamide at the bottom.

four derivatives of acetic acidwhat leaves; its conjugate acid’s pKareactivity toward a nucleophileOCH₃ClCacetyl chlorideCl⁻ leaves; HCl has pKa −7the weakest base of the four: leaves easilyOCH₃OCOCH₃Cacetic anhydrideCH₃CO₂⁻ leaves; CH₃CO₂H has pKa 4.8a weak base: leaves readilyOCH₃OCH₃Cmethyl acetateCH₃O⁻ leaves; CH₃OH has pKa 15.5a strong base: leaves reluctantlyOCH₃NH₂CacetamideNH₂⁻ would leave; NH₃ has pKa 38a very strong base: almost never leaves
The highlighted atoms are the group X that leaves. Read down the middle column: the higher the pKa of the conjugate acid, the stronger the base that would have to leave, and the shorter the bar.

Two effects produce this order, and both point the same way.

A better leaving group means a faster second step. A group leaves well when it leaves as a weak base, the rule from How Reactions Happen. Chloride is the conjugate base of HCl, pKa −7, so it leaves readily. An amide's nitrogen would have to leave as R₂N⁻, the conjugate base of an amine with pKa near 38, and it essentially never does. An anhydride's carboxylate (conjugate acid pKa about 5) and an ester's alkoxide (about 16) sit in between.

Stronger donation means a less electrophilic carbonyl. The more lone-pair density X pushes into the C=O, the less positive the carbonyl carbon becomes, and the less it attracts a nucleophile in the first step. Nitrogen is the best donor of the four. It is the least electronegative of N, O and Cl, so it holds its lone pair most loosely, and an amide's carbonyl is the least electron-poor.

The bridging oxygen of an anhydride donates to two carbonyls at once, so each one receives only part of its lone-pair density. That shared donation is weaker than an ester oxygen's, which serves only one carbonyl.

Chlorine donates worst, and the reason is the size of its orbitals. Its lone pairs sit in 3p orbitals, which are larger and more spread out than carbon's 2p, and the C–Cl bond is long. The two orbitals overlap poorly side by side, so little density passes into the C=O, and an acid chloride's carbonyl is the most electrophilic of the four.

C 2p beside O 2pC 2p beside Cl 3pCOsame size, side by side: good overlapO donates its lone pairs well (N does too)CCllarger, more diffuse, longer bond: poor overlapCl donates its lone pairs weakly
On carbon, the upright lobes are the p orbital it uses in the C=O π bond; on O and Cl, they hold a lone pair. Compare how well each pair of lobes matches in size.
DerivativeXResonance donationX as leaving groupReactivity
acid chlorideClvery poorexcellenthighest
anhydrideO–C(=O)Rpoor (shared)goodhigh
esterORmoderatemoderatemoderate
amideNR₂strongterriblelowest
Any derivative can be turned into one below it on the ladder, but not directly into one above it. Acetyl chloride and methanol give methyl acetate easily, but methyl acetate cannot be turned back into acetyl chloride directly. To climb, go back to the carboxylic acid and treat it with SOCl₂, which gives the acid chloride at the top (a later section, Acid chlorides & anhydrides, shows how).

A look back: the same ladder appears in infrared spectra, where the C=O stretch falls from about 1800 cm⁻¹ for an acid chloride to about 1650 for an amide, as IR showed. The cause is the same donation into the C=O.

Amide resonance

Look first at N,N-dimethylformamide (DMF), HC(=O)N(CH₃)₂. Its nitrogen donates into the carbonyl so strongly that the C–N bond has about 40% double-bond character. A double bond does not turn, so rotation about this C–N bond is restricted, with a barrier of roughly 20 kcal/mol.

The shape follows from the same donation. Six atoms lie in one plane: the carbonyl O, C and H, the N, and the two methyl carbons on N. The nitrogen is flat rather than pyramidal like an amine's, because its lone pair sits in a p orbital lined up with the C=O π system.

The two methyls of DMF look the same on paper. In the molecule, one sits on the oxygen side of the C–N bond and the other on the hydrogen side, and the locked bond keeps them from swapping. A look ahead: ¹H NMR spectroscopy, taught in NMR Spectroscopy, gives one signal for each set of hydrogens that share an environment. At room temperature it shows DMF's two methyls as two signals.

dimethylformamide (DMF)the charge-separated contributorHCH₃CH₃abONCHCH₃CH₃abO−N+Clone pair on N, C=O doubleC=N double, + on N, − on O
Follow the two curved arrows from the left structure to the right one. Then find methyls a and b: to swap places they would have to turn about the C–N bond.

This matters well beyond organic chemistry. The peptide bond that joins amino acids in a protein is an amide, so it is planar and does not turn. That leaves only two bonds free to rotate in each amino acid unit of the backbone. Alpha helices and beta sheets, the regular shapes that proteins fold into, are possible because amide resonance locks the third bond. Biomolecules returns to this.

Amide resonance also explains why amides are not basic. An amine's lone pair is free, so an amine is a decent base: its conjugate acid has a pKa of about 10. An amide's lone pair is tied up in the carbonyl, so an amide is essentially non-basic. Its conjugate acid has a pKa near 0, and even that proton sits on the oxygen, as the next paragraph shows. One resonance interaction makes that difference.

Strong acid does protonate an amide, and the proton goes on the oxygen, not the nitrogen. With the proton on oxygen, the nitrogen lone pair still feeds the C=O, so the positive charge is shared between O and N. With the proton on nitrogen, that lone pair is used up in the new N–H bond, and the delocalization that stabilizes the amide is lost. Protonation on nitrogen is about seven pKa units less favorable.

PROTON ON OXYGENPROTON ON NITROGENCH₃HO+NH₂CCH₃HONH₂+CO and N share the + charge: two contributorsCH₃ONH₃+CN has no lone pair left to give
Count the contributors in each panel. The left cation can be drawn two ways and the right one only one way.

Esters: common, mild, versatile

Heat acetic acid and ethanol with a little sulfuric acid, and ethyl acetate and water form. This is Fischer esterification: a carboxylic acid and an alcohol, with an acid catalyst, give an ester. It is an equilibrium, so it is pushed toward the ester with a large excess of the alcohol or by removing water as it forms. An acid chloride and an alcohol also give the ester, faster and with no equilibrium to fight, because that reaction runs down the ladder. The next section draws the Fischer mechanism.

Water with an acid catalyst runs Fischer esterification in reverse and gives back the acid and the alcohol. Every step is reversible, so this hydrolysis also stops at an equilibrium.

In base, the outcome changes. Take ethyl benzoate and aqueous NaOH. Hydroxide adds to the carbonyl and ethoxide leaves, following the two-step pattern. Ethoxide (ethanol's pKa is 16) and hydroxide (water's is 15.7) are almost equally good leaving groups, so those two steps alone would sit near equilibrium.

A third step settles it. The ethoxide just released is a strong base, and it takes the proton from the benzoic acid just formed. The benzoate ion that results is negatively charged and resonance-stabilized, so no nucleophile attacks it, and the reaction cannot run backward. Base hydrolysis of an ester is therefore irreversible and goes to completion. It is called saponification, from sapo, Latin for soap. Applied to the long-chain esters in fats, it makes soap. An acidic workup with H₃O⁺ at the end protonates the benzoate and gives benzoic acid.

OC₆H₅OC₂H₅CHO−O−C₆H₅OHOC₂H₅COC₆H₅OHCC₂H₅O−OC₆H₅O−C+HOC₂H₅1. hydroxide adds to the C=O2. the C=O re-forms; ethoxide leaves3. ethoxide takes the acid’s protonproducts: carboxylate + ethanol, no way back
Stages 1 and 2 are the two-step pattern from the top of the page. Stage 3 is the new one: follow its arrows from the ethoxide to the acid’s H.

Heat methyl acetate in a large excess of ethanol with a little acid, and ethyl acetate and methanol form. An ester can swap its alkoxy group (OR) for another in this way, with an acid or a catalytic amount of alkoxide. The new alcohol's oxygen adds, the old OR group leaves, and a different ester forms. This is transesterification. The alcohol coming in and the one leaving have similar pKa values, so neither side is favored. Only the large excess of the new alcohol pushes the reaction forward, which is why it is run with that alcohol as the solvent.

Biodiesel is made this way. A vegetable oil is a triglyceride, three esters built on one molecule of glycerol, HOCH₂–CH(OH)–CH₂OH. Heated with excess methanol and a catalyst, it gives three methyl esters, which are the fuel, and glycerol.

LiAlH₄ reduces an ester to two alcohols (a primary alcohol from the acyl part), while NaBH₄ leaves it alone. Oxidation & Reduction explains why one reagent reduces esters and the other does not.

Worked example — one ester, two reagents

Give the products of ethyl benzoate, C₆H₅–C(=O)–OCH₂CH₃, with (a) NaOH in water, then H₃O⁺; (b) excess LiAlH₄, then H₂O.

(a) Saponification, the stages in the figure above. After the acidic workup the products are benzoic acid + ethanol: two separate molecules, not one.

(b) LiAlH₄. Hydride adds and ethoxide leaves. The benzaldehyde that forms is more electrophilic than the ester was, so a second hydride adds at once, and the aldehyde cannot be isolated. The products are benzyl alcohol + ethanol: two alcohols, and the one from the acyl part is primary.

Both begin with the same add-then-expel pattern, and in both the OCH₂CH₃ group is the one that leaves. An amine such as methylamine also replaces it, one rung down the ladder to an amide; the next section works through that reaction step by step, including a proton transfer.

When the ring closes on itself

Put the OH and the COOH on the same molecule and the ester can form inside it. 4-Hydroxybutanoic acid does this on standing, faster with a trace of acid. Its OH oxygen adds to its own carbonyl carbon, water leaves, and the product is a five-membered ring that contains the ester group.

A cyclic ester is a lactone, and a cyclic amide is a lactam. The chemistry is the same acyl substitution, with one difference: the alcohol part cannot drift away, because it belongs to the same molecule.

Lactones are named with Greek letters. Counting from the carbonyl, the next carbon is α (alpha), then β (beta), γ (gamma) and δ (delta). The letter of the carbon that carries the ring oxygen names the lactone. 4-Hydroxybutanoic acid has its OH on the γ carbon, so it closes to a γ-lactone, a five-membered ring called γ-butyrolactone. 5-Hydroxypentanoic acid has its OH on the δ carbon and closes to a six-membered δ-lactone.

γβαOOHHO4-hydroxybutanoic acidH⁺ (trace)− H₂OOαβγOγ-butyrolactone: 5 ring atomsδγβαOOHHO5-hydroxypentanoic acidH⁺ (trace)− H₂OOαβγδOδ-valerolactone: 6 ring atoms
The teal oxygen is the OH that closes the ring, and the coral OH is the one that leaves as water. The highlighted ring bond is the new one.

Ring size decides whether a lactone forms at all. Five- and six-membered lactones close readily, and they are the ones you meet: a 4-hydroxy or 5-hydroxy acid closes by itself. Three- and four-membered rings are strained and do not form on their own.

One four-membered lactam matters a great deal anyway. A β-lactam is a four-membered cyclic amide. Its ring holds the carbonyl carbon near 90° instead of the 120° that a flat sp² carbon prefers.

Penicillin contains a β-lactam, and its nitrogen is also part of a second, five-membered ring fused to the first. Belonging to both rings forces that nitrogen to be pyramidal, so its lone pair no longer lines up with the C=O π system. The resonance that makes ordinary amides unreactive is largely switched off, and what remains is a strained, unusually electrophilic carbonyl.

Penicillin kills bacteria by acylating (attaching its acyl group to) the enzyme that cross-links their cell walls. The target is a serine in the enzyme's active site, the pocket where it does its chemistry. Serine is an amino acid whose side chain ends in CH₂OH. The serine oxygen adds to the β-lactam carbonyl, and the ring C–N bond breaks. Opening the ring releases its strain, and that is what pays for expelling an amide nitrogen. The enzyme's normal substrate, an ordinary peptide amide, reacts this way only with the enzyme's full help. Penicillin needs far less, and the ester it leaves on the serine hydrolyzes so slowly that the enzyme stays blocked.

AN ORDINARY AMIDETHE β-LACTAM RINGPENICILLINORHR′NCflat: the N lone pair is sharedONH≈90°a four-membered cyclic amidethe C=O carbon wants 120°and is held near 90°CH₃CH₃CO₂HRCONHONSN is shared by both rings: pyramidalTHE ENZYME’S SERINE OPENS THE RINGCH₃CH₃CO₂HRCONHONSEnz–CH₂HOattack at the C=O; the ring C–N bond breaks(through the tetrahedral intermediate, not drawn)CH₃CH₃CO₂HRCONHNHSOOEnz–CH₂an ester on the serine: the enzyme is acylated,and this ester hydrolyzes only very slowly
Compare the nitrogen in the three top panels; in penicillin, two rings meet at it. The highlighted bonds are the four-membered ring. In the bottom row, find the bond that breaks.The group expelled in the bottom row is the ring nitrogen, which stays attached to the drug because it is still part of the five-membered ring. Proton transfers are left out, and so is penicillin’s stereochemistry: it has three stereocenters, none of which changes here.

Amides: the least reactive, and biology's backbone

Their stability, which the opening showed, is why an amide is the linkage that holds proteins together. The bond has to survive ordinary water-based conditions for years, and yet enzymes built for the job can still break it selectively.

LiAlH₄ does reduce an amide, and the product is an amine, not an alcohol: the oxygen leaves, bound to aluminum, and the nitrogen stays attached. Oxidation & Reduction shows why. Making an amide and then reducing it is a standard two-step route to an amine, and Amines takes it up again.

Worked example — planning down the ladder

You have benzoic acid and need N-methylbenzamide.

Mixing the acid with methylamine at room temperature gives only a salt, methylammonium benzoate. The amine is a base, and it simply takes the acid's proton. Heating that salt strongly does drive off water and form the amide, but it takes temperatures well above 150 °C, which many molecules do not survive.

So go up first, then down. SOCl₂ turns the acid into benzoyl chloride, at the top of the ladder. Methylamine then gives the amide cleanly. The reaction releases HCl, so use a second equivalent of methylamine, or add pyridine, a weak amine base, to take up that HCl; otherwise it ties up half the methylamine as its salt.

Two steps, because the ladder only runs downhill and you had to climb back to the top before going down.

Reactivity and stability are two sides of one property. Acid chlorides are useful because they are reactive, and for the same reason they react with moisture, fume in air and must be stored dry. Amides are useless for transferring an acyl group and invaluable as structural linkages. When a synthesis calls for an acid chloride, it wants reactivity; when biology uses an amide, it wants permanence.

What carries forward

The ladder governs every conversion in the next section and is among the most tested ideas in Carboxylic Acids & Derivatives. Amide resonance returns in Amines, to explain why amides are not basic, and in Biomolecules, in protein structure. And because the reactivity order here is really a leaving-group ranking, this chapter connects straight back to How Reactions Happen.