Girls' relationship with mathematics has been an extensive and contested area of investigation during the last 40 years, mainly in developed countries. This contrasts with the small amount of research from developing countries, where the topic has been largely neglected but may present different challenges. In Chile, such lack of empirical evidence is surprising, particularly because of several national reports describing attainment differences in the national assessment test (SIMCE), where girls are consistently outperformed by boys. Currently, there are no studies which systematically explore gender differences in attainment in Chile. In addition, only a small number of studies have tried to explain why these differences, as well as others in engagement, attitudes and enrolment in mathematics, arise in this country. The main goal of this thesis is to critically examine these issues by investigating how girls relate to mathematics during early adolescence in Chile, and how such relationships are influenced/mediated by certain social variables (e.g. social class, classroom cultures and peer group identities).In order to do this, this thesis has adopted a mixed methods approach, thus linking analysis and results from studies that use both quantitative and qualitative methodologies. Firstly, I investigate the size and distribution of the gender attainment gap in Mathematics in Chile using a Multilevel approach to analyse data from the national census of educational quality (SIMCE). Here, I analyse the naturalization of gender differences based on results, and conclude that differences found in attainment between boys and girls are small and dependent on socioeconomic status.I then explore how girls' subjective relationships with mathematics are constructed, and how different social influences mediate this process. Using the concept of Mathematical Identities [MIs] as a main tool I explore the influence of social variables on the construction of girls' MIs in Chilean classrooms and I also consider how teaching practices and peer social relations in the classroom mediate these identities. A key finding here is the positive relationship between students' perceptions of their teaching as student-centred and more positive MI, which is in fact the same for girls and boys. A second key finding is that both representational and enacted aspects of girls' MI are mediated by their relationship with peers and peer groups. This mediation process can be described as a negotiation of different forms of belonging to social groups, which involved also the negotiation of different MIs inside the classroom.The main conclusion of this thesis is that in order to understand the role of gender in mediating girls' relationships with mathematics, we need to acknowledge the profoundly situated nature of this relationship in the cultural practices of the classroom, including mathematical practices, but also peer group practices. This argues against discourses that essentialise and naturalize 'gendered relationships with mathematics' which appear to be pre-dominant in the collation of national assessment data (like SIMCE) where categories such as gender, class, ethnicity etc. are viewed as causal or explanatory rather than produced 'in practice'.