Textbook-Solutions

2026-01-06

Mathematics for Machine Learning

credit for these solutions goes to: https://github.com/ilmoi/MML-Book

Read more >

Introductory Real Analysis

Set Theory

Sets and Functions

Problem
Prove that if \(A\cup B = A\) and \(A \cap B = A\), then \(A = B\).
Solution
To show \(A=B\), show \(A\subseteq B\) and \(B\subseteq A\). Suppose \(x\in B\), then we know by definition that \(x\in (A\cup B)\) if \(x\in B\) or \(x\in A\). Which then implies that \(x\in A\) from rule 1. Thus \(B\subseteq A\). Now suppose \(x\in A\) which implies \(x\in (A\cap B)\) (rule 2). The definition of this means that \(x\in A\) and \(x\in B\). \(\therefore x\in A \implies x\in B\), i.e. \(A\subseteq B\), so \(A=B\).
Problem
Show that in general \((A-B)\cup B \neq A\).
Solution
This only holds for \(B\subseteq A\). We proceed by counterexample. Let \(A={1,2}, B={3,4}\). Then \((A-B) = {1,2}\) and \((A-B)\cup B = {1,2,3,4} \neq {1,2}\).
Problem
Let \(A = {2,4,…,2n,…}\) and \(B = {3,6,…,3n,…}\). Find \(A\cap B\) and \(A-B\)
Solution
\[ A\cap B = {6n \mid n\in \mathbb{N}} \] \[ A - B = {2n \mid n\in \mathbb{N}, 2n \not\in {6m \mid m\in \mathbb{N}}} \]
Problem
Prove that:
()
\((A-B)\cap C = (A\cap C) - (B\cap C)\)
Solution:

Let \(x\in (A-B)\cap C\). Then:

Read more >