Geometry and Topology for Modern Applications
From the mathematics in the modern world curriculum
Geometry and Topology for Modern Applications
TL;DR
Geometry studies shapes, sizes, and relative positions of figures, while topology focuses on properties that remain unchanged under continuous deformation. These fields, though distinct, provide powerful tools for understanding and solving problems in modern data science, robotics, and complex network analysis. You'll see how thinking about "shape" in new ways can unlock insights in surprising places.
1. The Mental Model
Think of geometry as measuring and pinning down exact shapes, like the precise angles of a square. Topology, on the other hand, is about the squishiness of shapes; it cares about holes and connectedness, not exact measurements, like how a coffee mug can be continuously deformed into a donut without tearing.
2. The Core Material
Geometry and topology are both about understanding space and form, but they ask different questions.
Geometry: Precision and Measurement

Photo by https://kaboompics.com/ on Pexels
Geometry, in its basic form, is what you're likely familiar with: points, lines, planes, and shapes like triangles, circles, and cubes. It deals with concepts like distance, angles, area, and volume.
In modern applications, geometry extends to higher dimensions and more complex structures:
- Computational Geometry: This field deals with algorithms for geometric problems. Think about finding the shortest path between points on a map (graph theory combined with geometry), or efficiently storing and searching spatial data (like locations on a GPS).
- Computer Graphics: Creating realistic 3D models and rendering them involves heavy use of geometric transformations (rotations, scaling, translations).
- Robotics: For a robot to navigate a room, it needs to understand the geometry of its environment—distances to obstacles, angles for gripping objects, and paths to avoid collisions.
Topology: Connectedness and Deformation

Photo by Re pour on Pexels
Topology is often called "rubber sheet geometry" because it studies properties of objects that don't change even if you stretch, twist, or bend them, as long as you don't tear or glue parts together. The key properties it focuses on are:
- Connectedness: Is a shape all in one piece, or does it have separate parts?
- Compactness: Can you "cover" the shape with a finite number of small pieces?
- Holes (Genus): How many "holes" does an object have? A donut has one; a sphere has none. This is a fundamental topological invariant.
- Boundaries: Does a shape have edges or surfaces that define its extent?
graph TD
A["Math Fields"] --> B["Geometry"]
A --> C["Topology"]
B --> B1["Focuses on:"]
B1 --> B2["Distance"]
B1 --> B3["Angles"]
B1 --> B4["Area/Volume"]
B1 --> B5["Rigid Transformations (Rotation, Translation)"]
C --> C1["Focuses on:"]
C1 --> C2["Connectedness"]
C1 --> C3["Number of Holes (Genus)"]
C1 --> C4["Boundaries"]
C1 --> C5["Continuous Deformations (Stretching, Bending)"]
B & C --> D["Modern Applications"]
D --> D1["Data Analysis (Shape of Data)"]
D --> D2["Robotics (Path Planning, Object Recognition)"]
D2 --> D2A["Geometric Path Planning"]
D2 --> D2B["Topological Feature Extraction"]
D --> D3["Computer Graphics (Modeling)"]
D --> D4["Network Science (Graph Topology)"]
C3 --- C3A["Example: Donut (1 hole) vs. Sphere (0 holes)"]
Why is this useful?
Imagine you're analyzing a dataset. In high dimensions, it's impossible to visualize. Topology can help you understand the structure of that data. Does it cluster into distinct groups (connected components)? Does it form a loop (a hole)? This is called Topological Data Analysis (TDA).
For example, if you have sensor readings from a complex system, TDA can reveal underlying patterns or cycles that traditional statistical methods might miss, purely by looking at the "shape" of the data points when they're represented in a high-dimensional space.
Key Differences and Overlaps

Photo by Tara Winstead on Pexels
- Measurement vs. Invariance: Geometry is about exact measurements and how they change under rigid movements. Topology is about qualitative properties that remain invariant under flexible, continuous transformations.
- Local vs. Global: Geometry often focuses on local properties (what's happening at a specific point). Topology often deals with global properties (the overall structure of the object).
- Applications:
- Geometry: CAD/CAM, computer vision (object pose estimation), robotics (collision detection, inverse kinematics).
- Topology: Network analysis (robustness of connections), material science (structure of polymers), medical imaging (analyzing brain tissue connectivity), data science (identifying hidden structures in data).
3. Worked Example
Let's look at a simple example in data analysis: distinguishing between two types of data distribution using topological features.
Imagine you have a set of data points that form either a "cloud" or a "ring" in 2D space.
- Cloud Data: Many points clustered together, like a fuzzy ball.
- Ring Data: Many points forming a circular shape, like a hollow donut.
If you just calculate the average position or spread (mean, standard deviation), both might look similar, especially if the cloud is very spread out or the ring is thick.
Using Topology:
We can use a topological concept called Persistent Homology to find "holes" in the data. Persistent homology builds a series of increasingly connected "shapes" from your data points (like connecting nearby points with lines, then filling in triangles, etc.) and tracks how long features like holes "persist."
Code Example (Conceptual Python):
import numpy as np
import matplotlib.pyplot as plt
from ripser import ripser # A common library for Persistent Homology
from persim import plot_diagrams # For plotting persistence diagrams
# --- Generate example data ---
def generate_cloud_data(num_points=100):
return np.random.randn(num_points, 2) * 0.5
def generate_ring_data(num_points=100, inner_radius=1, outer_radius=1.2):
angles = np.random.rand(num_points) * 2 * np.pi
radii = np.random.rand(num_points) * (outer_radius - inner_radius) + inner_radius
x = radii * np.cos(angles)
y = radii * np.sin(angles)
return np.vstack([x, y]).T
# Data 1: Cloud
data_cloud = generate_cloud_data(200)
# Data 2: Ring
data_ring = generate_ring_data(200)
# --- Apply Persistent Homology ---
# For the cloud data:
diagrams_cloud = ripser(data_cloud)['dgms'] # dgms[0] is connected components, dgms[1] is 1D holes
print("
--- Cloud Data Persistent Homology ---")
# print(diagrams_cloud) # Often just short-lived 0-dimensional components
# For the ring data:
diagrams_ring = ripser(data_ring, maxdim=1)['dgms'] # maxdim=1 looks for 0D (components) and 1D (holes) features
print("
--- Ring Data Persistent Homology ---")
# print(diagrams_ring) # Expect to see a persistent 1-dimensional feature (a hole)
# --- Visualizing the persistence diagrams (conceptual) ---
plt.figure(figsize=(10, 5))
plt.subplot(121)
plt.scatter(data_cloud[:, 0], data_cloud[:, 1], s=5, alpha=0.7)
plt.title("Cloud Data")
# plot_diagrams(diagrams_cloud, show=False) # Plot the persistence diagram
# plt.title("Persistence Diagram for Cloud Data (expect no prominent 1D features)")
plt.subplot(122)
plt.scatter(data_ring[:, 0], data_ring[:, 1], s=5, alpha=0.7)
plt.title("Ring Data")
# plot_diagrams(diagrams_ring, show=False) # Plot the persistence diagram
# plt.title("Persistence Diagram for Ring Data (expect one prominent 1D feature)")
# To truly show the output, you'd inspect diagrams_ring[1]
# You'd find one point with a large "persistence" value, indicating a long-lived hole.
# Example check for a persistent hole in the ring data:
# A persistent 1-dimensional hole would appear as a point far from the diagonal y=x line
# in the persistence diagram for dgms[1].
# A simple way to detect it programmatically is to look for a large 'birth' to 'death' interval.
if len(diagrams_ring[1]) > 0:
# Look for the 1-dim feature with the largest persistence (death - birth)
persistence_values = diagrams_ring[1][:, 1] - diagrams_ring[1][:, 0]
max_persistence = np.max(persistence_values)
print(f"Max 1D persistence for Ring Data: {max_persistence:.2f}")
if max_persistence > 0.5: # Threshold chosen based on expected data scale
print("Detected a significant 1D hole, indicating a ring-like structure!")
else:
print("No significant 1D holes found in Ring Data.")
if len(diagrams_cloud[1]) > 0:
max_persistence_cloud = np.max(diagrams_cloud[1][:, 1] - diagrams_cloud[1][:, 0])
print(f"Max 1D persistence for Cloud Data: {max_persistence_cloud:.2f}")
if max_persistence_cloud < 0.1: # Small threshold for "no hole"
print("No significant 1D hole detected in Cloud Data.")
else:
print("No significant 1D holes found in Cloud Data.")
plt.tight_layout()
plt.show()
Explanation:
For the cloud data, the diagrams_cloud[1] (representing 1-dimensional holes) will likely be empty or contain points very close to the diagonal, meaning any "holes" are short-lived noise. For the ring data, diagrams_ring[1] will likely contain one point far from the diagonal, indicating a long-lasting, significant 1-dimensional hole – the center of the ring. This topological feature lets you algorithmically distinguish between a cloud and a ring.
4. Key Takeaways
- Geometry deals with exact measurements, shapes, and rigid transformations in space.
- Topology studies properties of shapes that remain invariant under continuous deformations (stretching
Frequently asked about Geometry and Topology for Modern Applications
More from mathematics in the modern world
Get the full mathematics in the modern world curriculum
Clone the complete plan to your dashboard for unlimited AI-generated notes, practice quizzes, and a personalised revision schedule.
Create Free Account