Skip to content

← Grade 11 Mathematics

Logic and Set

Unit 1 · Algebra

Hide the stories, facts, photos, activities and interactives, for revising before an exam
What this builds on from class
In this unit 5 sections
  1. 1.1 Statements
  2. 1.2 Logical connectives
  3. 1.3 Truth tables
  4. 1.4 Theorems based on set operations
  5. Exercise

Many staircases in Nepal’s houses have a light with two switches, one at the bottom of the stairs and one at the top. Switch it on downstairs, walk up, switch it off upstairs. Whichever switch you touch, the light changes: on becomes off, off becomes on.

So here is this unit’s question: what rule joins the two switches to the light? Each switch is up or down, the light on or off, and a rule that says which is a statement of logic. The answer comes at the end of 1.4, where the same rule also turns out to be a fact about sets.

1.1 Statements

Mathematics is made of sentences that are either true or false. A statement (or proposition) is a sentence that is either true or false, but not both. Whether it is true or false is its truth value, written T or F.

Sentence Statement? Truth value
Kathmandu is the capital of Nepal. yes T
7 is an even number. yes F
Mount Everest is 8848.86 m high. yes T (as Nepal and China measured it in 2020)
Close the door. no: a command
Is it raining in Pokhara? no: a question
What a beautiful view! no: an exclamation
x + 3 = 7 no: true for x = 4, false otherwise

A sentence such as x + 3 = 7 is an open sentence: it becomes a statement only when x is given a value. A false statement is still a statement; what matters is that it has exactly one truth value, even one nobody yet knows (“There is life on a planet of another star”).

Statements are named with small letters, p, q, r: p: “6 is divisible by 3”. A statement with no smaller statement inside it is simple; one made of simple statements joined by words such as not, and, or, if … then is compound.

Which of these is a statement?

Pick an answer to see why.

The sentence “x + 3 > 5” is:

Pick an answer to see why.

1.2 Logical connectives

The words that join statements are the logical connectives. Each has a symbol and a rule that gives the truth value of the compound from the truth values of its parts.

Connective Symbol Read as True when
negation ∼p \sim p not p p is false
conjunction p∧q p \wedge q p and q both are true
disjunction p∨q p \vee q p or q at least one is true
conditional p → q if p then q in every case except p true, q false
biconditional p↔q p \leftrightarrow q p if and only if q both have the same truth value

(Some books write ¬p \neg p or p′ for ∼p \sim p , and p⇒q p \Rightarrow q , p⇔q p \Leftrightarrow q for the last two.)

Negation. p: “Nepal has 77 districts” (T). ∼p \sim p : “Nepal does not have 77 districts” (F). The negation flips the truth value. “Nepal has 75 districts” is not the negation of p: both could be false.

Conjunction. p: “2 is prime”, q: “2 is even”. p∧q p \wedge q : “2 is prime and even” is true, because both parts are. One false part makes an “and” false.

Disjunction. p∨q p \vee q is true when p is true, or q is, or both. In everyday speech “tea or coffee?” often means one but not both; in mathematics “or” is inclusive: both is allowed. (The one-but-not-both kind is exclusive or; a staircase light can follow it, as 1.4 shows.)

Conditional. In p → q, p is the hypothesis (antecedent) and q the conclusion (consequent). Think of it as a promise: “If you score an A in the SEE, I will buy you a bicycle.” The promise is broken in only one case: you score the A and get no bicycle. If you don’t score the A, nothing was promised, so the promise isn’t broken, bicycle or not: p → q is true whenever p is false.

Biconditional. p↔q p \leftrightarrow q means (p→q)∧(q→p) (p \to q) \wedge (q \to p) : each promises the other. “A triangle is equilateral if and only if its three angles are equal” is true, since each part holds exactly when the other does.

The truth tables of the connectives

A truth table lists every possible pair of truth values of p and q, one row each, and the compound’s value in each row:

p q ∼p \sim p p∧q p \wedge q p∨q p \vee q p → q p↔q p \leftrightarrow q
T T F T T T T
T F F F T F F
F T T F T T F
F F T F F T T

Try it

One gate, three kinds

A logic gate is a small circuit that does one connective: with 1 for true and 0 for false, an AND gate lights its lamp only when both inputs are 1. Change the gate and try all four rows of switches: you get the columns of p∧q p \wedge q , p∨q p \vee q and ∼p \sim p above.

A0B0ANDchange0Q
ABQ
00
01
10
11

Tap the switches, or a row of the table, to try every row. Each row you try fills in.

Converse, inverse and contrapositive

From p → q three other conditionals can be made:

Name Form Example: “if a number is divisible by 4, it is even”
converse q → p if a number is even, it is divisible by 4 (false: 6)
inverse ∼p→∼q \sim p \to \sim q if a number is not divisible by 4, it is not even (false: 6)
contrapositive ∼q→∼p \sim q \to \sim p if a number is not even, it is not divisible by 4 (true)

The contrapositive always has the same truth value as the conditional (1.3 proves it); the converse and inverse need not. Mixing up a statement and its converse is one of the commonest mistakes in reasoning.

p → q is false. What are the truth values of p and q?

Pick an answer to see why.

The contrapositive of “If it rains, the match is canceled” is:

Pick an answer to see why.

1.3 Truth tables

A compound statement of n simple statements has 2n 2^n rows in its truth table: each new statement doubles the rows, one copy with it true and one with it false. Two statements give 4 rows, three give 8. Build the table a column at a time, each from columns already filled, ending with the whole statement.

Tautology, contradiction and equivalence

A compound statement that is true in every row is a tautology; one false in every row is a contradiction; one that is sometimes true and sometimes false is a contingency. p∨∼p p \vee \sim p (“it rains or it doesn’t”) is a tautology, p∧∼p p \wedge \sim p a contradiction.

Two statements are logically equivalent, written ≡ \equiv , if they have the same truth value in every row. Then X↔Y X \leftrightarrow Y is a tautology. Equivalent statements say the same thing in different words, so one may replace the other in any argument.

The laws of logic

Each line below is an equivalence that a truth table proves (try one or two). They let you simplify a statement without a table, the way the laws of algebra simplify an expression. Here t is a statement that is always true, c one that is always false.

Law
idempotent p∧p≡p p \wedge p \equiv p p∨p≡p p \vee p \equiv p
commutative p∧q≡q∧p p \wedge q \equiv q \wedge p p∨q≡q∨p p \vee q \equiv q \vee p
associative (p∧q)∧r≡p∧(q∧r) (p \wedge q) \wedge r \equiv p \wedge (q \wedge r) (p∨q)∨r≡p∨(q∨r) (p \vee q) \vee r \equiv p \vee (q \vee r)
distributive p∧(q∨r)≡(p∧q)∨(p∧r) p \wedge (q \vee r) \equiv (p \wedge q) \vee (p \wedge r) p∨(q∧r)≡(p∨q)∧(p∨r) p \vee (q \wedge r) \equiv (p \vee q) \wedge (p \vee r)
De Morgan’s ∼(p∧q)≡∼p∨∼q \sim(p \wedge q) \equiv \sim p \vee \sim q ∼(p∨q)≡∼p∧∼q \sim(p \vee q) \equiv \sim p \wedge \sim q
identity p∧t≡p p \wedge t \equiv p p∨c≡p p \vee c \equiv p
complement p∧∼p≡c p \wedge \sim p \equiv c p∨∼p≡t p \vee \sim p \equiv t
double negation ∼(∼p)≡p \sim(\sim p) \equiv p

Which of these is a tautology?

Pick an answer to see why.

How many rows has the truth table of (p→q)∧(r∨∼s) (p \to q) \wedge (r \vee \sim s) ?

Pick an answer to see why.

1.4 Theorems based on set operations

What you need

From Grade 9 Math, Sets and Grade 10 Math, Sets: a set A in a universal set U; A ⊆ B when every element of A is in B; the union A ∪ B, intersection A ∩ B, difference A − B (in A, not in B) and complement A (in U, not in A; some books write A′ or Ac A^c ).

Sets speak logic

Each operation on sets is a connective on the statements “x ∈ A”, “x ∈ B”:

Sets means Logic
x ∈ A ∪ B x ∈ A or x ∈ B ∨ \vee
x ∈ A ∩ B x ∈ A and x ∈ B ∧ \wedge
x ∈ A not x ∈ A ∼ \sim
x ∈ A − B x ∈ A and not x ∈ B p∧∼q p \wedge \sim q
A ⊆ B if x ∈ A then x ∈ B →
A = B x ∈ A if and only if x ∈ B ↔ \leftrightarrow

So every law of logic is also a law of sets: change ∧ \wedge to ∩, ∨ \vee to ∪, ∼ \sim to the complement, t to U and c to ∅ \varnothing .

Law
idempotent A ∪ A = A A ∩ A = A
commutative A ∪ B = B ∪ A A ∩ B = B ∩ A
associative (A ∪ B) ∪ C = A ∪ (B ∪ C) (A ∩ B) ∩ C = A ∩ (B ∩ C)
distributive A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
De Morgan’s A ∪ B = A ∩ B A ∩ B = A ∪ B
identity A∪∅=A A \cup \varnothing = A A ∩ U = A
complement A ∪ A = U A∩A‾=∅ A \cap \overline{A} = \varnothing
difference A − B = A ∩ B

Proving a set identity

Two sets are equal when each is a subset of the other. So to prove X = Y:

  1. take any x ∈ X and show x ∈ Y (so X ⊆ Y);
  2. take any x ∈ Y and show x ∈ X (so Y ⊆ X).

When every step can be read backwards, the two halves are written at once with “⇔ \Leftrightarrow ” (if and only if).

UAB
Figure 1.1 A ∪ B, shaded: outside both circles. It is also the part outside A and outside B, A ∩ B.

Theorem 1 (De Morgan’s law). A ∪ B = A ∩ B.

  1. x∈A∪B‾⇔x∉A∪B x \in \overline{A \cup B} \Leftrightarrow x \notin A \cup B (definition of the complement).
  2. ⇔ \Leftrightarrow not (x ∈ A or x ∈ B) (definition of the union).
  3. ⇔x∉A \Leftrightarrow x \notin A and x ∉ B (De Morgan’s law of logic).
  4. ⇔x∈A‾ \Leftrightarrow x \in \overline{A} and x∈B‾⇔x∈A‾∩B‾ x \in \overline{B} \Leftrightarrow x \in \overline{A} \cap \overline{B} (complement, then intersection).

So the two sets have the same elements. The other De Morgan law, A ∩ B = A ∪ B, is proved the same way.

Theorem 2 (distributive law). A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

  1. x∈A∩(B∪C)⇔x∈A x \in A \cap (B \cup C) \Leftrightarrow x \in A and (x ∈ B or x ∈ C) (intersection, union).
  2. ⇔ \Leftrightarrow (x ∈ A and x ∈ B) or (x ∈ A and x ∈ C) (the distributive law of logic).
  3. ⇔x∈A∩B \Leftrightarrow x \in A \cap B or x∈A∩C⇔x∈(A∩B)∪(A∩C) x \in A \cap C \Leftrightarrow x \in (A \cap B) \cup (A \cap C) .
UABC
Figure 1.2 A ∩ (B ∪ C): the part of A inside B or C. It is A ∩ B and A ∩ C together, the right side of Theorem 2.

Theorem 3 (counting). For finite sets, n(A ∪ B) = n(A) + n(B) − n(A ∩ B).

  1. A ∪ B is made of three parts with no element in common: A − B, A ∩ B and B − A.
  2. n(A) = n(A − B) + n(A ∩ B) and n(B) = n(B − A) + n(A ∩ B) (each set is two of those parts).
  3. Adding, n(A) + n(B) = n(A − B) + n(B − A) + 2n(A ∩ B) = n(A ∪ B) + n(A ∩ B), which rearranges to the theorem: the overlap was counted twice.

Grade 10 Math, Sets uses it, and the three-set form, for surveys.

A ∪ B is equal to:

Pick an answer to see why.

n(A) = 40, n(B) = 25 and n(A ∪ B) = 55. Then n(A − B) is:

Pick an answer to see why.

Back to the staircase

Let p: “the bottom switch is up” and q: “the top switch is up”. Each switch, inside, sends the current along one of two wires that run between them (the travelers). The lamp lights when both switches pick the same wire. If an electrician wires them so that “up” picks the same wire at both ends, the lamp is on when both switches are up or both are down:

p q light on
T T T
T F F
F T F
F F T

That column is p↔q p \leftrightarrow q . Flipping either switch changes one of p, q, and a biconditional always changes when one side does: that is why either switch works. Wired the other way round, the light follows ∼(p↔q) \sim(p \leftrightarrow q) , the exclusive or: on when exactly one switch is up. Either way, the rule is a truth table, and the wires are a little computer that works it out.

In the language of sets: let P be the moments the bottom switch is up and Q the moments the top one is. The light is on during (P ∩ Q) ∪ (P ∩ Q), the two regions of the Venn diagram where the circles agree, and off during the other two, (P − Q) ∪ (Q − P). The biconditional is a set too.

Exercise

Choose the correct option

p∨q p \vee q is false when:

Pick an answer to see why.

A ∩ A is:

Pick an answer to see why.

The converse of ∼p→q \sim p \to q is:

Pick an answer to see why.

If p is true and q is false, which of these is true?

Pick an answer to see why.

∼(p→q) \sim(p \to q) is equivalent to:

Pick an answer to see why.

A − B is equal to:

Pick an answer to see why.

Which statement is a contradiction?

Pick an answer to see why.

U = {1, 2, 3, 4, 5, 6}, A = {1, 2, 3}, B = {2, 3, 4, 5}. Then A ∪ B is:

Pick an answer to see why.

In a class of 60, 35 study Computer and 30 study Economics, and every student studies at least one of them. How many study both?

Pick an answer to see why.

(p∧q)→r (p \wedge q) \to r is equivalent to:

Pick an answer to see why.

For sets A and B, A ∪ B = A ∩ B exactly when:

Pick an answer to see why.

Short questions

1.

p: “Pokhara is in Gandaki Province” and q: “25=25 2^5 = 25 ”.

  • a.Write p→∼q p \to \sim q and ∼p∨q \sim p \vee q in words. (2 marks)
  • b.Find the truth value of each. (1 mark)
  • c.Construct the truth table of ∼(p∧q)↔(∼p∨∼q) \sim(p \wedge q) \leftrightarrow (\sim p \vee \sim q) . What kind of statement is it? (2 marks)
Hint
Answer
2.

Using truth tables, prove that

  • a.p↔q≡(p→q)∧(q→p) p \leftrightarrow q \equiv (p \to q) \wedge (q \to p) ; (3 marks)
  • b.p → q and its converse are not equivalent. (2 marks)
Hint
Answer
3.

Show that [(p→q)∧(q→r)]→(p→r) [(p \to q) \wedge (q \to r)] \to (p \to r) is a tautology. (5 marks)

Hint
Answer
4.

For any sets A, B and C, prove that

  • a.A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C); (3 marks)
  • b.A − (A − B) = A ∩ B. (2 marks)
Hint
Answer

Long question

5.
  • a.Using the laws of logic, not a truth table, show that ∼(p∨(∼p∧q))≡∼p∧∼q \sim(p \vee (\sim p \wedge q)) \equiv \sim p \wedge \sim q , naming the law at each step. (4 marks)
  • b.Prove that A ∩ B = A ∪ B, and show it with Venn diagrams. (4 marks)
Hint
Answer

Project work

Where these facts come from
  • Mount Everest’s height, 8848.86 m, announced jointly by Nepal and China on 8 December 2020 (1.1): Wikipedia, “Mount Everest”, Height, read November 2026.
  • Two-way (multiway) switching and its travelers (1.4): Wikipedia, “Multiway switching”, read November 2026.
  • Boole’s An Investigation of the Laws of Thought (1854); De Morgan’s birth in Madurai (1806) and his Formal Logic (1847); Shannon’s 1937 thesis, published 1938 as “A Symbolic Analysis of Relay and Switching Circuits” (1.4): MacTutor, “George Boole”, MacTutor, “Augustus De Morgan”, MacTutor, “Claude Shannon”.
  • De Morgan’s laws first stated explicitly in Formal Logic (1847): Wikipedia, “De Morgan’s laws”, History, read November 2026. Boole’s correspondence with De Morgan from 1842: MacTutor, “George Boole”, above. Shannon’s thesis (MIT, 1937; published 1938) and the relays of telephone exchanges: Wikipedia, “A Symbolic Analysis of Relay and Switching Circuits”, read November 2026.
  • Definitions checked against OpenStax, Contemporary Mathematics, Chapter 2 (Logic) (CC BY 4.0).
  • The unit’s items and project work: CDC, Secondary Education Curriculum 2078, Mathematics, Grades 11–12, 1.1 and sample projects 2 and 3; the marks: CDC, Specification Grid 2078, Mathematics, Grade 11; IOE, BE/BArch Entrance Syllabus 2083, Mathematics 1.1.

Found a mistake? Please tell us.