Logic is the study of reasoning or the study of the principles and criteria of valid inference and demonstration. It attempts to distinguish good reasoning from bad reasoning.