Math is a logical set of rules and operations (which humans create), that leads to theorems, identities, and formulas which happen to be fairly effective at describing phenomena and relationships in nature. In other words, it is a combination of invention and discovery. We invent the logic, and discover the consequences of that logic. If it seems mysterious that math is "unreasonably effective" at describing nature, all it really means is that nature is logical. What would an illogical reality be like?
It could also be argued that math is "reasonably ineffective"
at describing nature. That is, all our formulas in physics and other fields of science are just models.
"Here's the essence of what I think is happening, and this is how I express that as math, and then this is what that math predicts." The power of a model is in how well it reduces a very complicated reality into something sensible, and have success in predicting what we observe.
Like, is it weird that I can write equation[math]
and it happens to be a good model for population growth? Well, it shouldn't be. All I did was say "let the population size [math]
change at a rate proportional to the population size." It's a very simple model which happens to work really well for situations in which the assumption is valid (e.g. a population that exists in isolation with a lot of room and resources and no competition). To make a better model which accurately describes a broader range of population dynamics, we would improve the logical framework.
The equation written above is an example of a "differential equation" -- a relationship between the amount of stuff and the rates at which that stuff changes. Most things in nature happen to be modeled as differential equations. But the mathematics is often unreasonable here. Some differential equations can be easily solved with pen and paper, but in general they cannot
be solved analytically (as in you cannot find or write the solution with any combination of standard functions like powers or sines or roots or exponents). Instead their solutions are approximated by algorithm -- usually on a computer -- and sometimes those solutions are also violently chaotic. For instance... consider the three body problem. Or the Navier-Stokes equations.
You'd think if math were built into nature, then any relationships in nature should be readily describable with math. But... it's more complex than that.
We can describe the important aspects of the nature with logic, but that does not necessarily convert to elegant mathematical form.