Skip to content
Visual AnalyticsNodes, edges and the shape of a network

Formulas for this chapter

Density (undirected)

Density = e / (n(n-1)/2)

Whenever a question asks how connected an undirected network is overall. Count the edges first, and check with sum of degrees = 2e.

e
Number of edges actually present
n
Number of nodes, including singletons
n(n-1)/2
Maximum possible edges if every node joined every other

Density (directed)

Density = e / (n(n-1))

For a directed network, where each pair can be joined in both directions, so the maximum is twice the undirected one. Say which formula you are using; the two answers differ by exactly a factor of 2.

e
Number of directed edges (arrows)
n
Number of nodes
n(n-1)
Maximum possible directed edges

Degree sum check

SUM of degrees = 2e (undirected) · SUM in-degrees = SUM out-degrees = e (directed)

After counting edges or degrees, before any centrality arithmetic. It catches a missed or double-counted edge in one line.

degree
Number of edges at a node
e
Number of edges in the network
Step 1 of 27
The ideaTheory

Six friends and a piece of paper

Write six names on a page. Draw a line between any two who talk to each other.

You have just built a network. The names are nodes, the lines are edges, and the picture already tells you things a list of names never could: who is in the middle, who is on the edge, who is joined to nobody.

The rest of this chapter is that picture, made precise enough to compute with.