Adjacency Matrix's relationship with Graph Data Structure

Sorry for the simple question. Is the Graph Data Structure in computer science an adjacency matrix? It seems like with all of the nodes and edges, they appear to be the same thing.

Hi @Chase_Switzer, great question!
An adjacency matrix is one way to represent the state of a graph (as we do during the lecture) but it’s not the only way.
A graph is a collection of nodes connected by edges and you can chose to store this data in a variety of ways - e.g. using matrices, lists, dictionaries, etc.
A matrix is just a grid of numbers. While we can represent some graphs using this structure, we can also use matrices for many other things as well - such as solving systems of equations, calculating the rotation of objects, etc.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms