A “formal science” is an area of study that uses formal systems to generate knowledge. Mathematics is the prototypical example. Others include logic, statistics, information theory, and theoretical computer science. Although it has sometimes been questioned whether or not these are truly “science” – considering the lack of real-world experiments – these disciplines often get lumped along into science anyway. Despite their lack of an empirical basis, the formal sciences are generally considered extremely important, and indeed, all of quantitative science depends on them. It is an ongoing debate as to whether or not the formal sciences are true science.
Mathematics texts emerge in ancient history around 1800 BC, in Mesopotamia, the location of Babylon, the largest city on Earth at the time. The original purpose was to quantify goods, such as slaves or grain. Around 600 BC in China and in Greece in 400 BC was the initial development of logic, the explicit analysis of reasoning methods. In Greece were the great ancient Greek philosophers such as Pythagoras, Socrates, and Aristotle, whose intuitions and beliefs about logic and science dominated the Western world until the modern era, until 17th century luminaries such as Pierre de Fermat, Blaise Pascal, and Christiaan Huygens kickstarted the development of mathematics in its modern form.
Information theory, theoretical computer science, and modern (Bayesian) statistics date to Claude Shannon and Jon von Neumann in the mid-20th century. Alan Turing also made important contributions. The theory around computers, radio signaling, and antenna design all depend on the milestones achieved by these thinkers. These areas are all important parts of the formal sciences.
After many decades of messiness in experimental methods and analysis, recently the “soft sciences” (social science, political science, etc.) have gotten more quantitative, heralding a fundamental shift in the way things are done. Psychology has become more experimental, and many of these results are sweeping away the traditional wisdom of older thinkers such as Freud. Experimental psychology often falls under the banner of “cognitive psychology.”
Theoretical physics seem highly dependent on developments in mathematics to make progress. Theoretical physics often uses the most advanced available mathematics of the day and describes its results and predictions in these terms.