The organisation chart shows who reports to whom. The network shows how work really flows.
Every team has an official structure and an unofficial one. The official structure is in the org chart. The unofficial one, who asks whom for help, who passes on information, who is quietly holding everything together, is hidden in emails, chat messages, shared documents and meeting invites. Network analysis makes that hidden structure visible, and you do not need special software to start. A list of who-contacts-whom and a few Excel formulas are enough to find the hub of a team, the person who is out of the loop, and the one link that holds two groups together.
This lesson is for team leads, HR and people analysts, operations and logistics planners, consultants and students who meet graphs for the first time. The same methods work for very different networks: colleagues and messages, cities and roads, web pages and links, suppliers and customers, accounts and transfers. In every case the first step is the same: turn a list of connections into a matrix that Excel can calculate with. That step is what the free lab above teaches.
Our example is Brightwater Studio, a fictional seven-person design studio: Ana, Ben, Cleo, Dev, Eli, Fay and Gus. A chat export lists, for each sender and receiver, how many messages they exchanged per week. Every lab in the course analyses this network, so the numbers you produce here are the foundation for degree, centrality, shortest paths and PageRank later on.
Nodes, edges and the two ways to store a network
A network or graph has two ingredients. Nodes (also called vertices) are the things you study, here the seven people. Edges (also called ties or links) are the relationships between them, here “sends messages to”. When the direction matters, as it does for messages, the network is directed: Ana → Ben is not the same edge as Ben → Ana. When it does not (two people worked on the same project), the network is undirected. Edges can also carry a weight, such as the number of messages per week.
Data almost always arrive as an edge list: one row per connection, with a From column, a To column and maybe a weight. That format is compact and easy to export, but hard to calculate with. Which edges does Dev receive? Is the tie from Ben to Cleo answered? For those questions you want an adjacency matrix: one row and one column per node, a 1 in cell (i, j) if node i has an edge to node j, a 0 otherwise. Row sums count outgoing ties, column sums count incoming ties, and matrix operations such as transposing and multiplying answer questions about mutual ties, two-step paths and influence.
A drawing like Figure 1 is great for seven people and useless for seventy. The matrix scales: the same COUNTIFS formula fills a 7 × 7 matrix or a 70 × 70 one, and every measure in this course is a formula on that matrix.
Worked example: from 16 edge rows to a 7 × 7 matrix
The lab sheet holds the edge list in A1:C17: From in column A, To in column B, messages per week in column C. Rows 2 to 17 are the 16 directed edges, for example Ana → Ben (12 messages), Cleo → Dev (14) and Gus → Dev (2). The empty matrix is in A19:H26, with the names as column headers in B19:H19 and as row labels in A20:A26. The formula for the first cell, B20, is:
=COUNTIFS($A$2:$A$17,$A20,$B$2:$B$17,B$19)
It counts the edge-list rows where From equals the row person and To equals the column person. Because every pair appears at most once in the edge list, the result is 1 or 0. The mixed references make the formula copyable: $A20 keeps reading the row label in column A, B$19 keeps reading the column label in row 19, and the edge-list ranges are fully locked. Copy B20 to B20:H26 and the matrix fills itself. The row totals and column totals below are not on the lab sheet, but they are one SUM away and they are the subject of lesson 2.
| From \ To | Ana | Ben | Cleo | Dev | Eli | Fay | Gus | Out |
|---|---|---|---|---|---|---|---|---|
| Ana | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 2 |
| Ben | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 3 |
| Cleo | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 2 |
| Dev | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 3 |
| Eli | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 2 |
| Fay | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 2 |
| Gus | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 2 |
| In | 2 | 1 | 3 | 4 | 2 | 3 | 1 | 16 |
Check the cell the Coach looks at: E21 is Ben → Dev, and the edge list contains Ben → Dev with 4 messages, so E21 = 1. Now look at the transposed cell, Dev → Ben (C23): it is 0. Ben writes to Dev, but Dev never writes back. In a directed network the matrix is not symmetric, and swapping the two COUNTIFS criteria would give you the transposed matrix, which answers a different question (“who receives from whom”).
Counting ties and measuring reciprocity
Two numbers summarise the matrix. The number of ties (directed edges) is simply the number of 1s: =SUM(B20:H26) returns 16, matching the 16 rows of the edge list. That match is your reconciliation check. If a name were misspelled in the edge list (“Dev ” with a space, or “dev” typed differently in the header), COUNTIFS would miss that row and the sum would be 15.
A tie is reciprocated when the reverse tie exists too. The product of cell (i, j) and cell (j, i) is 1 only if both are 1. Transposing the matrix puts cell (j, i) exactly on top of cell (i, j), so multiplying the matrix by its transpose cell by cell and adding up counts the reciprocated ties:
=SUMPRODUCT(B20:H26,TRANSPOSE(B20:H26))
For Brightwater the result is 12. That is six mutual pairs (Ana–Ben, Ana–Cleo, Cleo–Dev, Dev–Eli, Eli–Fay, Fay–Gus), each counted from both sides. Reciprocity, the share of ties that are answered, is =B29/B28 = 12 ÷ 16 = 75%. The four one-way ties are Ben → Cleo, Ben → Dev, Dev → Fay and Gus → Dev.
| Measure | Cell | Excel formula | Result |
|---|---|---|---|
| Ties (directed edges) | B28 | =SUM(B20:H26) | 16 |
| Reciprocated ties | B29 | =SUMPRODUCT(B20:H26,TRANSPOSE(B20:H26)) | 12 |
| Reciprocity | B30 | =B29/B28 | 75% |
| Mutual pairs | – | =B29/2 | 6 |
| Possible directed ties | – | =7*(7-1) | 42 |
| Density (preview of lesson 3) | – | =B28/(7*6) | 38.1% |
What does 75% mean in practice? Most communication in the studio is two-way, which is healthy. The one-way ties deserve a second look: Ben messages both Cleo and Dev without replies in this week's export, and Gus writes to Dev without an answer. That could mean nothing (Dev replies in person) or it could point to a bottleneck. Network numbers are questions to ask, not verdicts.
Step by step in Excel
- Get a clean edge list. One row per directed connection: From, To and optionally a weight. If your export has one row per message, the same COUNTIFS formula will count messages instead of ties; wrap it in
MIN(1, …)or use--(COUNTIFS(…)>0)for a 0/1 matrix. - List the nodes. In Excel 365,
=SORT(UNIQUE(VSTACK(A2:A17,B2:B17)))returns every name that appears as sender or receiver. In older versions copy both columns below each other and use Data › Remove Duplicates. - Lay out the matrix. Put the names down column A (A20:A26) and across a header row (B19:H19) in the same order. Use
=TRANSPOSE(A20:A26)for the header so the two lists can never drift apart. - Write the first cell. In B20 type
=COUNTIFS($A$2:$A$17,$A20,$B$2:$B$17,B$19). Use F4 (Cmd+T on a Mac) to add the $ signs while the cursor is in a reference. - Fill the matrix. Copy B20, select B20:H26 and paste, or select B20:H26 with B20 active and press Ctrl+R then Ctrl+D.
- Format it. Select the matrix, choose Home › Conditional Formatting › Color Scales or Highlight Cells Rules › Equal To 1, so ties stand out like in Figure 2. Center the numbers with Home › Alignment › Center.
- Count and reconcile. In B28 type
=SUM(B20:H26)and compare it with=COUNTA(A2:A17). Both must be 16. - Reciprocity. In B29 type
=SUMPRODUCT(B20:H26,TRANSPOSE(B20:H26)), in B30=B29/B28, and format B30 as a percentage with Ctrl+Shift+%. - Weighted version (optional). Replace COUNTIFS by
=SUMIFS($C$2:$C$17,$A$2:$A$17,$A20,$B$2:$B$17,B$19)to get messages per week in each cell instead of 0/1.
=SUMPRODUCT(--(B20:H26<>TRANSPOSE(B20:H26))) counts the cells that differ from their mirror image. It returns 8 here (each of the four one-way ties shows up twice). For an undirected network it must be 0.
A first look at the hub
The row and column sums of the matrix are the first centrality measure of the course. Row sums are the out-degree (how many colleagues a person writes to), column sums the in-degree (how many colleagues write to them). Dev has the highest in-degree: four colleagues message him, and he connects the left and the right half of the studio. Ben writes to three people but only Ana writes back. Lesson 2 turns these counts into normalised degree centrality and finds the hub formally.
Common mistakes and how to spot them
- Rows and columns swapped. If you match the row label against the To column, you build the transpose. Spot it: the row sums no longer equal the number of messages each person sends. Convention: row = sender, column = receiver.
- Missing $ signs. The first cell is correct, the copied cells count shifted ranges. Spot it: SUM of the matrix is not equal to the number of edge rows.
- Different spellings of a name. “Cleo” in the edge list and “Cleo ” in the header never match, and the whole column stays 0. Spot it: a person with in-degree and out-degree 0 who clearly appears in the data. Fix with TRIM and by generating the header with TRANSPOSE.
- Halving the reciprocated ties. SUMPRODUCT of the matrix and its transpose counts each mutual pair twice. That is correct for reciprocity (reciprocated ties ÷ all ties). Divide by 2 only if you want the number of mutual pairs.
- Multiplying the matrix by itself instead of its transpose.
SUMPRODUCT(M,M)just counts every tie again (1 × 1 = 1). The transpose is what lines up cell (i, j) with (j, i). - Duplicate edge rows. If the export contains Ana → Ben twice, COUNTIFS returns 2 and SUM counts too many ties. Use
--(COUNTIFS(…)>0)for a binary matrix. - Treating a directed network as undirected. If direction matters (messages, payments, citations), keep the matrix asymmetric. Symmetrise only when the relationship really has no direction, with
=--((M+TRANSPOSE(M))>0).
Quick reference: functions and shortcuts
| Function / shortcut | What it does | Example |
|---|---|---|
COUNTIFS | 0/1 adjacency matrix from an edge list | =COUNTIFS($A$2:$A$17,$A20,$B$2:$B$17,B$19) |
SUMIFS | Weighted matrix (messages per week) | =SUMIFS($C$2:$C$17,$A$2:$A$17,$A20,$B$2:$B$17,B$19) |
SUM | Number of ties; row/column sums give degree | =SUM(B20:H26) |
TRANSPOSE | Flips rows and columns of the matrix | =TRANSPOSE(A20:A26) |
SUMPRODUCT | Cell-by-cell product and sum | =SUMPRODUCT(M,TRANSPOSE(M)) |
MMULT | Matrix multiplication (two-step paths, lesson 5) | =MMULT(B20:H26,B20:H26) |
UNIQUE / VSTACK | List of all nodes (Excel 365) | =SORT(UNIQUE(VSTACK(A2:A17,B2:B17))) |
| F4 / Cmd+T | Cycle absolute and mixed references | $A$2 → A$2 → $A2 |
| Ctrl+R / Ctrl+D | Fill right / fill down | Fill the 7 × 7 block |
| Ctrl+Shift+Enter | Confirm an array formula in Excel 2019 and older | SUMPRODUCT with TRANSPOSE |
| Ctrl+Shift+% | Percentage format | Reciprocity in B30 |
Real-world uses
- Team and organisation analysis: build the matrix from chat, email or meeting data to see who is central, who is isolated and whether two departments talk to each other at all. Use aggregated, consented data and look at patterns, not at individuals' private messages.
- Logistics and route planning: depots and customers as nodes, roads with travel times as weighted edges. Lesson 4 runs Dijkstra's shortest-path algorithm on exactly such a courier map.
- Websites and SEO: pages as nodes, internal links as directed edges. In-degree shows which pages receive many internal links, and PageRank (lesson 7) gives a first, simplified model of how link value flows through a site.
- Supply chains and finance: suppliers and customers, or accounts and transfers, as a directed weighted network. Degree and bridges reveal dependencies on a single supplier or unusual concentration of payments.
- Projects and knowledge: people linked by shared projects or documents. Common neighbours and two-step reach (lesson 5) suggest who could introduce whom.
What you will build in the rest of this course
Lesson 1 is free. The remaining 19 lessons are part of the paid course (one-time $9.90). Each one is a hands-on lab on the Brightwater Studio data with automatic checking and hints, and together they cover the core of social network analysis without any add-in.
Degree, In-Degree & Out-Degree: Who Is the Hub?. You count each person's outgoing and incoming ties, normalise them to degree centrality so networks of different sizes become comparable, and identify the studio's hub with a formula rather than a guess.
Weighted Degree (Strength) & Network Density. Not every tie is equal. You add the message counts as weights, compute each person's strength, measure how dense the network is and how heavy an average tie is.
Shortest Paths by Hand: a Dijkstra Step Table. On the studio's courier map you run Dijkstra's algorithm step by step in a table, recover the best route from the predecessors and measure the time it saves. You will finally see what route planners do internally.
Two-Step Reach & Common Neighbours with Matrix Multiplication. You square the collaboration matrix with MMULT, read common neighbours and two-step reach straight from the result and score how similar two people's circles are.
Closeness Centrality from a Distance Matrix. From a matrix of shortest-path lengths you calculate farness and closeness, find the person who can reach everyone fastest and compute the network's average path length.
PageRank by Iteration: Damping 0.85 in a Step Table. You turn the message network into a transition matrix and iterate PageRank with the classic damping factor of 0.85 until the ranks settle, the idea behind early web search ranking, built cell by cell.
Bridges, Communities & the Degree Distribution. You count how many shortest paths run over each tie, find the bridge that holds the studio's two groups together and chart the company-wide degree distribution.
Summary
Network analysis starts with a change of format: from an edge list that is easy to export to an adjacency matrix that is easy to calculate with. One COUNTIFS formula with mixed references ($A20 and B$19) builds the whole matrix, SUM counts the ties and reconciles them with the edge list, and SUMPRODUCT with TRANSPOSE counts the reciprocated ties. For Brightwater Studio that gives 16 ties, 12 of them reciprocated, a reciprocity of 75%, and a first hint that Dev is the person who holds the studio together.
Scroll up and build it yourself in the free lab: fill the 7 × 7 matrix, count the ties and measure the reciprocity. It takes about 15 minutes, and the Coach checks every formula.
Frequently asked questions
How do I create an adjacency matrix in Excel?
Put the node names down a column and across a header row, then use =COUNTIFS(FromRange,$A20,ToRange,B$19) in the first cell and copy it across the whole block. Each cell becomes 1 if the edge exists and 0 if not.
What is the difference between an edge list and an adjacency matrix?
An edge list has one row per connection (From, To, weight) and is compact. An adjacency matrix has one row and one column per node with a 1 or a weight for every connection, which makes degree, reciprocity and matrix calculations easy.
How do I calculate reciprocity in a directed network?
Count the reciprocated ties with =SUMPRODUCT(M,TRANSPOSE(M)) and divide by the total number of ties =SUM(M). The result is the share of ties whose reverse tie also exists.
Can Excel do social network analysis?
Yes, for small and medium networks. With COUNTIFS, SUMIFS, SUMPRODUCT, TRANSPOSE and MMULT you can compute degree, density, shortest paths, closeness and PageRank. For very large networks or automatic layouts a dedicated tool is more practical.
What is the difference between a directed and an undirected network?
In a directed network each edge has a direction, like a message from Ana to Ben, so the matrix is usually not symmetric. In an undirected network an edge simply connects two nodes and the matrix is symmetric.
How do I make a weighted adjacency matrix in Excel?
Use SUMIFS instead of COUNTIFS: =SUMIFS(WeightRange,FromRange,$A20,ToRange,B$19). Each cell then contains the total weight, for example messages per week, instead of 0 or 1.
Keep going: Network & Graph Analysis in Excel: Degree, Paths & Centrality
This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time €9.90.
- Degree, In-Degree & Out-Degree: Who Is the Hub?
- Weighted Degree (Strength) & Network Density
- Shortest Paths by Hand: a Dijkstra Step Table
- Two-Step Reach & Common Neighbours with Matrix Multiplication
- Closeness Centrality from a Distance Matrix
- PageRank by Iteration: Damping 0.85 in a Step Table
- Bridges, Communities & the Degree Distribution
- Triangles & the Clustering Coefficient: How Tight Is Each Circle?
- Eigenvector Centrality: Well-Connected Contacts by Power Iteration
- Disconnected Networks: Components, Unreachable Pairs & Harmonic Centrality
- All-Pairs Shortest Paths: Floyd–Warshall Pivot by Pivot
- Minimum Spanning Tree: Cabling the Loft with Prim's Algorithm
- Maximum Flow & Minimum Cut: How Many Boxes per Hour Reach the Fair?
- Two-Mode Networks: People × Projects and Their Projections
- Homophily & the E-I Index: Do Teams Work Across Borders?
- Link Prediction: Resource Allocation vs Preferential Attachment
- Network Change Over Time: New, Dropped & Stable Ties (with a Chart)
- Resilience: Global Efficiency When a Key Person Is Away (with a Chart)
- Final Project: A Network Health Dashboard for a Second Studio