This article studies the entanglements of mathematical economics in Brazil by delving into the emergence of a scientific community identified with the subject at the Instituto de Matemática Pura e Aplicada (IMPA). It traces how networks built since IMPA's early years in the 1950s made economics a viable alternative to applied mathematics in an institute mostly dedicated to research in pure mathematics. The article examines how interests in mathematical economics remained active during IMPA's expansion beginning in the late 1960s. This process culminated with the creation of the mathematical economics graduate program at IMPA in 1980 by Aloisio Araujo. The article follows how the program could build strong connections to the Escola de Pós-Graduação em Economia (EPGE), an important department of economics in Brazil, helping to shape recent developments in the center. The article thus aims to reveal how historical connections and entwinements of economics and mathematics groomed at IMPA have affected recent developments in the Brazilian economics community.