a graph is an abstract data structure. it holds nodes that are usually related to each other. a node is a dataset, typically in the form of ordered pairs. nodes are either connected or not connected to another node. the relation between nodes is usually defined as an edge. graphs are useful for their ability to associate nodes with other nodes.