Nitriles are organic compounds that have the general formula RCN (RC≡N).
Nitriles can be prepared by a substitution reaction using KCN.
The
–:C≡N
: ion is a good carbon nucleophile, and this substitution results in extension of the carbon chain.
Reaction 1: CH
3Br +
–:C≡N
:
CH3C≡N: + Br– The nitrile functional group is on the same oxidation level as carboxylic acids and amides which also have three bonds from carbon to more electronegative atoms.
This means that nitriles and carboxylic acid derivatives can be inter-converted by addition or removal of water.
An alternate preparation of nitriles is by reaction of primary amides with the dehydrating agent P
4O
10. The co-product of the reaction is phosphoric acid (H
3PO
4)
Reaction 2:  | P4O10  | CH3CH2C≡N |
Note that because two hydrogens must come from the nitrogen, the amide must be a primary one.
Secondary amides have only one H at nitrogen, and tertiary ones do not have any H at nitrogen.
Similarly nitriles, like amides can be hydroysed to carboxylic acids and ammonium salts with aqueous acid.
| Reaction 3: CH3CH2C≡N | H3O+  |  |
Note that because two hydrogens must come from the nitrogen, the amide must be a primary one.
Secondary amides have only one H at nitrogen, and tertiary ones do not have any H at nitrogen.
Reactions 1 and 3 can be combined to convert a haloalkane to a carboxylic acid having an additional carbon atom.