In graph theory, a branch of mathematics, the rank of an undirected graph has two unrelated definitions. Let equal the number of vertices of the graph.
Analogously, the nullity of the graph is the nullity of its adjacency matrix, which equals .
Analogously, the nullity of the graph is the nullity of its oriented incidence matrix, given by the formula, where n and c are as above and m is the number of edges in the graph. The nullity is equal to the first Betti number of the graph. The sum of the rank and the nullity is the number of edges.
A sample graph and matrix:
(corresponding to the four edges, e1–e4):
| = | \begin{pmatrix} 0&1&1&1\\ 1&0&0&0\\ 1&0&0&1\\ 1&0&1&0\\ \end{pmatrix}. |
In this example, the matrix theory rank of the matrix is 4, because its column vectors are linearly independent.