Formal logic is a branch of mathematics that deals with the validity of reasoning based on a set of rules or axioms.