Mathematics was another sphere in which the Babylonians excelled. Theoretical mathematics intrigued them and a large number of texts involving geometry and algebra of a quite sophisticated sort has been preserved. The theorems of Euclid and Pythagoras were already known in the Old Babylonian period.

As their civilization developed the Sumerians developed the need for a numerical system. They needed it for measurements and business transactions and for all the other requirements a civilized society has. From these beginnings Babylonian mathematics arose and was soon highly developed. The Sumerians and thus the Babylonians were one of the first peoples to have some fairly complex mathematics, some of which were not learned in parts of the world until recent centuries. Babylonian influence can still be clearly seen in such things as the measurement of time and degrees of angles.

The Babylonian numerical system was sexagesimal i.e. base sixty. This is why there are 60 minutes in an hour and 360 degrees in a circle. Strangely the Babylonians by the time of Hammurapi also had symbols for ten, one hundred and one thousand making their system part decimal. The Babylonians were very advanced for their time. They knew about square roots and completing the square and they knew the value of p quite accurately.