A reaction between two aldehyde or two ketone molecules in which the position of one of the hydrogen atoms is changed in such a way as to form a single molecule having one hydroxyl and one carbonyl group. Since such a molecule is partly an alcohol (OH group) and partly an aldehyde (CHO group) and represents a union of two smaller molecules, the reaction is called an aldol condensation. It can be repeated to form molecules of increasing molecular weight. The condensation of formaldehyde to sugars in plants, which on repetition builds up the more complex carbohydrate structures such as starch and cellulose, is thought to be a reaction of this type. It occurs most effectively in an alkaline medium.