Exercises — Incidence matrix
Level 1 — Recognition
(Can you read a single cell and a single row/column correctly?)
L1.1 In an undirected incidence matrix , what does the entry literally tell you about vertex and edge ?
Recall Solution
It says ==vertex is an endpoint of edge == — the dot is one of the two ends of the line . If , the line does not touch the dot at all.
L1.2 A graph has vertices and edges. What is the shape (rows × columns) of its incidence matrix?
Recall Solution
Rows = vertices, columns = edges, so the matrix is . Not — that would be the Adjacency matrix. Edges are the things being described, so they get one column each.
L1.3 Here is one column of an undirected incidence matrix (the whole column for edge ): Which two vertices does edge join?
Recall Solution
The 's sit in rows and , so . A column is an edge written vertically: the two 's are literally its two endpoints.
Level 2 — Application
(Build small matrices; use the row-sum = degree and column rules.)
L2.1 Build the undirected incidence matrix for a path with edges .
Recall Solution
Scan each edge, mark its two endpoints:
| 1 | 0 | 0 | |
| 1 | 1 | 0 | |
| 0 | 1 | 1 | |
| 0 | 0 | 1 |
Check: row sums are → degrees . The two endpoints of a path have degree , the two middle vertices degree . ✔ See the picture: 
L2.2 Using the matrix from L2.1, compute the sum of all entries. What graph fact does it equal?
Recall Solution
Sum . There are edges, two 's per column, so the total is . This is the Handshake Lemma: . Counting the marks by columns () and by rows () must agree.
L2.3 Build the directed incidence matrix for the arrows .
Recall Solution
Tail , head :
Check every column sums to : for each. ✔ Vertex has two tails leaving it (two 's); vertex has two heads entering it (two 's).
Level 3 — Analysis
(Reverse-engineer, spot contradictions, handle degenerate cases.)
L3.1 An undirected incidence matrix has a column with three 's. What is wrong?
Recall Solution
An edge is a line, and a line has exactly two endpoints. Three 's would mean one edge touches three vertices, which is impossible for an ordinary graph. Either the matrix is wrong, or you have drawn a hyperedge (a different object, not a simple graph). Valid columns have exactly two 's — or a single "" for a self-loop.
L3.2 You are handed this undirected matrix. Draw the graph and give all degrees.
Recall Solution
Read each column as an edge (rows of its two 's):
- : rows
- : rows
- : rows
- : rows
So vertices form a triangle, and vertex hangs off vertex .
Row sums (degrees): .
Sanity: . ✔ Picture: 
L3.3 A single edge is a self-loop at vertex (edge ). Write the undirected column, and explain the entry.
Recall Solution
The column is a single in row (all other rows ). A loop meets vertex with both of its ends, so it contributes to the degree — the "" keeps the row sum = degree rule intact. This is the one exception to "exactly two 's per column"; the two marks fuse into one entry of .
Level 4 — Synthesis
(Combine incidence with degree, Handshake, and the Laplacian.)
L4.1 A connected undirected graph has vertices and every vertex has degree . How many edges does it have, and how many 's appear in its incidence matrix?
Recall Solution
By Handshake, . Here , so edges. Number of 's (two per column). Note equals both counts — that equality is the Handshake Lemma.
L4.2 For the directed graph of L2.3, compute and confirm each row of sums to .
Recall Solution
With the entry counts edges at (its degree), and for is : Every row sums to . Why ? Because (columns of sum to ), so . This is the defining property of the Graph Laplacian.
L4.3 True or false: In an undirected incidence matrix, the number of 's in row equals the number of columns whose top-most is in row . Explain.
Recall Solution
False. The number of 's in row is — it counts every edge touching , whether is the "top" endpoint or the "lower" one. The "top-most " idea would only count edges where is the smaller-indexed endpoint, undercounting. Degree does not care about ordering of endpoints.
Level 5 — Mastery
(Full round-trip: graph → matrix → recovered structure, all cases.)
L5.1 A graph on vertices has: one edge , one edge , and a self-loop at . Build the full undirected incidence matrix, list all degrees, and verify Handshake carefully (loops count once as an edge but toward degree).
Recall Solution
Columns: .
| 1 | 0 | 0 | |
| 1 | 1 | 0 | |
| 0 | 1 | 2 |
Row sums (degrees): . So .
Edges: . Handshake with loops: each loop adds to and counts as one edge, so still holds: . ✔ Picture: 
L5.2 You receive only this directed incidence matrix. Reconstruct every arrow, then compute the out-degree (number of tails, i.e. 's) of each vertex.
Recall Solution
Column : the row with is the tail (start), the row with is the head (end).
- : in row , in row
- : in row , in row
- : in row , in row
Out-degrees (count 's per row): vertex has two 's ; vertex has one ; vertex has none . Cross-check: total out-degree edges — every edge has exactly one tail. ✔
L5.3 For any oriented graph, prove in one line why (the all-ones row vector times gives all zeros), and state the one edge type that would break it.
Recall Solution
for each non-loop column, because every directed edge has exactly one tail and one head. So . Breaker: a directed self-loop — its tail and head are the same vertex, so people often write (they cancel in the same row) rather than two separate signs, and the column has no pair to speak of. Oriented Laplacians therefore usually assume no self-loops.
Connections
- Degree of a vertex — every L2/L5 degree is a row sum of .
- Handshake Lemma — the engine behind L2.2, L4.1, L5.1.
- Graph Laplacian — assembled in L4.2 as .
- Adjacency matrix — the contrast raised in L1.2.
- Sparse graph representations — how these matrices are stored when are large.