Tenth-century mathematician al-Karaji is best known for his writings on algebra and for freeing algebra from geometry. The scholar spent most of his life in Baghdad, where he established a school for algebra and served as a vizier for the Abbasid government. Al-Karaji also was an accomplished engineer who wrote extensively on water extraction. Many of his hydrological ideas are still used in the Middle East today. While some modern scholars question his originality, others maintain he was an important transition between ancient mathematics and modern algebra.