Cognitive dissonance is an uncomfortable feeling caused by holding two contradictory ideas simultaneously. The theory of cognitive dissonance proposes that people have a motivational drive to reduce dissonance by changing their attitudes, beliefs, and behaviors, or by justifying or rationalizing them. It is one of the most influential and extensively studied theories in social psychology.
Dissonance occurs when a person perceives a logical inconsistency in their beliefs, when one idea implies the opposite of another. The dissonance might be experienced as guilt, anger, frustration, or even embarrassment. The idea of "sour grapes"—from the fable The Fox and the Grapes by Aesop (ca. 620–564 BCE), where the fox decides that the grapes he is unable to reach are probably not ripe enough to eat anyway—illustrates an example of cognitive dissonance: desiring something, then criticizing it because it proves unattainable, a phenomenon that Jon Elster calls "adaptive preference formation."
A powerful cause of dissonance is an idea in conflict with a fundamental element of the self-concept, such as "I am a good person" or "I made the right decision". The anxiety that comes with the possibility of having made a bad decision can lead to rationalization, the tendency to create additional reasons or justifications to support one's choices. A person who just spent too much money on a new car might decide that the new vehicle is much less likely to break down than his or her old car. This belief may or may not be true, but it would reduce dissonance and make the person feel better. Dissonance can also lead to confirmation bias, the denial of disconfirming evidence, and other ego defense mechanisms.
(Find out more on wikipedia)