No direct answer exists for this question, other than that it has been around since the beginning of civilization, according to The Story of Mathematics. Early math was about patterns and counting, which is evident in the tool marks on bone made by the cavemen.
According to Wikipedia, the formal study of math, as a subject, dates back to the 6th century. Pythagoreans are given credit for coining the word "mathematics," which derived from ancient Greek.
Many cultures have staked their claim to the beginning of modern mathematics and the progressive development of science, technology and philosophy. Early Egyptians claimed credit for developing mathematics, as did Ancient Greeks. Cultures in the Far East also have added their contributions to the development of math, with China, India and the medieval Islamic Empire broadening the knowledge of the field.