Social identity theory is a psychological framework that explains how individuals define themselves based on their group memberships, such as gender, race, ethnicity, and nationality. It suggests that people derive a sense of self-esteem and belonging from these social categories, leading to in-group favoritism and out-group discrimination. This concept is crucial in understanding how media representation affects perceptions of different groups and perpetuates stereotypes.