I go with the idea or argument that mathematics is both an invention and a discovery (or a combination of inventions and discoveries). Please see the link if you are interested:
We could ask the same question about chemistry and physics, and any other sciences. All humans have been doing throughout the centuries was to discover what has already been there in nature, sometime in a different form. We have learned how to make planes after seeing birds flying, and made cars after seeing animals running, and made submarines after seeing fish swim, etc. etc. The laws of maths, chemistry or physics, have always been there. They were not invented, they were simply ESTABLISHED (i.e. evidenced). Some people like to call it invented - but we don't invent something that already exist.