
This reaction is called aldol condensation. The aldol [2] formed dehydrates in the basic medium by heating to form an a , b -unsaturated [3].

The aldol condensation mechanism occurs with the formation of an enolate, which attacks the carbonyl of another molecule. In this condensation, a carbon-carbon bond is formed between the carbonyl of one molecule and the a- of the other.
Stage 1. Formation of the enolate

The base depotones the alpha carbon of ethanal [1] generating the enolate [4] stabilized by resonance.
Stage 2. Nucleophilic attack of the enolate on the carbonyl

Stage 3. Protonation

Stage 4. Dehydration of the aldol
