TN 12th MathsLearn · Visualize · Practice

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.

DefinitionBinary operation

A binary operation * on a non-empty set SS is a function :S×SS* : S \times S \to S. That is, to every ordered pair (a,b)(a, b) with a,bSa, b \in S it assigns exactly one element aba * b, and crucially that result again lies in SS.

The requirement that aba * b stays inside SS is called closure. It is built into the definition — if the output ever escapes SS, then * is not a binary operation on SS.

Familiar examples
  • Addition ++ and multiplication ×\times are binary operations on N,Z,Q,R\mathbb{N}, \mathbb{Z}, \mathbb{Q}, \mathbb{R}.
  • Subtraction - is a binary operation on Z\mathbb{Z}, but not on N\mathbb{N} (for example 25=3N2 - 5 = -3 \notin \mathbb{N}).
  • Matrix multiplication is a binary operation on the set of all 2×22 \times 2 real matrices.
  • Union \cup and intersection \cap are binary operations on the power set of any set.
ExampleTesting closure
Is ab=a+baba * b = a + b - ab a binary operation on the set of integers Z\mathbb{Z}?

2. Properties of binary operations

Once we have a binary operation * on a set SS, we can ask what algebraic laws it obeys. Four properties matter most.

DefinitionCommutative

* is commutative if ab=baa * b = b * a for all a,bSa, b \in S.

DefinitionAssociative

* is associative if (ab)c=a(bc)(a * b) * c = a * (b * c) for all a,b,cSa, b, c \in S.

DefinitionIdentity element

An element eSe \in S is an identity for * if ae=ea=aa * e = e * a = a for every aSa \in S. For example 00 is the identity for addition and 11 is the identity for multiplication.

DefinitionInverse element

If an identity ee exists, then bSb \in S is an inverse of aa when ab=ba=ea * b = b * a = e. Under addition the inverse of aa is a-a; under multiplication the inverse of a0a \ne 0 is 1a\tfrac{1}{a}.

Note: Commutativity and associativity are different questions. Subtraction on $\mathbb{Z}$ is neither: $3 - 5 \ne 5 - 3$, and $(8 - 3) - 2 = 3$ while $8 - (3 - 2) = 7$.
ExampleChecking associativity
On R\mathbb{R} define ab=a+b+aba * b = a + b + ab. Is * associative?

3. Mathematical logic: statements

Logic studies reasoning. Its atoms are statements (also called propositions).

DefinitionStatement (proposition)

A statement is a declarative sentence that is either true or false, but not both. Its truth value is TT (true) or FF (false).

Statement or not?
  • "2+3=52 + 3 = 5" is a statement (true). "77 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 "x+1=4x + 1 = 4" (depends on xx) 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 p,q,r,p, q, r, \dots

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 ¬p\neg p ("not pp") — reverses the truth value.
  • Conjunction pqp \wedge q ("pp and qq") — true only when both are true.
  • Disjunction pqp \vee q ("pp or qq") — false only when both are false (inclusive or).
  • Conditional pqp \to q ("if pp then qq") — false only when pp is true and qq is false.
  • Biconditional pqp \leftrightarrow q ("pp if and only if qq") — true exactly when pp and qq have the same truth value.
Watch out: The conditional $p \to q$ trips students up: whenever the hypothesis $p$ is false, the whole statement is automatically true ("vacuously true"). Only a true $p$ with a false $q$ makes $p \to q$ false.
Key idea: Open the Visualize tab to build these truth tables yourself — pick any compound expression and watch the result column fill in row by row.

In the conditional pqp \to q, the statement qpq \to p is its converse, ¬p¬q\neg p \to \neg q its inverse, and ¬q¬p\neg q \to \neg p its contrapositive.

5. Tautology, contradiction, contingency

Look at the final column of a compound statement's truth table. Three cases can occur.

DefinitionTautology

A compound statement that is true for every possible assignment of truth values to its components. Example: p¬pp \vee \neg p.

DefinitionContradiction

A compound statement that is false for every assignment. Example: p¬pp \wedge \neg p.

DefinitionContingency

A compound statement that is true for some assignments and false for others — neither a tautology nor a contradiction. Example: pqp \wedge q.

ExampleIdentifying a tautology
Show that p¬pp \vee \neg p is a tautology.

6. Logical equivalences

DefinitionLogically equivalent

Two statements are logically equivalent, written \equiv, when they have identical truth values in every row of the truth table. Equivalently, ABA \equiv B means ABA \leftrightarrow B is a tautology.

The most useful equivalences to memorise:

De Morgan's laws
¬(pq)¬p¬q,¬(pq)¬p¬q\neg(p \wedge q) \equiv \neg p \vee \neg q, \qquad \neg(p \vee q) \equiv \neg p \wedge \neg q
Conditional as disjunction
pq¬pqp \to q \equiv \neg p \vee q
Contrapositive
pq¬q¬pp \to q \equiv \neg q \to \neg p
Note: De Morgan's laws say "not (both)" is the same as "at least one not", and "not (either)" is the same as "neither". They turn a negation of a compound statement into a compound of negations.
ExampleVerifying a De Morgan law
Verify ¬(pq)¬p¬q\neg(p \wedge q) \equiv \neg p \vee \neg q using a truth table.

7. The duality principle

Many logical equivalences come in mirror-image pairs. The duality principle explains why.

DefinitionDual of a statement

The dual of a compound statement is obtained by interchanging \wedge with \vee (and swapping the constants true T\mathbf{T} and false F\mathbf{F}), 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.

Dual pairs
  • The dual of p(qr)p \wedge (q \vee r) is p(qr)p \vee (q \wedge r).
  • The dual of pFpp \vee \mathbf{F} \equiv p is pTpp \wedge \mathbf{T} \equiv p.