TL;DR
Degree centrality measures how well connected a vertex is, using nothing but its count of direct links. Divide that count by the largest count any vertex could have, and every score falls between 0 and 1, which makes networks of different sizes comparable. It is the simplest answer to the question "who is most connected?", and most other centrality measures start from it.
Builds on: vertex degree · Leads to: Edge Betweenness, PageRank, Graphormer
Where it's used
Social networks. In a company's message network, each person is a vertex and each pair who exchange messages is an edge. The people with the highest degree are the ones who talk to the most colleagues. Analysts use them as the first people to ask when they need information spread quickly through a team.
Disease spread and contact tracing. In a model of who meets whom, a person with many contacts has many chances to pass something on. Modelers use degree to find the people whose contacts matter most when they plan which contacts to trace first.
Air travel. Treat each airport as a vertex and each scheduled route as an edge. An airport's degree is the number of destinations it connects directly. Airports with very high degree are the hubs that most connecting passengers pass through.
Graph neural networks. The Graphormer model, described in its paper, adds a learned embedding indexed by each node's degree to that node's input, so the network can tell hubs from peripheral vertices.
How it works
Take five people, , , , and , with five friendships: , , , and .
- Count each person's degree. is joined to , , and , so . is joined to and , so . is joined to and , so . and each have only , so each has degree 1. Check: , which is edges, as the handshake lemma requires.
- Find the largest possible degree. In a simple graph with vertices, a vertex can be joined to at most the other vertices. Here , so the maximum is .
- Divide each degree by the maximum. scores . and each score . and each score .
- Read the scores. is connected to everyone, so it is as central as a vertex can be in this network. and are in the middle, and and sit on the edge of the network.
- Check the scores against the matrix. The adjacency matrix has a 1 in row , column when and are joined. Summing each row gives the degree of that vertex, so row has four 1s and sums to 4.
| Row sum (degree) | ||||||
|---|---|---|---|---|---|---|
| 0 | 1 | 1 | 1 | 1 | 4 | |
| 1 | 0 | 1 | 0 | 0 | 2 | |
| 1 | 1 | 0 | 0 | 0 | 2 | |
| 1 | 0 | 0 | 0 | 0 | 1 | |
| 1 | 0 | 0 | 0 | 0 | 1 |
flowchart LR A((A)) --- B((B)) A --- C((C)) A --- D((D)) A --- E((E)) B --- C
The math
Let be a simple graph with vertices. The degree centrality of a vertex is
Here is the vertex degree, the number of edges that touch . The unnormalized version is itself.
Step 2 in symbols: the largest possible degree
A vertex has at most one edge to each other vertex in a simple graph, so . The bound is reached exactly when is adjacent to every other vertex. That is why is the right denominator: it is the value a score of 1 corresponds to.
Step 3 in symbols: the normalization
Dividing the inequality by gives for every vertex in every network of that size. This is what makes scores comparable across networks. In the walkthrough, has , and has .
Step 5 in symbols: degrees from the matrix
Write for the adjacency matrix, with if vertices and are joined and otherwise. The degree of vertex is the sum of its row:
Written as a matrix product, if is the column vector of ones, the vector of all degrees is . In the example, the first row of sums to .
Directed graphs
If an edge has a direction, each vertex has two degrees. The in-degree counts edges arriving at , , and the out-degree counts edges leaving it, . Degree centrality is then defined with one of them, depending on whether the question is about receiving or sending.
Worked examples
Three vertices , , , all joined to each other.
- Each vertex has degree 2, because each is joined to the other two.
- The maximum is .
- Each centrality is .
Interpretation: every vertex is as connected as it can be, so no vertex stands out. Degree centrality cannot tell them apart.
Four vertices in a line, , with three edges.
- Degrees: , , , . Check: the sum is .
- The maximum is .
- Centralities: scores , scores , scores , and scores .
Interpretation: the two middle vertices are the most connected, and the two ends the least. Neither middle vertex is adjacent to everyone, so neither reaches 1.
Six airports: a hub , and five others , , , , . Routes: , , , , , and .
- Degrees: , , , , , . Check: .
- The maximum is .
- Centralities: scores . , , and each score . scores .
- Interpretation: the hub is the only airport that touches everyone, and it stands out from the rest.
Try it: the airline adds one route from to . What are the new centralities of and ? Answer: now has degree 2, so it scores . now has degree 3, so it scores . The total degree is now , which confirms that one new route adds two to the sum.
Common mistakes and tradeoffs
It is tempting to think that the vertex with the highest degree is always the most important. In fact degree counts only direct links. A vertex with three links to minor, poorly connected vertices can have a lower influence than one with two links to the hubs of the network. When influence depends on who you are connected to, PageRank and the eigenvector-based measures, which build on eigenvalues, give a better answer.
It is tempting to think that a normalized score of 0.1 means the same thing in every network. In fact dividing by makes the score comparable across sizes, but it can hide scale. In a network of a million people, a score of 0.1 means about 100,000 direct contacts, which is a very different situation from a score of 0.1 among 20 people. Report the raw degree alongside the normalized score when size matters.
It is tempting to think a directed graph needs no special treatment. In fact a follower count is an in-degree and an account's activity is an out-degree, and they measure different things. An account with many followers is well received, but one that follows many accounts is well informed. Choose the direction that matches the question.
When to use it: degree centrality is cheap, since one pass over the edges is enough, and easy to explain. It is a good first look at a network.
When not to use it: if paths matter, as in the flow of information or the bottlenecks in a transport network, use Edge Betweenness, which counts how many shortest paths pass through each edge. If influence should spread through neighbors, use PageRank.
| Measure | What it counts | Good for | Misses |
|---|---|---|---|
| Degree | Direct links | Hubs, quick screening | Who your neighbors are |
| Edge betweenness | Shortest paths through an edge | Bridges between groups | Cost on very large networks |
| PageRank | Visits by a random walk over links | Influence through important neighbors | Simplicity of explanation |
History
Jacob Moreno introduced sociograms in the 1930s, drawing people as points and their relationships as lines, and used them to study how groups formed and split. Counting the links at each person was the most direct way to read such a diagram.
In 1978, Linton Freeman wrote a paper that clarified what it means for a vertex to be central, and he defined degree, closeness and betweenness as three different answers to that question. Degree centrality is the first of those three, and it was the easiest to compute and check by hand. Later work on large networks, such as the web, made the limits of degree clear and led to measures like PageRank.
Recap
- Degree centrality is the number of direct links at a vertex, divided by , the largest possible number.
- Dividing by keeps every score between 0 and 1, so networks of different sizes can be compared.
- The degrees are the row sums of the adjacency matrix, and in a directed graph there is an in-degree and an out-degree.
- Degree sees only direct links, so it can miss influence that comes through important neighbors.
- Read next: Edge Betweenness for centrality based on shortest paths, and PageRank for centrality based on who links to you.
Check yourself
QuestionIn a simple graph with 7 vertices, what is the largest possible degree centrality of any vertex, and what does a score of 1 mean?Show answer
The largest possible degree is , so the largest centrality is . A score of 1 means the vertex is joined to every other vertex in the graph.
QuestionA graph has four vertices and edges , , and . What are the degree centralities of , , and ?Show answer
The degrees are , , and . Check: . Dividing by gives , , and .
QuestionWhy is the denominator rather than the number of edges in the graph?Show answer
The number is the largest degree any vertex can have in a simple graph, so dividing by it always gives a score between 0 and 1. Dividing by the number of edges would not give that bound, and the scores would depend on how many edges the whole network happens to have, which says nothing about one vertex's position.
QuestionIn a company's directed message network, you want the people who reach the most colleagues directly. Should you use in-degree or out-degree, and why?Show answer
Use out-degree, which counts the messages a person sends. Those are the colleagues they reach directly. In-degree counts messages received, which measures how often others write to a person, a different question. If the goal were to find the people who receive the most attention, in-degree would be the right choice.