The driving cause of the process of mathematization of logic was the crisis of foundations in mathematics itself at the turn of the nineteenth and twentieth centuries. On the one hand, in the second half of the 19th century the convenient language of set theory created by Georg Kantor became widespread in mathematics. Mathematicians began to confidently use constructions with infinite sets in their reasoning. Mathematics armed with set theory went from success to success.
On the other hand, there were paradoxes in Cantor’s set theory itself that indicated that there was something wrong with this theory at the most basic level. The simplest paradox of this kind, known in folklore as the barber’s paradox, was invented by Bertrand Russell: Consider the set of all those sets which do not contain themselves as an element. Then if and only if , a contradiction.
This state of affairs led many prominent mathematicians and philosophers of the era (Peano, Frege, Russell, Hilbert, Poincaré, Brauer, Weil, etc.) to think about the foundations of mathematics. They were concerned with such fundamental questions as:
When we talk about the truthfulness and provability of a mathematical statement, do we mean the same thing?
In parallel, new standards of rigor began to take root in mathematics. The major areas of mathematics-analysis, algebra, geometry-were put on an axiomatic basis. The great mathematician David Hilbert (1862-1943) was a brilliant proponent and promoter of the axiomatic method. Under his influence the now generally accepted system of axioms of set theory, free of obvious paradoxes, was constructed. This axiomatics was proposed in 1908 by E. Zermelo and later supplemented by J. von Neumann and A. Frenkel. But where is the real guarantee that the resulting system does not contain contradictions? How can this be established?
These questions turned out to be much more complicated than Hilbert had imagined at the time. They required an in-depth study of axiomatic systems and their formalization; they led to an exact analysis of the structure of mathematical statements, the first formulations of rigorous mathematical models of phenomena such as provability, expressibility, truth, and made their study by mathematical methods possible. Thus emerged mathematical logic, a special field of research within mathematics. Within the framework of this discipline, an exact language and mathematical apparatus were created for investigating a whole stratum of phenomena that previously belonged to purely humanitarian knowledge. (In this role, mathematical logic can be compared to such an area of modern mathematics as probability theory, which was not strictly a mathematical discipline back in the early 20th century.)
Formal languages. From a modern point of view, the field of interest of mathematical logic is much broader than the science of correct reasoning; it can be roughly described, with caveats and refinements, as the construction and study of formal languages and systems by mathematical methods. Note that if we drop the word “formal” in this definition, instead of logic, we get essentially mathematical linguistics, which indicates a certain affinity between the two disciplines. The key difference between mathematical logic and logic in the broad sense is precisely the use of mathematical methods applied to exact formal models.
Formal and natural languages have things in common: both have syntax (the way we speak or write), semantics (the meaning of what is written), and pragmatics (how what is written is used). The main difference is that – at least ideally – the syntax and semantics of formal languages can be defined at the level of mathematical rigor and are therefore in principle amenable to analysis by purely mathematical methods.
Nowadays, formal languages can be found in every electronic device available to us, like cell phones, and some of them – programming languages – are even taught at school. So you don’t have to go far to find examples. However, in the middle of 19th century, when the process of mathematical logic began, formal languages did not yet exist, they were just to be created.