What is mathematics? Why does it work in this world of chaos?
Mathematics is called an abstraction of reality, but in truth it is the essence of the reality that lies beyond the senses.
Only mathematics can tell you how to separate reality from delusion.
Here is my take on the nature of reality and the idea of mathematics in it: Let us assume that there are a finite number of operations that can occur between two points in space. It may even be possible that these operations are symmetry operations, and nothing beyond the symmetry operations can be possible.
The other part of reality are the observable phenomena, the sensations of force, time etc., are merely aids to the understanding of these operations. Matter only provides the inputs to these operations. All observable phenomena are therefore the symmetry operations (the mathematics) taking random sets of inputs and producing equally random sets of outputs.
Physical reality is the veil which hides the mathematics of symmetry operations which are always present in the background. Mathematics is the fabric of the underlying reality. All the rest are merely inputs and outputs.