The expressions in the affirmative and in the negative are thought to come from military aviation, where pilots use affirmative and negative as synonyms for yes and no in radio transmissions. The idea is that the longer words are less likely to get lost in static. But when used in ordinary contexts, such as She answered in the affirmative, these expressions almost always sound pompous. She answered yes would be more acceptable even at the most formal levels of style.