Logic (from the Greek ''λογική'' logikē) is the study of arguments. Logic is used in most intellectual activities, but is studied primarily in the disciplines of philosophy, mathematics, and computer science. Logic examines general forms which arguments may take, which forms are valid, and which are fallacies. It is one kind of critical thinking. In philosophy, the study of logic falls in the area of epistemology, which asks: "How do we know what we know?" In mathematics, it is the study of valid inferences within some formal language.
Logic has origins in several ancient civilizations, including ancient India, China and Greece. Logic was established as a discipline by Aristotle, who established its fundamental place in philosophy. The study of logic was part of the classical trivium.
Averroes defined logic as "the tool for distinguishing between the true and the false;" Richard Whately, "the Science, as well as the Art, of reasoning;" and Gottlob Frege, "the science of the most general laws of truth." The article Definitions of logic provides citations for these and other definitions.
Logic is often divided into two parts, inductive reasoning and deductive reasoning. The first is drawing general conclusions from specific examples, the second drawing logical conclusions from definitions and axioms. A similar dichotomy, used by Aristotle, is analysis and synthesis. Here the first takes an object of study and examines its component parts. The second considers how parts can be combined to form a whole.
Logic is also studied in argumentation theory.