Chapter 12
Discrete Mathematics
Binary operations and mathematical logic.
1. Binary operations
Addition, subtraction and multiplication all share a common shape: you feed in two elements of a set and get back a single element. Discrete mathematics makes this idea precise with the notion of a binary operation.
A binary operation on a non-empty set is a function . That is, to every ordered pair with it assigns exactly one element , and crucially that result again lies in .
The requirement that stays inside is called closure. It is built into the definition — if the output ever escapes , then is not a binary operation on .
- Addition and multiplication are binary operations on .
- Subtraction is a binary operation on , but not on (for example ).
- Matrix multiplication is a binary operation on the set of all real matrices.
- Union and intersection are binary operations on the power set of any set.
2. Properties of binary operations
Once we have a binary operation on a set , we can ask what algebraic laws it obeys. Four properties matter most.
is commutative if for all .
is associative if for all .
An element is an identity for if for every . For example is the identity for addition and is the identity for multiplication.
If an identity exists, then is an inverse of when . Under addition the inverse of is ; under multiplication the inverse of is .
3. Mathematical logic: statements
Logic studies reasoning. Its atoms are statements (also called propositions).
A statement is a declarative sentence that is either true or false, but not both. Its truth value is (true) or (false).
- "" is a statement (true). " is even" is a statement (false).
- "Chennai is in Tamil Nadu" is a statement (true).
- "Close the door." (a command), "What time is it?" (a question) and "" (depends on ) are NOT statements.
A statement built from a single idea is a simple statement. Combining simple statements with connective words like and, or, not gives a compound statement. We usually name simple statements with letters
4. Logical connectives and their truth tables
Five connectives let us build every compound statement. Each is defined completely by a truth table listing the output for every combination of inputs.
- Negation ("not ") — reverses the truth value.
- Conjunction (" and ") — true only when both are true.
- Disjunction (" or ") — false only when both are false (inclusive or).
- Conditional ("if then ") — false only when is true and is false.
- Biconditional (" if and only if ") — true exactly when and have the same truth value.
In the conditional , the statement is its converse, its inverse, and its contrapositive.
5. Tautology, contradiction, contingency
Look at the final column of a compound statement's truth table. Three cases can occur.
A compound statement that is true for every possible assignment of truth values to its components. Example: .
A compound statement that is false for every assignment. Example: .
A compound statement that is true for some assignments and false for others — neither a tautology nor a contradiction. Example: .
6. Logical equivalences
Two statements are logically equivalent, written , when they have identical truth values in every row of the truth table. Equivalently, means is a tautology.
The most useful equivalences to memorise:
7. The duality principle
Many logical equivalences come in mirror-image pairs. The duality principle explains why.
The dual of a compound statement is obtained by interchanging with (and swapping the constants true and false ), leaving negations and the variables alone.
Principle: if two statements are logically equivalent, then so are their duals. This is exactly why De Morgan's two laws, and the two distributive laws, always appear together — each is the dual of the other.
- The dual of is .
- The dual of is .