The Node-Arc Incidence Matrix

Introduces the node-arc incidence matrix of a directed graph: how to construct it from a graph, how to read arcs off its columns, and how it encodes flow conservation in the compact matrix form Ax=bA\mathbf{x} = \mathbf{b}.

Step 1 of 157%

Tutorial

Definition of the Node-Arc Incidence Matrix

Let G=(N,A)G = (N, \mathcal{A}) be a directed graph with m=Nm = |N| nodes and n=An = |\mathcal{A}| arcs. The node-arc incidence matrix of GG is the m×nm \times n matrix AA whose rows are indexed by the nodes and whose columns are indexed by the arcs.

For each arc (i,j)A(i, j) \in \mathcal{A} (directed from ii to jj), the corresponding column of AA is defined by

Ak,(i,j)={+1if k=i,1if k=j,0otherwise.A_{k,\,(i,j)} = \begin{cases} +1 & \text{if } k = i, \\ -1 & \text{if } k = j, \\ \phantom{-}0 & \text{otherwise.}\end{cases}

In other words, each column has a +1+1 in the row of its tail node, a 1-1 in the row of its head node, and zeros everywhere else.

For example, consider the directed graph on three nodes with arcs (1,2)(1,2) and (2,3)(2,3). We build the matrix column by column:

  • Arc (1,2)(1,2): place +1+1 in row 11 and 1-1 in row 22.
  • Arc (2,3)(2,3): place +1+1 in row 22 and 1-1 in row 33.

This gives

A=[101101].A = \begin{bmatrix} \phantom{-}1 & \phantom{-}0 \\ -1 & \phantom{-}1 \\ \phantom{-}0 & -1 \end{bmatrix}.
navigate · Enter open · Esc close · ⌘K/Ctrl K toggle