Graph Representation with an Adjacency Matrix | Graph Theory, Adjaceny Matrices

How do we represent graphs using adjacency matrices? That is the subject of today’s graph theory lesson! We will take a graph and use an adjacency matrix to represent it! It is a most soulless, but at times useful, graph representation. An adjacency matrix has a row and a column for each vertex in the graph it represents. If the vertex represented by row i is adjacent to the vertex represented by column j, then the entry in the i-th row and j-th column is a 1, otherwise it is a 0. Thus, we can find the degree of a vertex by adding up all the entries in the row or column that represents it! If an adjacency matrix represents a simple graph, then it will have 0s along its diagonal since a vertex cannot be adjacent to itself (this is assuming you construct the matrix so that the vertices are represented by rows in the same order that they are in the columns). Also, if a graph is undirected, then the adjacency matrix that represents it will be symmetric (meaning it is symmetric acros
Back to Top