The primary function of the malleus is to transmit sound vibrations from the eardrum to the oval window of the cochlea. This transmission is essential for the conversion of sound waves into electrical signals by hair cells in the cochlea, which are then interpreted by the brain.