Graph Theory and Adjacency Matrix Calculator
Build an adjacency matrix from an edge list and calculate vertex count, edge count, and degrees for an undirected or directed graph.
Calculate
Enter one edge per line: source target. Example: A B
What this calculator teaches
Graphs model relationships: vertices are objects and edges are connections. An adjacency matrix records which vertices are connected.
This topic appears in discrete math, algorithms, networks, scheduling, maps, databases, and social-network analysis.
Formula & Symbols
| Concept | Formula | Meaning |
|---|---|---|
| Adjacency matrix | M[i][j]=1 if edge iโj exists | For undirected graphs, the matrix is symmetric. |
| Degree | number of incident edges | For directed graphs, separate indegree and outdegree. |
| Undirected edge count | ฮฃ degrees / 2 | Each edge touches two vertices. |
Step-by-Step Examples
- Edges are A-B, A-C, B-D, C-D.
- Vertices are A, B, C, D.
- A connects to B and C.
Where students use this
Common Mistakes to Avoid
In a directed graph, A B is different from B A.
An undirected edge appears twice in the matrix but counts as one edge.
An edge list cannot show isolated vertices unless you list them separately.
Frequently Asked Questions
Related Math Calculators
Formula Explorer connections
Interpretation: This relationship represents vectors, linear systems or transformations using matrix structure and vector operations. Assumption: Matrix dimensions must be compatible. Inversion, decomposition and unique solutions require rank, conditioning or nonzero-determinant conditions.