# Adjacency Matrix

*noun*

say it: **“uh-JAY-sun-see MAY-triks”** **/əˈdʒeɪsənsi ˈmeɪtrɪks/**

A way of storing a graph as a grid with a box for every pair of vertices, marked where two are joined.

## What is an **adjacency matrix**?

An **adjacency matrix** stores a graph as a grid with a row and a column for every vertex. The box where two rows and columns meet holds 1 (or the edge's weight) when they are joined, and 0 when not, like the mileage chart in a road atlas. It checks any pair in one look, but needs a box for every possible pair.

## In a sentence

- “For the 12-space board game, an **adjacency matrix** answers "are these two spaces joined?" in one look.”

Level: Journeyman · [More Data Structures terms at this level](https://www.ask-codey.com/glossary?category=data-structures&level=3)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/adjacency-matrix
