Unit 1: Set Theory

📚 What is a Set?

A set is a well-defined collection of distinct objects. "Well-defined" means there must be no ambiguity about whether an object belongs to the set or not. Sets are usually denoted by capital letters (A, B, C) and elements by lowercase letters (a, b, c).

Notation: If an element x belongs to set A, we write x ∈ A (read "x belongs to A"). If not, x ∉ A.

Representation Methods:

  1. Roster/Tabular: List all elements in curly braces. A = {1, 2, 3, 4, 5}
  2. Set-Builder: Describe the property. A = {x : x is a natural number, x ≤ 5} — read as "the set of all x such that x is a natural number less than or equal to 5"

Important Types of Sets:

Type Definition Example
Empty/Null Set (∅) Contains NO elements {x : x is a natural number less than 1} = ∅ or {}
Singleton Set Contains exactly ONE element {5}
Finite Set Has a countable number of elements {2, 4, 6, 8}
Infinite Set Has uncountable elements {1, 2, 3, 4, ...} (natural numbers)
Universal Set (U) Contains ALL elements under consideration If we discuss integers, U = Z
Equal Sets Same elements: A = B {1,2,3} = {3,1,2} (order doesn't matter)
Subset (A ⊆ B) Every element of A is also in B {1,2} ⊆ {1,2,3}
Proper Subset (A ⊂ B) A is subset of B but A ≠ B {1,2} ⊂ {1,2,3}
Power Set P(A) Set of ALL subsets of A. If |A|=n, then |P(A)|=2ⁿ P({1,2}) = {∅, {1}, {2}, {1,2}}

Number Sets You Must Know:

📚 Set Operations — in Full Detail

1. Union (A ∪ B): ALL elements that are in A OR B OR both.

A = {1, 2, 3}, B = {3, 4, 5}
A ∪ B = {1, 2, 3, 4, 5} — note: 3 appears only once (no duplicates in sets)

2. Intersection (A ∩ B): ONLY elements that are in BOTH A AND B.

A = {1, 2, 3}, B = {3, 4, 5}
A ∩ B = {3} — only 3 is in both sets

3. Difference (A − B or A \ B): Elements in A that are NOT in B.

A = {1, 2, 3, 4}, B = {3, 4, 5}
A − B = {1, 2} — remove from A anything that appears in B
B − A = {5} — note: A−B ≠ B−A

4. Complement (A' or Aᶜ): All elements in the Universal Set U that are NOT in A.

U = {1,2,3,4,5,6,7,8,9,10}, A = {2,4,6,8}
A' = {1,3,5,7,9,10}

5. Symmetric Difference (A Δ B): Elements in A or B but NOT in both. Formula: A Δ B = (A − B) ∪ (B − A)

A = {1,2,3}, B = {3,4,5}
A Δ B = {1, 2, 4, 5} — 3 is removed because it's in BOTH

Counting Formula (for two sets):

|A ∪ B| = |A| + |B| − |A ∩ B|
Problem: In a class, 30 students study Math, 20 study Science, 10 study both. How many study at least one?
Solution: |M ∪ S| = 30 + 20 − 10 = 40 students

For three sets:

|A ∪ B ∪ C| = |A| + |B| + |C| − |A∩B| − |B∩C| − |A∩C| + |A∩B∩C|

De Morgan's Laws (very important!):

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

Memory trick: "Break the bar (complement), change the sign (∪ becomes ∩ and vice versa)"

Properties of Set Operations:

Property Union Intersection
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)
Identity A∪∅ = A A∩U = A
Complement A∪A' = U A∩A' = ∅
Idempotent A∪A = A A∩A = A

📚 Relations & Functions

A relation R from set A to set B is a subset of A × B (the Cartesian product). Informally, it defines how elements of A are related to elements of B.

A = {1,2,3}, B = {a,b}
A × B = {(1,a),(1,b),(2,a),(2,b),(3,a),(3,b)} — all possible ordered pairs
R = {(1,a),(2,b),(3,a)} — this is a relation (subset of A×B)

Types of Relations (on a set A):

Type Definition Example on {1,2,3}
Reflexive Every element is related to itself: (a,a) ∈ R for all a {(1,1),(2,2),(3,3),...} — must contain all diagonal pairs
Symmetric If (a,b) ∈ R then (b,a) ∈ R If (1,2) is in R, then (2,1) must also be
Transitive If (a,b) ∈ R and (b,c) ∈ R then (a,c) ∈ R If (1,2) and (2,3) in R, then (1,3) must be too
Equivalence Reflexive + Symmetric + Transitive "=" (equality) is an equivalence relation
Anti-symmetric If (a,b) and (b,a) ∈ R then a = b "≤" is anti-symmetric

Functions: A function f: A → B is a special relation where every element of A maps to exactly ONE element of B. In other words, no element of A can have two different outputs.

Type Definition Visual Test
One-to-One (Injective) Different inputs → Different outputs. If f(a)=f(b) then a=b. No two arrows from A point to the same element in B
Onto (Surjective) Every element of B has at least one element mapping to it from A. Every element in B has at least one arrow pointing to it
Bijective Both one-to-one AND onto. Perfect pairing. Exactly one arrow to each element of B, none left out
Example: f: ℝ → ℝ defined by f(x) = 2x + 1
One-to-one? Yes. If 2a+1 = 2b+1, then a=b.
Onto? Yes. For any y, x = (y−1)/2 maps to it.
Bijective? Yes! It is both injective and surjective.
Unit 2: Matrices & Determinants

📚 What is a Matrix?

A matrix is a rectangular arrangement of numbers in rows and columns, enclosed in brackets. Matrices are used to solve systems of equations, perform transformations in graphics, and represent data in computer science.

A matrix with m rows and n columns is called an m × n matrix. The element in row i and column j is written as aᵢⱼ.

Types of Matrices:

Type Definition Example (if applicable)
Row Matrix Only 1 row (1×n) [1 2 3]
Column Matrix Only 1 column (m×1) 3 rows, 1 column
Square Matrix Rows = Columns (n×n) 2×2, 3×3, etc.
Zero/Null Matrix All elements are 0 Every entry is 0
Diagonal Matrix Non-zero only on main diagonal aᵢⱼ = 0 when i ≠ j
Identity Matrix (I) Diagonal matrix with all 1s on diagonal Like "1" for multiplication: AI = A
Symmetric A = Aᵀ (equals its transpose) aᵢⱼ = aⱼᵢ
Skew-Symmetric Aᵀ = −A, diagonal elements = 0 aᵢⱼ = −aⱼᵢ
Upper Triangular All elements below diagonal = 0
Lower Triangular All elements above diagonal = 0

📚 Matrix Operations

Addition/Subtraction: Add/subtract corresponding elements. Matrices must be the same size.

[1 2; 3 4] + [5 6; 7 8] = [1+5 2+6; 3+7 4+8] = [6 8; 10 12]

Scalar Multiplication: Multiply every element by the scalar.

3 × [1 2; 3 4] = [3 6; 9 12]

Matrix Multiplication (A × B): The most important operation. A must be m×n and B must be n×p (columns of A = rows of B). Result is m×p.

Each element of the result = dot product of a row of A with a column of B.

Multiply:
A = [1 2; 3 4] (2×2)  ×  B = [5 6; 7 8] (2×2)

Result[1][1] = (1×5) + (2×7) = 5 + 14 = 19
Result[1][2] = (1×6) + (2×8) = 6 + 16 = 22
Result[2][1] = (3×5) + (4×7) = 15 + 28 = 43
Result[2][2] = (3×6) + (4×8) = 18 + 32 = 50

A × B = [19 22; 43 50]
Important: Matrix multiplication is NOT commutative: A×B ≠ B×A in general!

Transpose (Aᵀ): Swap rows and columns. Row i becomes column i.

A = [1 2 3; 4 5 6] (2×3) → Aᵀ = [1 4; 2 5; 3 6] (3×2)

Properties of Transpose:

📚 Determinants

A determinant is a single number calculated from a square matrix. It tells us:

2×2 Determinant:

|a b; c d| = ad − bc
|3 2; 1 4| = (3×4) − (2×1) = 12 − 2 = 10

3×3 Determinant (Expansion along first row):

|a b c; d e f; g h i| = a(ei−fh) − b(di−fg) + c(dh−eg)
Find: |1 2 3; 4 5 6; 7 8 9|
= 1(5×9 − 6×8) − 2(4×9 − 6×7) + 3(4×8 − 5×7)
= 1(45−48) − 2(36−42) + 3(32−35)
= 1(−3) − 2(−6) + 3(−3)
= −3 + 12 − 9 = 0

Inverse of a Matrix: A⁻¹ exists only if det(A) ≠ 0.

For a 2×2 matrix:

A = [a b; c d] → A⁻¹ = (1/det(A)) × [d −b; −c a]
A = [3 2; 1 4], det(A) = 10
A⁻¹ = (1/10) × [4 −2; −1 3] = [0.4 −0.2; −0.1 0.3]

Verify: A × A⁻¹ should equal the Identity matrix I.

Cramer's Rule — Solving systems of equations using determinants:

Solve: 2x + 3y = 8 and x + 4y = 7
D = |2 3; 1 4| = 8 − 3 = 5
Dₓ = |8 3; 7 4| = 32 − 21 = 11 → x = 11/5 = 2.2
Dᵧ = |2 8; 1 7| = 14 − 8 = 6 → y = 6/5 = 1.2
Unit 3: Differential Calculus

📚 Limits — The Foundation of Calculus

A limit asks: "What value does f(x) approach as x gets closer and closer to some number?" We write: lim(x→a) f(x) = L.

The function doesn't need to actually equal L at x=a. It just needs to approach L.

Example: lim(x→2) (x² − 4)/(x − 2)
If we plug x=2 directly: (4−4)/(2−2) = 0/0 (undefined!)
But factoring: (x²−4)/(x−2) = (x+2)(x−2)/(x−2) = x+2
So lim = 2+2 = 4

Key Limit Rules:

Standard Limits (memorize!):

lim(x→0) sin(x)/x = 1
lim(x→0) (1 − cos x)/x = 0
lim(x→0) (eˣ − 1)/x = 1
lim(x→0) log(1+x)/x = 1
lim(x→∞) (1 + 1/x)ˣ = e ≈ 2.71828

📚 Derivatives — Rate of Change

The derivative of a function f(x) gives the rate at which f(x) changes as x changes. Geometrically, it's the slope of the tangent line at any point.

f'(x) = lim(h→0) [f(x+h) − f(x)] / h

All Derivative Formulas You Need:

Function f(x) Derivative f'(x) Example
xⁿ nxⁿ⁻¹ d/dx(x³) = 3x²
constant (c) 0 d/dx(7) = 0
Unique! It's its own derivative
aˣ · ln(a) d/dx(2ˣ) = 2ˣ ln(2)
ln(x) 1/x d/dx(ln x) = 1/x
sin(x) cos(x)
cos(x) −sin(x) Note the negative!
tan(x) sec²(x)

Derivative Rules:

Rule Formula Example
Sum/Difference (f±g)' = f' ± g' d/dx(x³ + 5x) = 3x² + 5
Constant Multiple (cf)' = c·f' d/dx(7x²) = 14x
Product Rule (fg)' = f'g + fg' d/dx(x²·sin x) = 2x·sin x + x²·cos x
Quotient Rule (f/g)' = (f'g − fg')/g² d/dx(sin x/x) = (cos x · x − sin x)/x²
Chain Rule d/dx[f(g(x))] = f'(g(x)) · g'(x) d/dx(sin(3x)) = cos(3x) · 3 = 3cos(3x)
Full worked example using Product Rule:
Find d/dx [x³ · eˣ]
Let f = x³, g = eˣ
f' = 3x², g' = eˣ
(fg)' = f'g + fg' = 3x²·eˣ + x³·eˣ = eˣ(3x² + x³) = x²eˣ(3 + x)

Applications of Derivatives:

Unit 4: Integral Calculus

📚 Integration — The Reverse of Differentiation

If differentiation finds the rate of change, integration finds the original function from its rate of change. It also calculates areas under curves.

If d/dx[F(x)] = f(x), then ∫ f(x) dx = F(x) + C

The C is the "constant of integration" because many functions can have the same derivative (e.g., x²+5 and x²+100 both have derivative 2x).

All Integration Formulas:

Function Integral
∫ xⁿ dx xⁿ⁺¹/(n+1) + C (n ≠ −1)
∫ 1/x dx ln|x| + C
∫ eˣ dx eˣ + C
∫ aˣ dx aˣ/ln(a) + C
∫ sin x dx −cos x + C
∫ cos x dx sin x + C
∫ sec²x dx tan x + C
∫ k dx kx + C
Examples:
∫ (3x² + 2x + 5) dx = 3·x³/3 + 2·x²/2 + 5x + C = x³ + x² + 5x + C

∫ (4x³ − 2/x) dx = 4·x⁴/4 − 2·ln|x| + C = x⁴ − 2ln|x| + C

Definite Integrals: Have upper and lower limits — give a number (the area).

∫[a to b] f(x) dx = F(b) − F(a)
∫[1 to 3] 2x dx = [x²]₁³ = 3² − 1² = 9 − 1 = 8
Unit 5: Probability & Statistics

📚 Probability — Complete Guide

Probability measures how likely an event is to occur, on a scale from 0 (impossible) to 1 (certain).

P(E) = Number of favorable outcomes / Total number of outcomes

Key Terms:

Example: A fair die is thrown. Find P(getting a number > 4).
S = {1,2,3,4,5,6} → |S| = 6
Favorable = {5,6} → |E| = 2
P(E) = 2/6 = 1/3

Addition Rule (OR — at least one event):

P(A or B) = P(A ∪ B) = P(A) + P(B) − P(A ∩ B)

If A and B are mutually exclusive (can't happen together): P(A ∪ B) = P(A) + P(B)

Multiplication Rule (AND — both events):

P(A and B) = P(A ∩ B) = P(A) × P(B|A)

If A and B are independent (one doesn't affect the other): P(A ∩ B) = P(A) × P(B)

Conditional Probability:

P(A|B) = P(A ∩ B) / P(B) — "probability of A given B has occurred"

Bayes' Theorem:

P(A|B) = P(B|A) × P(A) / P(B)

Permutations & Combinations:

Permutation (Order Matters) Combination (Order Doesn't)
Formula P(n,r) = n!/(n−r)! C(n,r) = n!/[r!(n−r)!]
Example Arrange 3 from 5 people in a line Choose 3 from 5 for a committee
Calculation P(5,3) = 5!/2! = 60 C(5,3) = 5!/(3!·2!) = 10
Example: How many 4-digit PINs using digits 0–9 (repetition allowed)?
10 × 10 × 10 × 10 = 10,000

Without repetition: 10 × 9 × 8 × 7 = 5,040 (each digit used once)

📚 Statistics — Measures of Central Tendency & Dispersion

Mean (Average):

Mean (x̄) = Sum of all values / Number of values = ∑x / n
Data: 5, 8, 12, 15, 20 → Mean = (5+8+12+15+20)/5 = 60/5 = 12

Median: The middle value when data is sorted. If even count, average the two middle values.

Sorted: 5, 8, 12, 15, 20 → Median = 12
Sorted: 3, 5, 7, 9, 11, 15 → Median = (9+11)/2 = 10

Mode: The value that appears MOST frequently.

Data: 3, 5, 5, 7, 5, 9 → Mode = 5 (appears 3 times)

Variance & Standard Deviation:

Variance (σ²) = ∑(xᵢ − x̄)² / n
Standard Deviation (σ) = √Variance

SD tells you how spread out the data is. Small SD = data clustered near mean. Large SD = data widely spread.

Find SD of: 2, 4, 6, 8, 10
Mean = (2+4+6+8+10)/5 = 30/5 = 6
Deviations: (2−6)²=16, (4−6)²=4, (6−6)²=0, (8−6)²=4, (10−6)²=16
Variance = (16+4+0+4+16)/5 = 40/5 = 8
SD = √8 = 2.83