Mathematics was first used for people's counting, astronomy, measurement and even trade needs. These needs can be simply summarized as the study of structure, space and time in mathematics.
The study of structure begins with numbers. First of all, let's start with what we call elementary algebra-natural numbers and integers and their arithmetic relations. The further study is number theory.
The study of space begins with geometry, first Euclidean geometry and trigonometry similar to three-dimensional space (also applicable to more or less dimensions). Later, non-Euclidean geometry came into being, which played an important role in the theory of relativity.
By16th century, elementary mathematics, such as arithmetic, elementary algebra and trigonometry, had been basically completed. The appearance of the concept of variables in the17th century made people begin to study the relationship between variables and the mutual transformation between graphs. With the further development of natural science and technology, set theory and mathematical logic, which are produced for studying the basis of mathematics, have also begun to develop slowly.