Skip to content
AI360Xpert
Beta

Point-Set Topology

Open sets define closeness without distances, giving continuity, compactness, and convergence a home that covers every space ML uses.

Open balls nest inside open sets, continuous maps pull open sets back to open sets, and compact sets cover with finitely many
Open balls nest inside open sets, continuous maps pull open sets back to open sets, and compact sets cover with finitely many

Why Does This Exist?

Calculus defines continuity with distances (ϵ\epsilon-δ\delta), but ML spaces outgrow that: function spaces, distributions with weak convergence, and infinite-dimensional feature maps have closeness without a single natural metric. Point-set topology rebuilds the basics from open sets alone, recovering continuity, compactness, and convergence at the right generality. The payoffs are concrete: extreme-value guarantees (a continuous loss attains its minimum on a compact set), uniform convergence on compacts, and a shared vocabulary for the homology and manifold pages that follow.

The one idea you need first

An open set contains none of its boundary: around every point sits a small ball still inside. Open intervals (a,b)(a, b) are open; closed [a,b][a, b] includes its endpoints. Topology declares which sets count as open, then defines everything else from that list.

Think of It Like This

City limits without a ruler

A city defines neighborhoods by walking time, not meters: two houses are "close" when a short stroll connects them, even across a river with a bridge but not across a highway without one. No ruler appears, yet "downtown," "edge," and "approaching the boundary" all make sense.

Open sets are those walking-time neighborhoods. Continuity means connected strolls map to connected strolls. Compactness means the whole city is explorable with finitely many neighborhood maps. Distances would be more precise and less general: the walking definition works for old towns, grids, and hillsides alike.

How It Actually Works

A topology on XX is a collection τ\tau of subsets containing ∅\emptyset, XX, closed under arbitrary unions and finite intersections. Members are the open sets. A map ff is continuous when preimages of open sets are open: f−1(U)∈τXf^{-1}(U) \in \tau_X for all U∈τYU \in \tau_Y. Compactness: every open cover has a finite subcover. In Rn\mathbb{R}^n, Heine-Borel says compact equals closed plus bounded: [0,1][0,1] is compact, (0,1)(0,1) and R\mathbb{R} are not.

Worked example

Claim: f(x)=x2f(x) = x^2 attains a minimum on [0,2][0, 2] but need not on (0,2)(0, 2). Check: [0,2][0,2] is closed and bounded, hence compact; ff continuous, so the extreme-value theorem applies: minimum 00 at x=0x = 0. On (0,2)(0,2), the infimum is still 00 but no point attains it (x=0x = 0 is missing): take xn=1/nx_n = 1/n, values 1/n2→01/n^2 \to 0 with no minimizer inside. One endpoint's membership decides existence. This is why constrained optimization states compact feasible sets explicitly.

A second check: preimage test on f(x)=x2f(x) = x^2 with U=(1,4)U = (1, 4) open. Preimage (−2,−1)∪(1,2)(-2,-1) \cup (1,2) is a union of two opens, hence open: continuity confirmed without any ϵ\epsilon.

Code

def attains_minimum(xs: list[float]) -> tuple[float, float]:    vals = [(x * x, x) for x in xs]  # f(x) = x^2 on the sampled set    return min(vals)  # (value, position)

closed = [i / 100 for i in range(0, 201)]  # [0, 2]: 0 includedopenish = [i / 100 for i in range(1, 201)]  # (0, 2]: 0 missingprint(attains_minimum(closed))  # -> (0.0, 0.0)print(attains_minimum(openish))  # -> (0.0001, 0.01)

The closed set attains 00; the punctured one bottoms at 0.00010.0001 with the infimum 00 unreachable.

Watch Out For

Assuming closed plus bounded travels beyond finite dimensions

Heine-Borel fails in infinite dimensions: the closed unit ball in function space is not compact, so existence proofs that cite it collapse. Symptoms: minimizing sequences with no convergent subsequence in kernel methods. Switch to weak compactness or add regularization that restores it.

Confusing continuity with uniform continuity on non-compacts

On (0,1)(0,1), f(x)=1/xf(x) = 1/x is continuous but arbitrarily steep near 00: no single δ\delta works everywhere. Optimization steps tuned at x=0.5x = 0.5 explode near the boundary. Compactness upgrades continuity to uniform continuity; without it, localize the analysis.

The Quick Version

  • Topology builds closeness from open sets, covering spaces metrics cannot reach.
  • Continuous means preimages of opens are open; test with (1,4)(1,4) pulling back to (−2,−1)∪(1,2)(-2,-1) \cup (1,2).
  • Compact in Rn\mathbb{R}^n means closed plus bounded; only compacts guarantee attained minima.
  • x2x^2 attains 00 on [0,2][0,2] but merely approaches it on (0,2)(0,2).
  • Infinite dimensions break Heine-Borel; weak topologies repair it.
  • State compactness explicitly in every existence claim.