In mathematics, connectivity is the property of being connected in the sense of a mathematical relation. A set of elements in a topological space is said to be connected if there exists a continuous path between any two elements in . In an abstract algebraic context, one might say that two elements and are connected if there exists a sequence such that . The notion of connectivity plays an important role in many areas of mathematics, including graph theory, where it gives rise to the idea of connectivity (or degree) of a vertex in a graph.
The concept can be generalized to other settings where continuity makes sense, such as with respect to some kind of metric on a topological space. In this setting, one might say that two points and are -connected if there exists a continuous path between them which is -dense; that is, every -ball around contains points from . Connectivity also arises in percolation theory and phase transitions.