I should know better than to discuss mathematics, but I thought this was going to be easy.
I have always thought that algebra originated in the Middle East, algebra being an Arabic-derived word (al-gabr). Recently I was listening to a Science Friday podcast from July 2nd (http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/sciencefriday/scifri201507031p.mp3) that corroborated that viewpoint. According to the podcast, the motivation for algebra was Islamic inheritance laws. First the funeral expenses had to be paid; then creditors; then the sons, who got twice as much as the daughters; then the daughters; and grandchildren according to specific rules; and so forth. You can see how an equation would be very helpful. So all that made perfect sense. (Check http://www.islam101.com/sociology/inheritance.htm and you can begin to understand the problem.)
Of course, nothing in life is simple. According to Wikipedia, algebra can be traced back to ancient Babylon. Early Egyptians, Greeks, and Chinese were all solving equations, but by using a geometric method. How algebra evolved gets pretty complicated and the basic Wikipedia entry doesn’t even mention Islam. (https://en.wikipedia.org/wiki/Algebra)
But there is an entry on “Islamic Inheritance Jurisprudence”. (en.wikipedia.org/wiki/Islamic_inheritance_jurisprudence) —
“The Islamic law of inheritance served as an impetus behind the development of algebra (derived from the Arabic al-jabr) by Muhammad ibn Mūsā al-Khwārizmī and other medieval Islamic mathematicians. Al-Khwārizmī’s Hisab al-jabr w’al-muqabala, the foundational text of algebra, devoted its third and longest chapter to solving problems related to Islamic inheritance using algebra. He formulated the rules of inheritance as linear equations, hence his knowledge of quadratic equations was not required.[11]“
If you are a math geek, its a pretty fascinating story.