Logic
Learning objectives
- Understand logical connectives: and, or, not, if-then
- Distinguish between a statement and its converse/contrapositive
- Recognize valid logical arguments
Mathematics is the only subject where you cannot get the wrong answer by accident. Either your argument is logically valid or it is not, and there is no "mostly true" in between. Logic is the grammar that makes this discipline possible — the rules for combining true statements to produce other true statements, and for spotting the gap when an argument secretly does something it should not.
What a statement is
A statement (or proposition) is a sentence that is either true or false — not both, not neither. "" is a statement (true). " is rational" is a statement (false). "" is NOT a statement unless we are told what is — it is an open formula. "Is mathematics beautiful?" is also not a statement — it has no truth value.
The four connectives
From simple statements you build complicated ones using four logical connectives:
And : true exactly when BOTH and are true.
Or : true exactly when AT LEAST ONE of is true. (Mathematicians always use "or" inclusively — both being true counts.)
Not : true exactly when is false.
If...then : FALSE only when is true and is false. In every other case — including when is false — the implication is true ("vacuously"). This last point trips up beginners; see the trap below.
The widget below builds the truth tables for these connectives line by line. Watch how behaves in the rows — both come out true. Then type your own expression (e.g., P AND (NOT Q) or NOT P OR Q) to see its column appear:
Implication, converse, and contrapositive — do not confuse them
From any implication you can form three relatives:
The original: .
The converse: . NOT logically equivalent to the original. ("If it rains, the ground is wet" is true; "if the ground is wet, it must be raining" is false — a sprinkler also makes the ground wet.)
The contrapositive: . Logically equivalent to the original. ("If the ground is not wet, then it did not rain" says exactly the same thing as "if it rains, the ground is wet" — they have the same truth table.)
The contrapositive is the engine of proof by contrapositive: to prove "if then ," prove the contrapositive instead. Sometimes it is much easier.
Try it
- State the contrapositive of "If is even, then is even." Is the contrapositive easier or harder to prove than the original?
- Truth-tableise : list the four cases of and the truth value of in each. The result should match the rule above.
- What is the negation of "for all "? (Hint: the negation of "for all" is "there exists".)
- You read "all squares are rectangles." What is the converse? Is the converse true?
Pause: students confuse " is true" with " is true and is true." They are NOT the same. "If pigs fly then " is true. Why?
A trap to watch for
The most damaging logical confusion is mistaking "" for "." A theorem of the form does NOT automatically come with its converse. "Every square is a rectangle" is true; "every rectangle is a square" is false. To prove an "if and only if" statement, you must prove both directions separately. The fix: when reading a theorem, identify the hypothesis and conclusion explicitly. Ask "does this theorem say the converse?" If it does not, do not assume it.
What you now know
You can identify a statement, combine statements with the four connectives, distinguish a conditional from its converse and contrapositive, and recognise the contrapositive as a logically valid proof technique. The next section introduces sets — the language in which every mathematical object is now packaged.
Quick check
References
- Lang, S. (1971). Basic Mathematics. Springer. Intermezzo, §2 — the four connectives and the converse / contrapositive distinction.
- Velleman, D. (2019). How to Prove It: A Structured Approach, 3rd ed. Cambridge. Chapters 1 and 3 — the canonical introduction to propositional logic for math students.
- Halmos, P. (1974). Naive Set Theory. Springer. Chapter 1 — logic and quantifiers as the prerequisite to set theory.