Turn vertices into complement edges, matrices, and insights. Check density shifts and degree changes instantly. Understand missing links through clean calculations and downloadable reports.
Use a simple undirected graph. Enter vertices once, then add one edge per line with formats like A-B
For a simple undirected graph G = (V, E), the complement graph Gc keeps the same vertex set and adds every missing edge between distinct vertices.
| Measure | Formula | Meaning |
|---|---|---|
| Complement edge set | Ec = { {u, v} : u ≠ v and {u, v} ∉ E } | Every absent edge becomes present in the complement. |
| Possible edges | n(n - 1) / 2 | Total undirected edges without loops in a graph with n vertices. |
| Complement edge count | |Ec| = n(n - 1)/2 - |E| | Subtract the original edge count from the maximum possible count. |
| Graph density | ρ(G) = 2|E| / (n(n - 1)) | Measures how full the original graph is. |
| Complement density | ρ(Gc) = 1 - ρ(G) | Shows how full the complement graph is. |
| Complement degree | degGc(v) = n - 1 - degG(v) | Each vertex connects to every vertex it originally missed. |
| Matrix relation | A(Gc) = J - I - A(G) | The complement flips off-diagonal adjacency values. |
| Vertex Set | Original Edges | Possible Edges | Complement Edges | Original Density | Complement Density |
|---|---|---|---|---|---|
| {A, B, C, D} | {A-B, A-C, C-D} | 6 | {A-D, B-C, B-D} | 0.5000 | 0.5000 |
| {P, Q, R, S, T} | {P-Q, Q-R, R-S} | 10 | {P-R, P-S, P-T, Q-S, Q-T, R-T, S-T} | 0.3000 | 0.7000 |
A graph complement keeps the same vertices but reverses missing and existing edges. Every absent connection becomes an edge, except self-loops remain excluded.
No. This page is designed for simple undirected graphs only. It rejects self-loops and treats repeated edges as duplicates.
The complement depends on the full vertex set. Vertices with no original edges still matter because they can gain complement edges.
First compute the maximum possible undirected edges, n(n-1)/2. Then subtract the original edge count to get the complement edge total.
Its complement is an empty graph. Every possible edge already exists, so no missing edge remains to place in the complement.
Its complement is a complete graph. Since no original edges exist, every allowed pair of distinct vertices appears in the complement.
Large adjacency matrices become wide and hard to inspect. The calculator skips them above twenty vertices to keep output readable.
Yes. Use the CSV button for spreadsheet-style data and the PDF button for a report snapshot of the generated result section.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.