Despite decades of research from psychology, anthropology, biology and economics, how social preferences arise and vary across contexts remains an open question. In three empirical chapters, this... Show moreDespite decades of research from psychology, anthropology, biology and economics, how social preferences arise and vary across contexts remains an open question. In three empirical chapters, this dissertation addresses this gap using a variety of economic games and neuroimaging techniques that allow for a tractable modeling of cooperation and competition. Overall, findings suggest that while social preferences are linked to neural structure, they can also adapt to environmental factors as well as beliefs about interaction partners. This doctoral thesis shows that interacting with ingroup or outgroup members, taking decisions publicly or privately, and knowing whether we may interact with others again affect our cooperative behavior. These results highlight the importance of understanding how prosociality may be altered and lay the foundations for policy makers to further those social environments that encourage prosocial behavior. Show less