This study presents an in-depth analysis of the factors influencing the adoption and utilisation of Artificial Intelligence (AI) in primary mathematics education. Employing a quantitative research design, the study integrates the Technology Acceptance Model (TAM) and Technological Pedagogical and Content Knowledge (TPACK) with empirical data collected from primary mathematics teachers in China. The analysis utilises Partial Least Squares Structural Equation Modelling (PLS-SEM) to explore the relationships among key constructs, including teacher attitudes, contextual factors, educational challenges, and parental and community involvement. The findings reveal that teacher attitudes play a critical role in AI adoption. The study extends existing literature by focusing on AI in primary mathematics education, highlighting the need for targeted professional development initiatives to foster positive attitudes and enhance teacher proficiency in AI technologies. Additionally, the research underscores the significance of TPACK in its critical role in equipping teachers with the knowledge required for effectively integrating AI into mathematics education. Moreover, the study explores the complex dynamics of contextual factors and educational challenges in AI integration, emphasising the need for systemic approaches that include policy changes and institutional support. The nuanced influence of TPACK on AI utilisation, particularly through indirect pathways, and the role of parental and community involvement are also examined, offering new insights into the multifaceted nature of technology adoption in educational settings. It contributes valuable insights to the academic discourse on technology integration in education and offers practical implications for educators, policymakers, and stakeholders.