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 4 of 27
The real wordsTheory

Graph, node, edge

GraphA mathematical model of a network structure, built on rules like any mathematical model.
Node (vertex)A network's basic unit: a person, a computer, a gene. Drawn as a circle. Carries self-properties (weight, size, position) and network-based properties (degree, cluster).
Edge (link)A connection between two nodes. Drawn as a line. May carry weight (strength), direction (for asymmetric relations), time, and a type such as family, colleague or supplier.