They mostly didn’t. Mathematics in antiquity was mostly the physically practical forms of math. Things like arithmetic, basic algebra, and basic geometry. More complex mathematics such as advanced geometry, advanced algebra, calculus were not invented yet.
Latest Answers