To elaborate on this more, we need to define the terminology first. Discovered is the thing always exist. Someone found it. Invented is the thing did not previously exist. Someone created it. What about mathematics? Mathematics is a tool, a model. It is something that we can use to describe or model parts of reality, or any other system based on quantifiable things. So, is mathematic being created or discovered?
People have debated about this over the years and even now. Some people say that mathematic is being created and some say that people discovered math. As math is a model to describe things, and a model is created, so is math. Mathematics itself did not exist before the first mathematician. But, from this can we concluded that math is ultimately being created? I don’t think so. I do think mathematics is also discovered.
Looking at this example might trigger our mind to think more about it. Eclipse is the example. Have you ever thought how human being can determine when eclipse is about to happen very precisely? By using a set of statistic and also calculation, mathematicians are able to predict when the next eclipse would occur. The idea to calculate the eclipse comes from the existing phenomenon. My point is, mathematicians are able to invent a model to describe the reality by observing the existing situation, which is being discovered. So, I believe mathematics is invented but the discovery of new things help it to be invented. Mathematics is both invented and discovered.