Curriculum Matrix Lecture Notes

Mathematics for AI 1

Module 1: Sets, Logic, and Relations

A set is a collection of objects called elements, where e∈Ae \in A indicates containment and e∉Ae \notin A indicates non-containment. Set operations include:

  • Union:
A∪B:={x:x∈A∨x∈B}A \cup B := \{x : x \in A \lor x \in B\}
  • Intersection:
A∩B:={x:x∈A∧x∈B}A \cap B := \{x : x \in A \land x \in B\}
  • Difference:
A∖B:={x:x∈A∧x∉B}A \setminus B := \{x : x \in A \land x \notin B\}
  • Complement:
AC:=U∖AA^C := U \setminus A

Logical propositions are built using the universal quantifier ∀\forall denoting "for all", and the existential quantifier ∃\exists denoting "there exists at least one". Logical predicates correspond to set theory such that the "and" operator corresponds to intersection ∩\cap, "or" to union ∪\cup, and "not" to complement ACA^C.

A relation RR between sets MM and NN is a subset of the Cartesian product:

R⊆M×NR \subseteq M \times N

Relations possess distinct properties:

  • Injective: ∀(x1,y1),(x2,y2)∈R:x1≠x2  ⟹  y1≠y2\forall (x_1, y_1), (x_2, y_2) \in R : x_1 \neq x_2 \implies y_1 \neq y_2.
  • Surjective: ∀y∈N∃x∈M:(x,y)∈R\forall y \in N \exists x \in M : (x, y) \in R.
  • Bijective: Both injective and surjective.
  • Functional: ∀x∈M,y1,y2∈N:(x,y1),(x,y2)∈R  ⟹  y1=y2\forall x \in M, y_1, y_2 \in N : (x, y_1), (x, y_2) \in R \implies y_1 = y_2.

Relations on a single set MM can form an equivalence relation if they are reflexive, symmetric, and transitive. They form a partial order if they are reflexive, antisymmetric, and transitive.

Module 2: Functions, Real, and Complex Numbers

A function f:M→Nf: M \to N uniquely assigns every x∈Mx \in M to exactly one f(x)∈Nf(x) \in N. A function is invertible if and only if it is bijective. The composition of two invertible functions ff and gg is also invertible, adhering to the property:

(g∘f)−1=f−1∘g−1(g \circ f)^{-1} = f^{-1} \circ g^{-1}

The field of real numbers R\mathbb{R} obeys field axioms including commutativity, associativity, distributivity, and the existence of identity and inverse elements. A subset A⊂RA \subset \mathbb{R} is bounded from above if:

∃C∈R∀a∈A:a≤C\exists C \in \mathbb{R} \forall a \in A : a \leq C

Complex numbers C\mathbb{C} extend real numbers using the imaginary unit ii, where i2=−1i^2 = -1. A complex number has the canonical form z=x+iyz = x + iy, where xx is the real part Re(z)\text{Re}(z) and yy is the imaginary part Im(z)\text{Im}(z). The absolute value is defined as:

∣z∣=x2+y2|z| = \sqrt{x^2 + y^2}

They can also be written in Euler form using polar coordinates:

z=∣z∣eiϕ=∣z∣(cos⁡ϕ+isin⁡ϕ)z = |z|e^{i\phi} = |z|(\cos\phi + i\sin\phi)

Complex division is executed using the complex conjugate zˉ=x−iy\bar{z} = x - iy :

z1z2=z1⋅zˉ2z2⋅zˉ2=z1⋅zˉ2∣z2∣2\frac{z_1}{z_2} = \frac{z_1 \cdot \bar{z}_2}{z_2 \cdot \bar{z}_2} = \frac{z_1 \cdot \bar{z}_2}{|z_2|^2}

Module 3: Vectors and Linear Algebra

The set of nn -dimensional vectors is denoted Rn\mathbb{R}^n , with elements a=(a1,a2,…,an)\mathbf{a} = (a_1, a_2, \dots, a_n). The scalar (dot) product of vectors u\mathbf{u} and v\mathbf{v} is:

u⋅v=∑i=1nuivi\mathbf{u} \cdot \mathbf{v} = \sum_{i=1}^n u_i v_i

The Euclidean norm measures vector length and is given by:

∣∣v∣∣2=∑i=1nvi2=v⋅v||\mathbf{v}||_2 = \sqrt{\sum_{i=1}^n v_i^2} = \sqrt{\mathbf{v} \cdot \mathbf{v}}

The triangle inequality applies to Euclidean norms:

∣∣u+v∣∣2≤∣∣u∣∣2+∣∣v∣∣2||\mathbf{u} + \mathbf{v}||_2 \leq ||\mathbf{u}||_2 + ||\mathbf{v}||_2

A matrix A∈Rn×mA \in \mathbb{R}^{n \times m} is a rectangular arrangement of scalars. The matrix product C=ABC = AB for A∈Rn×kA \in \mathbb{R}^{n \times k} and B∈Rk×mB \in \mathbb{R}^{k \times m} is computed via row-column scalar products:

cij=∑l=1kailbljc_{ij} = \sum_{l=1}^k a_{il}b_{lj}

The inverse of a square matrix A−1A^{-1} satisfies AA−1=InAA^{-1} = I_n. It can be found using the adjunct matrix and the determinant:

A−1=1det⁡AA^A^{-1} = \frac{1}{\det A} \hat{A}

Alternatively, Gauss-Jordan elimination transforms an augmented matrix [A∣I][A | I] into [I∣A−1][I | A^{-1}] via elementary row operations.

Module 4: Systems of Linear Equations

A linear system Ax=bAx = b of nn equations with nn unknowns can be solved via Cramer's rule when det⁡A≠0\det A \neq 0:

xi=DiDx_i = \frac{D_i}{D}

However, Cramer's rule is computationally inefficient (O(n!)O(n!)). Gaussian Elimination is preferred, transforming Ax=bAx = b to an upper triangular system Ux=b^Ux = \hat{b} using multipliers:

mik=aik(k)akk(k)m_{ik} = \frac{a_{ik}^{(k)}}{a_{kk}^{(k)}}

This elimination process implicitly factorizes AA into a lower triangular matrix LL and an upper triangular matrix UU:

A=LUA = LU

Solving Ax=bAx = b then reduces to sequential triangular substitutions: Ly=bLy = b (forward substitution) and Ux=yUx = y (backward substitution).

A matrix represents a linear mapping, and the Rank-Nullity theorem connects its kernel (null-space) to its rank:

rank(A)+nullity(A)=n\text{rank}(A) + \text{nullity}(A) = n

Module 5: Sequences and Series

A sequence (an)n∈I(a_n)_{n \in I} maps an index set to a set of values. A sequence is a Cauchy sequence if its terms become arbitrarily close:

∀ϵ>0∃n0∈N∀n,m≥n0:∣an−am∣<ϵ\forall \epsilon > 0 \exists n_0 \in \mathbb{N} \forall n,m \geq n_0 : |a_n - a_m| < \epsilon

In C\mathbb{C}, a sequence converges if and only if it is a Cauchy sequence.

An infinite series sums a sequence, ∑k=1∞ak=lim⁡n→∞sn\sum_{k=1}^\infty a_k = \lim_{n \to \infty} s_n, where sns_n is the partial sum. Absolute convergence occurs when ∑k=1∞∣ak∣<∞\sum_{k=1}^\infty |a_k| < \infty, which implies standard convergence.
Important series proofs and tests:

  • Geometric Series: ∑k=0∞qk=11−q\sum_{k=0}^\infty q^k = \frac{1}{1-q} for ∣q∣<1|q| < 1.
  • Harmonic Series: ∑k=1∞1k=∞\sum_{k=1}^\infty \frac{1}{k} = \infty (divergent).
  • Root Test: Convergent if lim sup⁡k→∞∣ak∣k<1\limsup_{k \to \infty} \sqrt[k]{|a_k|} < 1.
  • Ratio Test: Convergent if lim sup⁡k→∞∣ak+1ak∣<1\limsup_{k \to \infty} |\frac{a_{k+1}}{a_k}| < 1.

Module 6: Continuous Functions and Limits

A function f:D→Rf: D \to \mathbb{R} is continuous at x0∈Dx_0 \in D if it satisfies the ϵ\epsilon - δ\delta criterion:

∀ϵ>0∃δ>0∀x∈D:∣x−x0∣<δ  ⟹  ∣f(x)−f(x0)∣<ϵ\forall \epsilon > 0 \exists \delta > 0 \forall x \in D : |x - x_0| < \delta \implies |f(x) - f(x_0)| < \epsilon

The composition of two continuous functions g∘fg \circ f is continuous. The Heavyside function serves as a classic prototype of a discontinuous function.