In Charlemagne’s empire, frontier regions, especially those between Christian and non-Christian territories, were called marches; that’s where we get the term marquis. One of those border regions, the March of Spain (later called Catalonia), maintained its identity and autonomy long after the death of Charlemagne. Organized as a Christian frontier against the Muslims, and situated between the much larger and more powerful Christian Frankish kingdoms to the north and the Muslim Caliphate of Cordoba to the south and west [see the map], it necessarily developed ways to coexist with widely varying societies.
In fact, the region itself had a long history of cultural blending resulting from its conquest and occupation by many peoples over the years. If we look at a map of the area in the year 900 C.E., we see the region, labeled County of Barcelona, as part of the West Frankish Kingdom. In the year 700, it was ruled by the Visigoths. Before that, it was part of the Roman Empire. And of course there were native peoples there before the Roman armies arrived. So the medieval Catalan culture was an amalgamation of native, Roman, Visigoth and Frankish backgrounds.
During the Middle Ages, the Counts of Barcelona maintained cultural, economic and political ties with Rome as well as with the South of France and Muslim Spain. The regions exchanged ambassadors, merchants, goods, customs – and knowledge, including mathematics. While the rest of Western Europe slumbered in its “Dark Ages,” Catalonia flourished because of its proximity to the lively center of knowledge in Cordoba and the merchants arriving from the East on its Mediterranean shores. In fact, Greco-Arabic science and mathematics were introduced into Western Europe via Catalonia.