The simplest way to answer this is it is not invented. Math is at its basis a Language. A banana exists. We didn’t invent the banana. We invented a word to describe it. Gravity exists. A mathematician used the language of math to describe how it works.
Math is a language to describe patterns numerically.
Latest Answers