Abu Rayhan al-Biruni was born in Khwarazm in the late tenth century and began serious scientific work while still young. He studied astronomy, mathematics, geography, history, languages, and other fields. Political change repeatedly altered the places where he lived, but learning remained the constant center of his life.
After Mahmud of Ghazni conquered Khwarazm in 1017, al-Biruni was taken to Mahmud's court at Ghazni. During the period of Mahmud's military campaigns he travelled into the north-western regions of the Indian subcontinent, where he studied Indian astronomy, mathematics, geography, calendars, customs, religion, and philosophy. He learned Sanskrit well enough to work with Indian intellectual material directly and wrote a major work commonly known as India. Instead of describing an unfamiliar culture only through hearsay, he tried to understand its own systems of thought. He also wrote frankly that Mahmud's raids had brought great destruction to the region.