The carboxylic acids on heating with ammonia give amides. A diamide on strong heating give an imide.
Gabriel Phthalimide reaction: The hydrogen of the imide is acidic which can be extracted with base. Now, the nucleophile formed undergo bimolecular nucleophilic substitution reaction with alkyl chloride. Now, the alkyl imide undergo hydrolysis to give primary amine.




