Would some be able to explain why when I mix a carboxylic acid, like ethanoic acid, and an amine, say ethylamine, I get ethylammonium ethanoate. But when I mix a bi-functional group carboxylic acid (say ethanedioic acid) and a bi-functional group amine (say 1,2-diaminoethane) I get a condensation reaction and an amide bond is formed.
This also leads to why does ethanoic and ammonia yield ammonium ethanoate and not ethanamide. I understand that the ammonia is acting as a base in this reaction, but why doesn't it favour being a base rather than a nucleophile?
To me both of the reaction seen the same. Can someone elaborate this for me, or am I missing a key piece of knowledge.