Nalanda was the largest residential centre of learning that the world had ever known. The library was located in a nine storied building. Since the time of Buddha, the bhikkus were always encouraged to study the various arts and sciences. Learning was greatly encouraged as served dual proposes: knowledge and practice. The monks, therefore took to learning so that they might practice it and realise Dhamma perfectly and thereby enrich the masses.
The University of Nalanda was founded in the 5th century by the Gupta emperors. There were thousands of students and teachers. The subjects taught at Nalanda University covered every field of learning. The courses offered at Nalanda included the study of scriptures of Mahayana and Hinayana Schools of Buddhism, Brahminical vedic texts, Philosophy, logic theology, grammer, astronomy, mathematics and medicine. Its importance as a monastic university continued until the end of the 12th century.