# Vietoris–Rips Complex

Interactive Topology in JavaScript

Algebraic Topology
Vietoris–Rips
Interactive Tutorial
Author

Sushovan Majhi

Published

June 30, 2024

The Vietoris-Rips Complex is a special type of simplicial complex built on a metric space. This topological concept has been around for a long time, although its invigoration in the twenty-first century was by the TDA community. The popularity of the complex is due to its increasing use in shape reconstruction; see [1,3] for example. The easy (but not always efficient) algorithmic approaches to compute the Vietoris-Rips complex of a finite metric space makes it more palatable choice over its close relative: the Čech complexes.

### Definition

Given a metric space (M,d_M) and a scale \epsilon>0, the Vietoris-Rips complex R_{\epsilon}(M) is a simplicial complex such that \sigma=\{x_1,x_2,\ldots,x_n\}\in R_\epsilon(M) if and only if \{x_1,x_2,\ldots,x_n\}\subseteq M with diam(\sigma)\leq\epsilon.

### Demo

We run a little JavaScript demo of Vietoris-Rips complex for a finite subset V under the Euclidean distance. Although the computed Rips complex is an abstract simplicial complex (without an embedding), we only show its shadow; see [2] for a definition.

As we can see, the set V is currently empty, and the scale \epsilon is set to zero. We pick a set of points in the plain by clicking on the canvas below. A word of caution: picking more than 30 points can substantially slow down your browser!

We now use the slider to set the scale \epsilon:

As we add more points or fiddle with the scale, the Betti numbers of the computed Vietoris-Rips complex can also be computed.