Both math & science sprang from observations of the environment around us.
Nature provides us a daily drama of ever-changing events - Sunrise, Sunset, seasons, rain, thunder, lightning, birth, growth & death.
Science developed by asking questions about these changes – why do they occur and if they could be predicted?
Science was always rooted in physical reality. Its predictions had to tally with observations. If someone came up with a procedure to predict a lunar eclipse, the prediction had to come true. Otherwise, the prediction had to be re-examined.
But math took a different path.
Math also started by identifying patterns in the environment in terms of numbers & shapes. It then started exploring & abstracting their properties and relations.
It found that shapes can be classified as per the number of their sides. Numbers could be classified into odd & even, prime & composite by their geometric patterns.
Slowly math started developed by pursuing these abstract ideas, and developed an internal logic of its own, expressed as axioms & conventions. It stopped bothering about their connection to physical reality.
For example, the following story; “Ram had 5 fruits and he gave away 2 fruits to Sita. How many fruits did he now have with him?” can be represented symbolically as 5 – 2 = 3.
Representing it as 5-2 =3, without any reference to the context, emboldened some mathematicians to ask “then what is 2 – 5?”.
If math was tied only to reality, no one would have asked the question “can 5 fruits be given away from 2 fruits?”.
Negative numbers were invented to answer this question. Negative numbers have no direct equivalents in our physical reality. They are just abstract mathematical constructs.
Math developed by encouraging “out-of-the-box” questions, such as this, which questioned its very foundations. Mathematicians had the freedom to ask such questions and math developed because of them. Math became an abstract discipline exploring conceptual ideas like patterns, relations & properties.
In math, no concept is ever proved wrong. It is just modified where necessary. A science theory can be proved wrong by just one observation!
In mathematics there are no criteria of confirmation through observations. Analytical truth is the only truth available, but such truth cannot stand as a criterion for the “truth” of an axiom.
Thus, math & sciences proceeded on parallel & independent tracks until the late middle-ages.