Mental Model
An adjacency matrix is a table that shows which nodes in a graph connect to which others using rows and columns.
Analogy: Imagine a city map grid where each row and column is a city, and a mark in the grid shows if there is a direct road between those two cities.
0 1 2 0 0 1 0 1 1 0 1 2 0 1 0 Rows and columns represent nodes; 1 means connected, 0 means no connection.
