In philosophy, Logic (from the Greek λογική logikē) is the formal systematic study of the principles of valid inference and correct reasoning. Logic is used in most intellectual activities, but is studied primarily in the disciplines of philosophy, mathematics, semantics, and computer science. It examines general forms which arguments may take, which forms are valid, and which are fallacies. In philosophy, the study of logic is applied in most major areas: ontology, epistemology, ethics, metaphysics. In mathematics, it is the study of valid inferences within some formal language. Logic is also studied in argumentation theory.
Logic was studied in several ancient civilizations, including the Indian subcontinent, China and Greece. Logic was established as a discipline by Aristotle, who gave it a fundamental place in philosophy. The study of logic was part of the classical trivium, which also included grammar and rhetoric.
Logic is often divided into two parts, inductive reasoning and deductive reasoning.