Graph
Adjacency Matrix

🧩Adjacency Matrix

NEW

Square matrix encoding graph edges where entries indicate whether or how nodes are connected.

DESCRIPTION

An adjacency matrix represents a finite graph as an n×n matrix, with entries denoting edges between vertices. For unweighted graphs, entries are typically 0/1; for weighted graphs, they store edge weights. Directed graphs use asymmetric matrices, while undirected graphs yield symmetric matrices. The representation is useful for linear algebraic operations, spectral methods, and graph algorithms. It is memory-intensive for sparse graphs, where adjacency lists are preferred.

ALTERNATIVE DEFINITIONS

Wikipedia

In graph theory, an adjacency matrix is a square matrix used to represent a finite graph.

Defines the core representation for finite graphs succinctly.

Source

Wolfram MathWorld

The adjacency matrix of a graph is an n×n matrix A=(a_ij) such that a_ij indicates whether there is an edge from vertex i to vertex j.

Formalizes entries and their relation to edges.

Source

Brilliant

An adjacency matrix represents which vertices of a graph are adjacent to which other vertices.

Emphasizes adjacency relationships among vertices.

Source

Graph Graph Laplacian Weighted Graph Directed Graph Sparse Matrix Network Analysis Graph Neural Network Connectivity

COMPETING TERMS

Adjacency List Incidence Matrix

RELATIONS

KNOWLEDGE AREAS

Mathematics Data Science Semantic & Knowledge Modeling Data Modeling

TARGET AUDIENCE

Data Scientist AI Engineer Data Modeler Software Developer

EXTERNAL SOURCES

TOP QUESTIONS

When should I use an Adjacency Matrix?

Use it when graphs are dense or when linear algebra operations and spectral methods are required for analysis.

Category: Requirements

How does an Adjacency Matrix compare to an Adjacency List?

Matrices use more memory for sparse graphs but allow constant-time edge checks; lists are memory-efficient and faster for neighbor iteration.

Category: Example

What risks exist when using Adjacency Matrices?

Memory blow-up with large sparse graphs can impair performance and feasibility; prefer lists or sparse matrices in such cases.

Category: Risks

How do weights appear in an Adjacency Matrix?

Entries store edge weights instead of binary values, enabling weighted algorithms and analyses.

Category: Definition

Is the Adjacency Matrix symmetric?

For undirected graphs, yes; for directed graphs, it is generally asymmetric, reflecting edge directionality.

Category: Misunderstanding

How is an Adjacency Matrix used in GNNs?

It helps define neighborhood structure and message-passing operations, often via normalized Laplacians or sparse representations.

Category: Topic

Which algorithms benefit from Adjacency Matrices?

Spectral clustering, PageRank variants, and matrix-based computations benefit from adjacency matrices or related Laplacians.

Category: Example

How do I store large Adjacency Matrices efficiently?

Use sparse matrix formats (CSR/CSC) to compress storage and accelerate operations on sparse graphs.

Category: Management

Where can I learn more about Adjacency Matrices?

MathWorld and Brilliant offer mathematical and educational explanations; NetworkX provides practical conversion APIs.

Category: Requirements