Search Knowledge

© 2026 LIBREUNI PROJECT

Geometry & Topology / Overview

Algebraic Topology

Algebraic Topology

Algebraic topology uses tools from abstract algebra to study topological spaces. The goal is to find algebraic invariants that classify topological spaces up to homeomorphism or homotopy equivalence.

Euler Characteristic and Simplicial Complexes

A simplicial complex is a space built from “building blocks” called simplices (points, line segments, triangles, tetrahedra). The Euler Characteristic χ\chi is a topological invariant defined for a finite simplicial complex as: χ=VE+F\chi = V - E + F where V,E,FV, E, F are the numbers of vertices, edges, and faces respectively. More generally: χ=n=0(1)ncn\chi = \sum_{n=0}^{\infty} (-1)^n c_n where cnc_n is the number of nn-simplices.

python
1def calculate_euler(v, e, f):
2 return v - e + f
3 
4# Tetrahedron: 4 vertices, 6 edges, 4 faces
5print(f"Tetrahedron chi: {calculate_euler(4, 6, 4)}")
6 
7# Cube: 8 vertices, 12 edges, 6 faces
8print(f"Cube chi: {calculate_euler(8, 12, 6)}")
9 
10# Torus (triangulated): chi should be 0
11v, e, f = 9, 27, 18
12print(f"Torus chi: {calculate_euler(v, e, f)}")

Homology Groups

Homology is a way of associating a sequence of abelian groups Hn(X)H_n(X) to a topological space. Informally, Hn(X)H_n(X) represents the ” nn-dimensional holes” in XX.

  • H0(X)H_0(X) counts path-connected components.
  • H1(X)H_1(X) counts “loops” or 1D holes.
  • H2(X)H_2(X) counts “voids” or 2D holes.

What is the first Betti number (rank of H1) of a circle S1?

The Fundamental Group

The fundamental group π1(X,x0)\pi_1(X, x_0) consists of equivalence classes of loops based at x0x_0 under homotopy. For a circle S1S^1, π1(S1)Z\pi_1(S^1) \cong \mathbb{Z}, representing the number of times a loop winds around the circle.

python
1def winding_number(points):
2 """Simple discrete winding number calculation around origin."""
3 import numpy as np
4 angles = np.arctan2([p[1] for p in points], [p[0] for p in points])
5 diffs = np.diff(angles)
6 # Adjust for wrap-around
7 diffs[diffs > np.pi] -= 2*np.pi
8 diffs[diffs < -np.pi] += 2*np.pi
9 return round(np.sum(diffs) / (2*np.pi))
10 
11# A circle loop
12theta = np.linspace(0, 2*np.pi, 100)
13circle_loop = [(np.cos(t), np.sin(t)) for t in theta]
14print(f"Winding number (1 loop): {winding_number(circle_loop)}")
15 
16# A double loop
17double_loop = [(np.cos(2*t), np.sin(2*t)) for t in theta]
18print(f"Winding number (2 loops): {winding_number(double_loop)}")

If two spaces have different Euler characteristics, can they be homeomorphic?