Skip to main content
It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.

Network Analysis: Data Structures

Data Structures

Adjacency Matrix

      The adjacency matrix is a concise method to represent all nodes and edges in a network. Every row and column in the adjacency matrix represents each node in a network with the corresponding edges connecting them (or lack thereof) by a numerical value. Unweighted networks use binary network data (shown above), where a ‘1’ indicates the presence of an edge between two nodes and a ‘0’ is the absence of an edge. Edges for weighted networks are represented by the corresponding value for the strength of teh edge in each cell.

Undirected network adjacency matrixes are symmetrical and only half of the matrix is shown (as in the example above). Since nodes may send and receive edges from other nodes in directed networks, adjacency matrixes are often asymmetrical and show all directed connections. In every matrix, a diagonal of zeros or missing data from the top left corner to the bottom right corner is where every node intersects with itself. The diagonal ensures not to inflate or deflate the number of connections in the network. Think, “I cannot go to myself for advice or support”.

        The undirected and unweighted network above has five nodes and seven edges present. We can see the diagonal of zeros from ‘Node A’ to ‘Node E’ and only half the connections are present because this is a symmetrical network. The visual shows a connection between ‘Node E’ and ‘Node B’, which is represented by a ‘1’ in the adjacency matrix where the two nodes intersect. 

Edge List

       The edge list is an efficient method to represent all connections present between nodes in a network. There are two columns for each row, one labeled ‘Source’ and the other ‘Target’. For every edge present in the network, one node is marked in the ‘Source’ column and the other marked in the ‘Target’ column. Undirected networks edge lists have the number of rows corresponding to the number of edges present. While directed networks, the number of rows corresponds to the number of sent and received edges in the network. Unweighted networks only have a ‘Source’ to ‘Target’ column, as all edges are valued equally. Weighted networks edge lists add a third column called ‘Weight’ or ‘Strength’, where the strength of edges are indicated.

        The undirected and unweighted network above has five nodes and seven edges present. Representing every edge in the network by each row of the edge list. The visual of the network shows a connection between ‘Node A’ and ‘Node D’, which is represented on the second row of the edge list. While the network above is unweighted, a ‘Weight’ column is added to show readers how the data is organized. Since all edges are weighted equally every row is represented by a ‘1’.