The Mannich reaction
The Mannich reaction is the condensation of an enolizable carbonyl compound with an iminium ion, usually formed in the medium from formaldehyde and a secondary amine. It introduces a dialkylaminomethyl group at the α carbon and gives a β-amino ketone or Mannich base.

It was described by Carl Mannich in 1912. The electrophile is the iminium ion, and the nucleophile is the enol of the ketone, formed in the acidic medium:

The reaction is normally limited to secondary amines, because with primary amines the product, a secondary amine, can react again and give dialkylation. That double reaction can be used to close rings, as in the tropinone synthesis of the example.
Mannich bases as enone precursors
Mannich bases are very useful intermediates. If the nitrogen is quaternized with methyl iodide, Hofmann elimination (which proceeds by an E1cB mechanism through the enolate) gives a vinyl ketone. In this way Michael acceptors that polymerize easily, such as the methyl vinyl ketone of the Robinson annulation, are generated in the medium:

The Mannich reaction has a biological equivalent: many alkaloids are biosynthesized by condensation of a cyclic iminium ion with an enol or enolate. There are also proline-catalysed asymmetric versions, analogous to the aldol addition.