For a time, the word algebra could mean solving equations or setting a broken arm. Both senses came from the same Arabic word.

Around 820, in Baghdad, the mathematician Muhammad ibn Musa al-Khwarizmi wrote a book on solving equations. Its Arabic title, al-Kitab al-Mukhtasar fi Hisab al-Jabr wal-Muqabalah, is usually translated "The Concise Book of Calculation by Restoration and Balancing." The two named operations were the method itself.

Al-jabr, "restoration," moved a subtracted quantity to the other side of an equation, so no negative terms were left. Al-muqabala, "balancing," took the same quantity away from both sides. Together they reduced a problem to a standard form that could be solved.

The word jabr comes from the Arabic verb jabara, which Etymonline glosses as "reintegrate, reunite, consolidate." The noun meant the reunion of broken parts. A mathematician could restore an equation. A healer could restore a bone.

Robert of Chester translated the book into Latin in 1145. The first operation in the title became the name of the whole subject, as Medieval Latin algebra. Etymonline dates the mathematical sense in English to the 1550s. The Elizabethan scholar John Dee still named the two operations separately, as "algiebar and almachabel." The stress was at first on the second syllable and moved to the first in the 17th century.

The medical sense traveled on its own road. In Spain an algebrista was a bone-setter, not a mathematician. Cervantes used the word that way in the second part of Don Quixote, published in 1615, when an algebrista has to be found for a battered character. The 18th-century Diccionario de autoridades defined the algebrista as someone who sets dislocated or broken bones.

English briefly shared that sense. Etymonline notes that algebra also meant bone-setting in 15th- and 16th-century English, a usage taken from Arab medical practice in Spain.

So the word did not jump from the clinic to the classroom, or the other way. Both uses grew from one metaphor: putting something broken back together.

Al-Khwarizmi left English a second word. His own name, passed through Latin, became algorithm, which Etymonline dates to the 1690s in the sense "Arabic system of computation."