I would argue that mathematics by definition was invented. It is basically a language, and would anyone argue that languages are "discovered" and not invented? They are both systems for creating abstract representations of reality.
It's much more complex than that, but you did well trying to answer that question in two lines.