# Connected category

In category theory, a branch of mathematics, a connected category is a category in which, for every two objects X and Y there is a finite sequence of objects

${\displaystyle X=X_{0},X_{1},\ldots ,X_{n-1},X_{n}=Y}$

with morphisms

${\displaystyle f_{i}:X_{i}\to X_{i+1}}$

or

${\displaystyle f_{i}:X_{i+1}\to X_{i}}$

for each 0 ≤ i < n (both directions are allowed in the same sequence). Equivalently, a category J is connected if each functor from J to a discrete category is constant. In some cases it is convenient to not consider the empty category to be connected.

A stronger notion of connectivity would be to require at least one morphism f between any pair of objects X and Y. Any category with this property is connected in the above sense.

A small category is connected if and only if its underlying graph is weakly connected.

Each category J can be written as a disjoint union (or coproduct) of a collection of connected categories, which are called the connected components of J. Each connected component is a full subcategory of J.