Introduction to Logic
A Beginner’s Guide to Logic and Truth Tables
Logic is the study of how conclusions follow from reasons. It helps distinguish arguments that merely sound convincing from arguments whose conclusions really are supported by their premises. This matters in everyday reasoning, in academic subjects, and especially in mathematics, where proofs depend on valid steps.
Logic is a deep subject, but learning a few basic ideas can already make reasoning clearer. The central skill is practice: as with any craft, familiarity grows by working through examples and checking how each step follows.
Three foundational laws of classical logic
Aristotle helped systematize formal logic and is associated with three principles often called the laws of thought. They describe basic standards used in classical logic.
The law of identity
The law of identity says that something is identical with itself:
A=AA chair is the chair it is; a statement keeps its meaning as it is used in an argument. If terms continually changed meaning during a discussion, it would become impossible to tell what the argument was about. Identity therefore supports clear reference and consistent reasoning.
The law of non-contradiction
The law of non-contradiction says that a statement and its negation cannot both be true at the same time and in the same respect. If A means “the object is a chair,” then A and “the object is not a chair” cannot both be true under the same interpretation.
In symbols, the principle can be represented as:
¬(A∧¬A)This does not mean that an object cannot change over time or be described in different ways. It means that a claim and its direct denial cannot both hold at once in the same context.
The law of the excluded middle
The law of the excluded middle says that, for any proposition A, either A or its negation is true:
A∨¬AFor example, either a particular proposition is true or it is false. In classical logic, there is no third truth value between those two.
The example of something being “hot” or “cold” needs care. An object might be neither hot nor cold under some everyday use of those words, perhaps because it is lukewarm. That points to the vagueness of the categories, not necessarily to a failure of the excluded middle. A more precise proposition—such as “the object’s temperature is above a stated threshold”—can be evaluated as true or false. Classical logic applies the principle to a clearly specified proposition, rather than assuming that every informal pair of descriptions divides the world neatly.
The laws of identity, non-contradiction, and excluded middle support consistent reasoning: claims need stable meanings, a claim cannot also be its denial in the same respect, and classical propositions are treated as true or false.
Think About It: Why would an argument become difficult to evaluate if a key word changed meaning halfway through?
Deductive reasoning: from premises to conclusion
A deductive argument is an argument in which the conclusion is meant to follow necessarily from the premises. An argument is valid when there is no possible case in which all its premises are true and its conclusion is false.
Consider this familiar pattern:
- All men are mortal.
- Socrates is a man.
- Therefore, Socrates is mortal.
The conclusion follows from the premises: if both premises are true, the conclusion cannot be false. The argument is therefore valid.
Validity concerns the relationship between premises and conclusion, not whether the premises are actually true. A sound argument is valid and also has true premises. Thus, the Socrates argument is sound if its premises are true as well as correctly supporting its conclusion.
This distinction is useful because an argument can have a valid structure even when one of its premises is false. Logic first asks whether the reasoning form guarantees the conclusion; evaluating the premises is a separate task.
Truth tables: checking every possibility
A truth table lists every possible combination of truth values for the propositions in a statement or argument. It is a systematic way to check what follows in each situation.
If a table has n distinct variables, it requires 2n rows, because each variable can be either true or false:
number of rows=2nSo, one variable requires 21=2 rows, two variables require 22=4 rows, and three variables require 23=8 rows. A table is fully exhaustive when it includes every possible combination.
For two variables, a standard row order is:
| A | B |
|---|---|
| True | True |
| True | False |
| False | True |
| False | False |
The order is chosen so that every combination appears exactly once. For three variables, the same idea produces eight rows.
Truth tables evaluate statements by combining the truth values of simpler propositions using logical operators, also called connectives. The basic operators include negation, conjunction, disjunction, conditional, and biconditional.
Think About It: Why must a truth table include every combination before it can establish that an argument has no counterexample?
The basic logical operators
Negation: “not”
Negation denies a proposition. If A means “there is a hamburger,” then ¬A means “there is not a hamburger.” Negation is not arithmetic subtraction; it reverses a truth value.
| A | ¬A |
|---|---|
| True | False |
| False | True |
Negation is true exactly when the original proposition is false, and false exactly when the original proposition is true.
Conjunction: “and”
A conjunction joins two propositions with “and.” It is written A∧B. For example, if A means “a friend gives a hamburger” and B means “a friend gives fries,” then A∧B means that the friend gives both.
| A | B | A∧B |
|---|---|---|
| True | True | True |
| True | False | False |
| False | True | False |
| False | False | False |
A conjunction is true only when both parts are true. If even one part is false, the whole “and” statement is false.
Disjunction: inclusive “or”
A disjunction joins propositions with “or” and is written A∨B. In standard logic, this is usually an inclusive or: it is true when at least one part is true, including when both are true.
| A | B | A∨B |
|---|---|---|
| True | True | True |
| True | False | True |
| False | True | True |
| False | False | False |
Suppose someone says, “A hamburger or fries will be provided.” Under inclusive-or logic, providing both satisfies the statement. The disjunction is false only when neither option is provided.
This differs from some everyday uses of “or,” where the speaker may intend one option but not both. That exclusive meaning can be expressed with a separate operator, or built from the standard operators, as described later.
Material conditional: “if … then”
A material conditional is an “if–then” statement, written A→B. In “If A, then B,” A is the antecedent and B is the consequent.
| A | B | A→B |
|---|---|---|
| True | True | True |
| True | False | False |
| False | True | True |
| False | False | True |
The conditional is false only when the antecedent is true and the consequent is false. For instance, “If a person comes over, a hamburger will be provided” is broken if the person comes over but receives no hamburger. If the person does not come over, the conditional does not make a prediction that has been violated. In that sense, the conditional is true whether or not a hamburger is provided in that case.
When the antecedent is false, the conditional is sometimes called vacuously true. This is a feature of the truth-table definition of the material conditional. It does not mean that ordinary “if” statements always express causation or that the antecedent caused the consequent; the operator records a particular truth-functional relationship.
Material biconditional: “if and only if”
A material biconditional is written A↔B and read “A if and only if B.” It is true when both propositions have the same truth value—both true or both false.
| A | B | A↔B |
|---|---|---|
| True | True | True |
| True | False | False |
| False | True | False |
| False | False | True |
A biconditional makes a two-way claim. If a person says, “A hamburger will be provided if and only if the guest comes over,” the statement rules out both a guest arriving without receiving a hamburger and a hamburger being provided when the guest does not come over.
This is why biconditionals can be useful when proposing definitions. For example, a proposed definition might state that knowledge holds if and only if a person has a justified true belief. The biconditional says that each condition is both necessary and sufficient for the other within that proposed definition. The example illustrates the form of a definition; it does not by itself establish that the definition is correct.
Think About It: How does the meaning of “if and only if” differ from the one-way claim “if”?
Using truth tables to test arguments
A truth table can test an argument by checking the rows in which all the premises are true. The argument is valid if the conclusion is true in every such row. Equivalently, it is invalid if at least one row makes all the premises true and the conclusion false. That row is a counterexample to the argument’s validity.
Modus ponens
Modus ponens has this form:
A→B,A,∴BIn words: if A implies B, and A is true, then B follows. For example:
- If there is sugar in a cookie, the cookie is sweet.
- There is sugar in the cookie.
- Therefore, the cookie is sweet.
Whenever both premises are true, the conditional requires B to be true. There can be no case with true premises and a false conclusion, so the form is valid.
Affirming the consequent
A similar-looking argument is not valid:
A→B,B,∴AThis is called affirming the consequent. A cookie may be sweet because of something other than sugar. Thus, the truth of “the cookie is sweet” does not prove that there is sugar in it.
The truth-table counterexample is the row where A is false and B is true. In that row, A→B is true and B is true, but the conclusion A is false. Since the premises can both be true while the conclusion is false, the argument is invalid.
Modus tollens
Modus tollens has this form:
A→B,¬B,∴¬AIn words: if A would lead to B, but B is false, then A must also be false. For example:
- If there is sugar in the cookie, the cookie is sweet.
- The cookie is not sweet.
- Therefore, there is no sugar in the cookie.
When the conditional and ¬B are both true, A cannot be true; otherwise the conditional would have a true antecedent and false consequent. The form is valid.
Denying the antecedent
Another invalid form is:
A→B,¬A,∴¬BThis is called denying the antecedent. A cookie might be sweet even without sugar, so the absence of sugar does not prove that the cookie is not sweet.
The counterexample is a row in which A is false and B is true. Then the conditional and ¬A are true, while the conclusion ¬B is false. The argument is invalid.
Disjunctive syllogism
Disjunctive syllogism has this form:
A∨B,¬A,∴BIf at least one of A or B must be true, and A is false, then B must be true. For example:
- A hamburger or fries will be provided.
- A hamburger was not provided.
- Therefore, fries were provided.
This form is valid when “or” is inclusive, as in the standard truth table. Because A∨B is true and A is false, B has to be true.
Redundant operators and logical equivalence
Some logical operators can be defined using other operators. An operator is redundant in this sense when its truth conditions can be expressed by a combination of operators already available. Two expressions are logically equivalent when their truth tables match in every row.
Logical equivalence is a relation between whole expressions, not a connective that combines propositions in the same way as “and” or “or.” It is often written with the symbol ≡.
Exclusive “or”
An exclusive disjunction, often called XOR, is true when exactly one of its two parts is true. Unlike inclusive disjunction, it is false when both parts are true as well as when both are false.
It can be expressed using inclusive disjunction, conjunction, and negation:
AXORB≡(A∨B)∧¬(A∧B)The first part, A∨B, requires at least one proposition to be true. The second part, ¬(A∧B), rules out both being true. Together, they capture “one or the other, but not both.”
Biconditional from two conditionals
A biconditional is equivalent to a pair of conditionals, one in each direction:
A↔B≡(A→B)∧(B→A)The first conditional says that A is sufficient for B; the second says that B is sufficient for A. Both are needed for the two-way relationship.
Conditional from disjunction and negation
The material conditional can also be expressed using disjunction and negation:
A→B≡¬A∨BBoth sides are false only when A is true and B is false. In every other case, both are true. Since their truth tables match, the expressions are logically equivalent.
These relationships show that a system using negation, conjunction, and disjunction can express conditionals, biconditionals, and exclusive disjunctions as well. The familiar operators remain useful because their names correspond closely to everyday language, even when other operators can reproduce their truth conditions.
NAND and NOR
Two other operators are NAND and NOR. NAND means “not both,” and NOR means “neither.” They are defined as:
ANANDB≡¬(A∧B) ANORB≡¬(A∨B)Each one can be used by itself to build expressions equivalent to the standard operators. For NAND:
¬A≡ANANDA A∧B≡(ANANDB)NAND(ANANDB) A∨B≡(ANANDA)NAND(BNANDB)For NOR:
¬A≡ANORA A∨B≡(ANORB)NOR(ANORB) A∧B≡(ANORA)NOR(BNORB)Because negation, conjunction, and disjunction can be constructed from NAND alone—or from NOR alone—either operator can serve as the sole building block of a complete system of truth-functional logic. That does not mean such a system is always the easiest to use. A system with only one operator may require longer, less familiar expressions than one using several standard connectives.
Think About It: Why might a system with fewer operators be more compact in its foundations but less convenient in everyday reasoning?
Building and evaluating complex truth tables
Complex statements are evaluated by breaking them into smaller parts. A useful rule is to begin with the operators whose scope is smallest—the operators that apply to the fewest parts—and work outward until the main operator has been evaluated.
For an expression such as ¬(A∧B)→(C∨B), the evaluation proceeds in this order:
- Evaluate the conjunction A∧B.
- Negate that result to get ¬(A∧B).
- Evaluate the disjunction C∨B.
- Apply the conditional to the two larger parts.
This method prevents a common mistake: trying to evaluate the whole expression at once without first establishing the truth values of its components.
Example: a three-premise argument
Consider the argument:
P↔Q,P∨R,¬Q,∴RIt has three variables, so its truth table needs 23=8 rows. Evaluate each premise and the conclusion:
| P | Q | R | P↔Q | P∨R | ¬Q | Conclusion R |
|---|---|---|---|---|---|---|
| True | True | True | True | True | False | True |
| True | True | False | True | True | False | False |
| True | False | True | False | True | True | True |
| True | False | False | False | True | True | False |
| False | True | True | False | True | False | True |
| False | True | False | False | False | False | False |
| False | False | True | True | True | True | True |
| False | False | False | True | False | True | False |
Only the seventh row makes every premise true. In that row, the conclusion R is also true. There is no row in which all three premises are true and the conclusion is false, so the argument is valid.
Example: evaluating nested operators
Now consider:
¬(P∧Q)→(R∨Q),¬P,¬Q,∴RThe first premise contains several operators. Its smaller parts are P∧Q and R∨Q. Those are evaluated first; the conjunction is then negated, and the conditional is evaluated last.
| P | Q | R | P∧Q | ¬(P∧Q) | R∨Q | ¬(P∧Q)→(R∨Q) | ¬P | ¬Q | Conclusion R |
|---|---|---|---|---|---|---|---|---|---|
| True | True | True | True | False | True | True | False | False | True |
| True | True | False | True | False | True | True | False | False | False |
| True | False | True | False | True | True | True | False | True | True |
| True | False | False | False | True | False | False | False | True | False |
| False | True | True | False | True | True | True | True | False | True |
| False | True | False | False | True | True | True | True | False | False |
| False | False | True | False | True | True | True | True | True | True |
| False | False | False | False | True | False | False | True | True | False |
The seventh row is the only one where all the premises are true: P is false, Q is false, and R is true. The conclusion is true in that row. No row makes all the premises true while making R false, so the argument is valid.
Truth tables provide a mechanical, reliable check: every possible assignment is tested. For arguments with many variables, however, the number of rows grows quickly. Three variables require eight rows, four require sixteen, and five require thirty-two. For larger arguments, natural deduction and formal proofs can be more practical because they show how a conclusion can be derived step by step rather than listing every possible assignment.
Comprehensive review
Logic examines whether conclusions follow from premises, and the laws of identity, non-contradiction, and excluded middle express basic standards of classical reasoning. Deductive validity means that no case has all true premises and a false conclusion; soundness adds the requirement that the premises are actually true.
Truth tables make those standards concrete. Negation reverses a truth value, conjunction requires both parts to be true, inclusive disjunction requires at least one part to be true, a material conditional fails only when its antecedent is true and its consequent false, and a biconditional is true when both sides have matching truth values. By applying these rules to every possible combination, truth tables can reveal valid argument forms and expose invalid ones.
Operators can also be expressed through other operators. Exclusive disjunction, biconditional, and conditional have equivalent formulations using simpler connectives, while NAND or NOR alone can express the standard truth-functional operators. For complex expressions, evaluating smaller-scope components first makes the work systematic. Together, these ideas provide a practical foundation for analyzing arguments and for developing more advanced skills in formal logic.

Ask anything
We've read this whole study set, so questions about it get the best answers.