8.1 The directed graph of a nonnegative matrix
If you look carefully at Figure 8.1, you can probably figure out how to construct a weighted graph from a matrix. Just compare each row and the outgoing edge weights for nodes.
Each row is a node, and each element represents a directed and weighted edge. Edges of zero elements are omitted. The element in the i-th row and j-th column corresponds to an edge going from i to j. The resulting graph is called the directed graph (or digraph) of the matrix.
To unwrap the definition a bit, let’s check out the previous graph of the matrix
Here’s the first row, corresponding to the edges coming out from the first node.
Similarly, the first column corresponds to the edges coming into the first node.
Now, we can put all of this together. Figure 8.4...