Lactams are cyclic amides formed from molecules that contain carboxylic and amine groups. The reaction is carried out by heating in the absence of acid.

sintesis-lactamas
 
The formation of lactams has the following mechanism:
 
Stage 1. Addition of the amino group to the carboxylic acid.
 
sintesis-lactamas
 
Stage 2. Acid-base balance
 
sintesis-lactamas
 
Stage 3. Water removal
 
sintesis-lactamas