Home/Chart Types/Network/Adjacency matrix
NetworkIntermediate

Adjacency Matrix

A grid-based network visualization where rows and columns represent nodes and filled cells show connections — turning tangled networks into readable, sortable tables.

// 01 — The chart

What it looks like

Example — Communication frequency between departmentsQ1 2025
EngSalesMktgOpsHREngSalesMktgOpsHRHighLow

An adjacency matrix showing communication frequency between five departments. Darker cells indicate stronger connections.

// 02 — Definition

What is an adjacency matrix?

An adjacency matrix is a square grid used to visualize connections in a network. Both the rows and columns list the same set of nodes (people, departments, cities, proteins), and each cell at the intersection of a row and column indicates whether — and how strongly — those two nodes are connected.

In a simple binary version, a filled cell means “connected” and an empty cell means “not connected.” In a weighted version, the cell color or intensity encodes the strength of the connection, turning the grid into a heatmap of relationships.

Unlike node-link diagrams that draw circles and lines, adjacency matrices avoid the “hairball problem” entirely. Dense networks with hundreds of connections remain perfectly readable because every possible edge has its own cell — no lines cross, no nodes overlap. The tradeoff is that paths through the network are harder to trace.

Origin: The adjacency matrix comes from graph theory in mathematics. Its use in visualization gained traction through Jacques Bertin’s Semiology of Graphics (1967) and was popularized for network analysis in the 2000s by researchers like Jean-Daniel Fekete and Nathalie Henry.

// 03 — Anatomy

Parts of an adjacency matrix

ABCABCABCDE
A — Row labels (source nodes): Each row represents a node in the network listed along the left edge
B — Column labels (target nodes): The same node set repeated along the top edge of the grid
C — Cell fill (edge weight): Color intensity at each intersection encodes connection strength or presence
D — Diagonal: The main diagonal (top-left to bottom-right) represents self-connections, often left empty
E — Color legend: A scale mapping cell color intensity to connection strength values

// 04 — Usage

When to use it — and when not to

✓Use an adjacency matrix when…
  • Your network is dense with many connections — node-link diagrams would become a hairball
  • You need to spot clusters or communities by reordering rows and columns
  • Comparing two networks side by side using the same node order
  • The network has 20–200 nodes — large enough that node-link fails, small enough to label
  • You want to precisely identify which specific pairs are connected or not
  • Edge crossings in a node-link diagram make the data unreadable
×Avoid an adjacency matrix when…
  • You need to trace paths or shortest routes between nodes — lines are more intuitive
  • Your audience is unfamiliar with matrix representations of networks
  • The network is very sparse — most cells will be empty, wasting space
  • You have fewer than 10 nodes — a node-link diagram is simpler and more expressive
  • You need to show geographic or spatial layout of the network
  • The network is hierarchical — use a tree diagram or dendrogram instead

// 05 — Reading guide

How to read an adjacency matrix

Follow these steps whenever you encounter an adjacency matrix in the wild.

1

Read the row and column labels

Understand what the nodes represent. Are they people, servers, cities, genes? Both axes list the same set of entities, so a 50×50 grid means 50 nodes.

2

Understand the cell encoding

Is the matrix binary (filled vs empty) or weighted (color intensity)? Check the legend or caption. A darker cell typically means a stronger or more frequent connection.

3

Check for symmetry

In undirected networks, the matrix is symmetric across the diagonal — the upper-right triangle mirrors the lower-left. In directed networks, row→column and column→row may differ.

4

Scan for clusters along the diagonal

If rows and columns are well-ordered, densely connected groups appear as dark blocks along the diagonal. These are communities or clusters in the network.

5

Look for isolated rows or columns

A row or column that is mostly empty indicates a node with few connections — a peripheral or disconnected entity in the network.

// 06 — Common mistakes

Mistakes to watch out for

Random row/column ordering

The ordering of nodes dramatically affects readability. Alphabetical order rarely reveals structure. Use a clustering algorithm (seriation) to place related nodes adjacent to each other so communities appear as dark blocks along the diagonal.

No color legend

Without a legend, readers cannot interpret what darker or lighter cells mean. Always include a gradient scale showing the mapping from color intensity to connection strength.

Too many nodes without aggregation

Matrices with more than 200–300 nodes become single-pixel cells that are impossible to read. Aggregate nodes into groups or use interactive zooming for very large networks.

Ignoring directionality

In directed networks, the matrix is asymmetric — the cell at (A,B) differs from (B,A). Confusing which axis is source vs target leads to misinterpretation. Label axes clearly as 'from' and 'to'.

Poor color scale choice

Using a rainbow color scale or a diverging palette for a single-direction metric causes visual confusion. Use a sequential single-hue scale (light-to-dark) for weights that go from zero upward.

// 07 — Real-world examples

Where you’ll see adjacency matrices used

01

Neuroscience: Brain connectivity mapping

Researchers use adjacency matrices (called connectomes) to show which brain regions are functionally connected. The matrix format handles hundreds of regions without the visual chaos of a node-link diagram, and seriation reveals functional modules.

Neuroscience
02

Software engineering: Module dependency analysis

Large codebases use adjacency matrices to visualize which software modules depend on which others. Clusters along the diagonal reveal tightly coupled subsystems, while off-diagonal entries expose unexpected cross-cutting dependencies.

Software Engineering
03

Social network analysis: Communication patterns

Organizational researchers map email or messaging frequency between teams using adjacency matrices. The grid instantly reveals siloed departments (dense diagonal blocks) and cross-team collaboration gaps (empty off-diagonal cells).

Social Science

// 08 — At a glance

Quick reference

Also known asConnection matrix, binary matrix, network matrix
OriginGraph theory (mathematics), popularized for visualization by Bertin (1967)
Best forDense networks where node-link diagrams become unreadable
Data typesNetwork/graph data with nodes and edges
Recommended nodes20 – 200 nodes for a static display
SymmetrySymmetric for undirected, asymmetric for directed
Common toolsD3.js, NetworkX + Matplotlib, Gephi, R (ggplot2 + reshape2)
Common mistakesRandom ordering, no legend, too many nodes, poor color scale

// 09 — Variations

Types of adjacency matrices

The basic adjacency matrix has several important variants suited to different network types.

Binary adjacency matrix

Cells are simply filled or empty, showing only whether a connection exists without encoding strength.

Weighted adjacency matrix

Cell color intensity encodes edge weight, turning the grid into a heatmap of connection strengths.

Reordered (seriated) matrix

Rows and columns are sorted by a clustering algorithm to reveal community structure as dense diagonal blocks.

Asymmetric (directed) matrix

For directed networks, cells above and below the diagonal differ, showing one-way relationships.

// 10 — FAQs

Frequently asked questions

What is an adjacency matrix?+

An adjacency matrix is a square grid used to visualize connections in a network. Both the rows and columns list the same set of nodes (people, departments, cities, proteins), and each cell at the intersection of a row and column indicates whether — and how strongly — those two nodes are connected.

When should you use an adjacency matrix?+

Use an adjacency matrix when your network is dense with many connections — node-link diagrams would become a hairball. It also works well when you need to spot clusters or communities by reordering rows and columns, and when comparing two networks side by side using the same node order.

When should you avoid an adjacency matrix?+

Avoid an adjacency matrix when you need to trace paths or shortest routes between nodes — lines are more intuitive. It is also a poor fit when your audience is unfamiliar with matrix representations of networks, or when the network is very sparse — most cells will be empty, wasting space.

Is an adjacency matrix suitable for dashboards?+

Yes — an adjacency matrix can work well in dashboards as long as the panel is large enough for readers to perceive the encoded values, has a clear title, and includes the legend or axis labels needed to interpret it.

What category of chart is an adjacency matrix?+

Adjacency Matrix belongs to the Network family of charts. Charts in that family are designed to answer the same kind of question, so they often work as alternatives when one doesn't quite fit your data.

How do you read an adjacency matrix?+

Start with the axis labels and legend, then look at the overall shape before zooming into individual marks. Compare prominent features against the rest of the data, and verify any conclusion against the underlying numbers when precision matters.