Mathematics is the study of numbers, quantity, space, pattern, structure, and change. Mathematics is used throughout the world as an essential tool in many fields, including natural science, engineering, medicine, and the social sciences. Applied mathematics, the branch of mathematics concerned with application of mathematical knowledge to other fields, inspires and makes use of new mathematical discoveries and sometimes leads to the development of entirely new mathematical disciplines, such as statistics and game theory. Mathematicians also engage in pure mathematics, or mathematics for its own sake, without having any application in mind. There is no clear line separating pure and applied mathematics, and practical applications for what began as pure mathematics are often discovered.
The infinite monkey theorem states that a monkey hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type or create a particular chosen text, such as the complete works of William Shakespeare. Note that "almost surely" in this context is a mathematical term with a specific meaning, and that the "monkey" is not an actual monkey; rather, it is a vivid metaphor for an abstract device that produces an unending, random sequence of letters.
The theorem graphically illustrates the perils of reasoning about infinity by imagining a vast but finite number. If every atom in the visible universe were a monkey producing a billion keystrokes a second from the Big Bang until today, it is still very unlikely that any monkey would get as far as "slings and arrows" in Hamlet's most famous soliloquy. The infinite monkey theorem is straightforward to prove, even without appealing to more advanced results.