Unit 1 of 4 · B.Sc IT Sem 1

Unit 1: Set theory and relations

Mathematics-I notes · PTU syllabus (BSIT103/BSBC103)

4 min read9 topics10 exam questions
On this page
  1. Unit summary
  2. Sets and their elements
  3. Methods of describing a set
  4. Types of sets
  5. Set operations and Venn diagrams
  6. Laws of set algebra
  7. Partition of a set
  8. Relations: definitions and types
  9. Domain, range, inverse and composite relations
  10. Graphs and matrix representation of relations
  11. Key terms
  12. Quick revision
  13. Important questions

Unit summary

Sets and relations are the language of discrete mathematics and databases. This unit covers elements and methods of describing a set, types of sets, set operations, Venn diagrams, associative, distributive and De Morgan's laws, duality, partitions, definitions and types of relations, graphs of relations, domain, range, inverse and composite relations, and the matrix representation of a relation.

After this unit you can

  • Describe sets and their types
  • Perform set operations and apply laws of sets
  • Define relations and their types, domain, range, inverse and composition
  • Represent relations by graphs and matrices

PTU syllabus topics

  • Elements and methods of describing a set
  • types of sets
  • set operations (union, intersection, difference)
  • Venn diagrams
  • associative/distributive/De Morgan's laws
  • duality
  • partitioning of a set
  • relation definitions and types
  • graphs of relations
  • domain/range/inverse/composite relations
  • matrix representation of a relation
Key formulasSet laws
  • De Morgan's laws

    (A ∪ B)' = A' ∩ B' and (A ∩ B)' = A' ∪ B'

  • Distributive law

    A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)

  • Cardinality

    n(A ∪ B) = n(A) + n(B) − n(A ∩ B)

  • Power set

    A set with n elements has 2^n subsets

1

Topic 1

Sets and their elements

A set is a well-defined collection of distinct objects. "Well-defined" means that for any object we can say clearly whether it belongs to the set or not. "The vowels of English" is a set; "the good students of a class" is not, because "good" is a matter of opinion. The objects in a set are called its elements or members. We write sets with capital letters (A, B, C) and elements with small letters. If a is an element of A, we write a ∈ A; if not, a ∉ A.

  • Order does not matter: {1, 2, 3} and {3, 1, 2} are the same set.
  • Repetition does not matter: {1, 1, 2} is the same as {1, 2}.
  • The number of elements in a finite set A is its cardinality, written n(A).

Example

A = {a, e, i, o, u}. Here e ∈ A, b ∉ A and n(A) = 5.

2

Topic 2

Methods of describing a set

There are two standard ways to write a set.

MethodHow it worksExample
Roster (tabular) formList every element inside braces, separated by commasA = {2, 4, 6, 8, 10}
Set-builder (rule) formState the property shared by all elementsA = {x : x is an even natural number, x ≤ 10}

Roster form is best for small sets. Set-builder form is best for large or infinite sets, where listing is impossible.

Example

The set of natural numbers less than 6: roster form {1, 2, 3, 4, 5}; set-builder form {x : x ∈ N, x < 6}.

Exam tip

In the exam, when asked to "convert" a set, always show both forms side by side and mention which is which.

3

Topic 3

Types of sets

ClassificationTypes of sets
Sets
  • Null (empty)

    No elements: { } or φ

  • Singleton

    Exactly one element: {7}

  • Finite

    Countable number of elements

  • Infinite

    Elements never end: N, Z

  • Equal

    Exactly the same elements

  • Equivalent

    Same number of elements

  • Null (empty) set: contains no element, written φ or { }. Example: {x : x is a natural number less than 1}.
  • Singleton set: has exactly one element, such as {0}. Note that {0} is not empty — it contains 0.
  • Finite and infinite sets: a finite set can be counted to an end ({1, 2, 3}); an infinite set cannot (the set of all natural numbers).
  • Equal sets: A = B when they have exactly the same elements, e.g. {1, 2, 3} = {3, 2, 1}.
  • Equivalent sets: have the same number of elements, n(A) = n(B), even if the elements differ: {a, b, c} and {1, 2, 3}.
  • Disjoint sets: have no element in common, so A ∩ B = φ.
  • Universal set (U): the set containing all elements under discussion in a problem.

Exam tip

Every equal pair of sets is equivalent, but equivalent sets need not be equal. This is a favourite short question.

4

Topic 4

Set operations and Venn diagrams

Key termsSet operations at a glance
Union A ∪ B
Elements in A or B or both
Intersection A ∩ B
Elements common to A and B
Difference A − B
Elements in A but not in B
Symmetric difference A Δ B
Elements in exactly one of A and B: (A − B) ∪ (B − A)
Complement A'
Elements of U not in A: U − A

Take U = {1, 2, 3, 4, 5, 6, 7, 8}, A = {1, 2, 3, 4} and B = {3, 4, 5, 6}.

OperationResult
A ∪ B{1, 2, 3, 4, 5, 6}
A ∩ B{3, 4}
A − B{1, 2}
B − A{5, 6}
A Δ B{1, 2, 5, 6}
A'{5, 6, 7, 8}

Useful laws to remember:

  • Commutative: A ∪ B = B ∪ A and A ∩ B = B ∩ A
  • De Morgan's laws: (A ∪ B)' = A' ∩ B' and (A ∩ B)' = A' ∪ B'
  • Counting formula: n(A ∪ B) = n(A) + n(B) − n(A ∩ B)

Example

In a class of 60, 35 study Hindi, 30 study English and 15 study both. Students studying at least one language = 35 + 30 − 15 = 50.

5

Topic 5

Laws of set algebra

Key formulasLaws of sets
  • 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 ∩ U = A

  • Complement

    A ∪ A′ = U; A ∩ A′ = ∅

  • Principle of duality: any law remains true if ∪ and ∩ are interchanged and U and ∅ are interchanged.
Key formulasCounting
  • Two sets

    n(A ∪ B) = n(A) + n(B) − n(A ∩ B)

  • Three sets

    n(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A ∩ B) − n(B ∩ C) − n(A ∩ C) + n(A ∩ B ∩ C)

Example

Of 100 students, 60 study C and 50 study Python; 30 study both. Students studying at least one = 60 + 50 − 30 = 80; neither = 20.

6

Topic 6

Partition of a set

  • A partition of A is a collection of non-empty, pairwise disjoint subsets whose union is A.
  • Example: {1, 2, 3, 4, 5, 6} partitioned into {1, 3, 5} and {2, 4, 6}. Every equivalence relation creates a partition into equivalence classes.
7

Topic 7

Relations: definitions and types

  • Cartesian product: A × B = {(a, b) : a ∈ A, b ∈ B}. A relation from A to B is a subset of A × B.
ClassificationTypes of relations on a set A
Relations
  • Reflexive

    (a, a) ∈ R for every a

  • Symmetric

    (a, b) ∈ R implies (b, a) ∈ R

  • Antisymmetric

    (a, b) and (b, a) in R imply a = b

  • Transitive

    (a, b) and (b, c) in R imply (a, c) ∈ R

  • Equivalence

    Reflexive, symmetric and transitive

  • Partial order

    Reflexive, antisymmetric and transitive

Example

"Is congruent modulo 3" on integers is an equivalence relation; "divides" on positive integers is a partial order.

8

Topic 8

Domain, range, inverse and composite relations

  • Domain: set of first elements; range: set of second elements.
  • Inverse: R⁻¹ = {(b, a) : (a, b) ∈ R}.
  • Composite: if R ⊆ A × B and S ⊆ B × C, then S ∘ R = {(a, c) : (a, b) ∈ R and (b, c) ∈ S for some b}.

Example

R = {(1, 2), (2, 3)}, S = {(2, 5), (3, 6)}: S ∘ R = {(1, 5), (2, 6)}; R⁻¹ = {(2, 1), (3, 2)}.

9

Topic 9

Graphs and matrix representation of relations

  • Digraph: each element is a vertex; draw an arrow a → b for each (a, b) in R; a loop for (a, a).
  • Relation matrix: M[i][j] = 1 if (ai, bj) ∈ R, else 0.
  • Reading properties from the matrix: reflexive — all diagonal entries 1; symmetric — matrix equals its transpose; composition — Boolean product of matrices.

Key terms

Power set
Set of all subsets
Partition
Disjoint non-empty subsets covering a set
Equivalence relation
Reflexive, symmetric and transitive relation
Inverse relation
Relation with pairs reversed
Relation matrix
0–1 matrix showing related pairs

Quick revision

  • Roster and set-builder forms; types of sets.
  • Union, intersection, difference, complement; Venn diagrams.
  • Commutative, associative, distributive, De Morgan's laws; duality; counting formula.
  • Partitions; relation types; equivalence and partial order.
  • Domain, range, inverse, composite; digraphs and matrices.

Important exam questions

Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).

Short-answer questions

  1. Q1.Distinguish roster and set-builder forms.
  2. Q2.State De Morgan's laws.
  3. Q3.What is the principle of duality?
  4. Q4.Define an equivalence relation.
  5. Q5.Find R⁻¹ for R = {(1, 3), (2, 4)}.
  6. Q6.How is reflexivity seen in a relation matrix?

Long-answer questions

  1. Q1.Explain set operations and prove De Morgan's laws using Venn diagrams.
  2. Q2.Explain the types of relations with examples.
  3. Q3.Explain domain, range, inverse and composite relations with examples.
  4. Q4.Explain graph and matrix representation of relations.

Stuck on this unit?

Message SBS on WhatsApp for help with Mathematics-I, or to ask about studying B.Sc IT at Synetic.

WhatsApp us