This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


makes a graph by adding the vertex v to the graph g.
adds a collection of vertices to g.
  • VertexAdd will add the vertex v only if it does not already exist in g.
Add a vertex to a complete graph:
Add a vertex to a complete graph:
Click for copyable input
VertexAdd works with undirected graphs:
Directed graphs:
Add a set of vertices to the graph:
Works with large graphs:
VertexAdd does not change the EdgeList:
The number of vertices can be found using VertexCount:
New in 8