Network
Representations
Learn to model real-world networks as graphs, translate between visual diagrams and adjacency matrices, and interpret connectivity at a glance.
What is a Graph?
In finite mathematics, a graph is a structure made of two sets: a set of vertices (also called nodes) and a set of edges (connections between vertices). We write \( G = (V, E) \).
Real-World Networks as Graphs
Graphs model countless real situations. Vertices represent entities and edges represent relationships between them.
Key Vocabulary
The Adjacency Matrix
For a graph with \( n \) vertices, the adjacency matrix is an \( n \times n \) matrix \( A \) defined by:
The Handshake Theorem
Every edge contributes exactly 1 to each endpoint's degree, so the total degree across all vertices is always twice the number of edges.
Directed vs Undirected Graphs
| Undirected | Directed | |
|---|---|---|
| Edge notation | \( \{u,v\} \) | \( (u,v) \) |
| Matrix symmetry | \( A = A^T \) | \( A \neq A^T \) generally |
| Example | Friendships | Web links, one-way streets |
How to Build an Adjacency Matrix
Example 1: Triangle Graph
Example 2: Four-City Road Network
Example 3: Matrix to Graph
Given the adjacency matrix, reconstruct the graph:
Powers of \( A \): Counting Walks
For example, \( (A^2)_{ij} \) counts the number of two-step walks from \( i \) to \( j \). This is computed by:
Degree and Connectivity
A graph is connected if there exists a path between every pair of vertices. Degree alone does not guarantee connectivity, but it provides important clues.
Common Mistakes
Summary Table
| Concept | Graph View | Matrix View |
|---|---|---|
| Vertex | Dot / node | Row and column |
| Edge \( \{i,j\} \) | Line between \( i \) and \( j \) | \( a_{ij} = a_{ji} = 1 \) |
| Degree of \( v \) | Count edges at \( v \) | Sum of row \( v \) |
| Adjacency | Directly connected | \( a_{ij} = 1 \) |
| Walk of length \( k \) | \( k \)-step path | \( (A^k)_{ij} \) |
| Connected | One piece | No block diagonal form |
Question 1 of 5
A graph has 4 vertices and every vertex has degree 3. How many edges does the graph have?
Question 2 of 5
In an undirected graph's adjacency matrix, which property must always hold?
Question 3 of 5
Given the adjacency matrix below, what is \( \deg(v_2) \)?
Question 4 of 5
If \( (A^2)_{13} = 2 \), what does this tell us about the graph?
Question 5 of 5
A graph has 5 vertices and 4 edges. The degrees of four vertices are 2, 2, 1, 1. What is the degree of the fifth vertex?