ADDITION OF AMMONIA, AMINES AND DERIVS. TO ALDEHYDES AND KETONES
If the alcohol's oxygen is capable of ceding electrons to a C=O group, the nitrogen of ammonia or amines will be even more liable of doing that because is less electronegative than oxygen.
AMMONIA AND PRIMARY AMINES OR ANILINES
Aldehydes and ketones condense with ammonia or primary amines and anilines yielding imines.
The term condensation implies that a water molecule is lost in the process.
Imines bear a double C=N bond and they are stable enough especially when conjugated with an aromatic ring.
Yet, C=N groups can suffer nucleophilic attack in a similar way as the C=O groups do.
Imine formation is usually combined with "in situ" reduction leading overall to a new amine.
The two combined reactions are called reductive amination of aldehydes and ketones.
Look at a couple of examples:
In these two examples the "main character" is the aldehyde and the "secondary one" ammonia or methylamine.
However, this concept can be used the other way around, by using the smallest aldehyde (formaldehyde) as the "secondary actor" to get any primary amine (now "main character") methylated.
Do you understand? Look at an example:
If you do need to introduce a methyl group, and only one!!! on an amine, this is no doubt the method of choice: reductive amination.
With a secondary amine, the addition product (hemiaminal) does not possess any hydrogens to lose on nitrogen.
Water loss has then to be effected with the help of an alpha hydrogen as shown.
The outcome is an enamine, i.e. an amine linked to a double C=C bond.
This is like a "captured" enolate, isn't it?
The reaction is analogous to that of primary amines with the difference that the final product is named oxime because it keeps the OH bonded to nitrogen.
The reaction is analogous to that of primary amines with the difference that the final product is named hydrazone because it keeps the NH2 bonded to nitrogen.
When hydrazones are treated with hydroxide one observes the bubbling of nitrogen and the disappareance of the double bond.
IMPORTANT: The whole process aldehyde/ketone + hydrazine + hydroxyde involves the complete reduction of the C=O group to CH2.
(WOLFF-KISHNER REDUCTION).