In the social sciences, networks are used to represent relationships between social actors, be they individuals or aggregates. The structural importance of these actors is assessed in terms of centrality indices which are commonly defined as graph invariants. Many such indices have been proposed, but there is no unifying theory of centrality. Previous attempts at axiomatic characterization have been focused on particular indices, and the conceptual frameworks that have been proposed alternatively do not lend themselves to mathematical treatment. We show that standard centrality indices, although seemingly distinct, can in fact be expressed in a common framework based on path algebras. Since, as a consequence, all of these indices preserve the neighbourhood-inclusion pre-order, the latter provides a conceptually clear criterion for the definition of centrality indices.