VertexDelete[g,v]
makes a graph by deleting the vertex ν and all edges connected to v from the graph g.
VertexDelete[g,{v1,v2,…}]
deletes a collection of vertices from g.
VertexDelete[g,patt]
deletes all vertices that match the pattern patt.
VertexDelete[{vw,…},…]
uses rules vw to specify the graph g.
VertexDelete
VertexDelete[g,v]
makes a graph by deleting the vertex ν and all edges connected to v from the graph g.
VertexDelete[g,{v1,v2,…}]
deletes a collection of vertices from g.
VertexDelete[g,patt]
deletes all vertices that match the pattern patt.
VertexDelete[{vw,…},…]
uses rules vw to specify the graph g.
Details and Options
- VertexDelete is also known as vertex removal.
- VertexDelete[g,v] will delete the vertex v only if it is present in g.
- VertexDelete works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Examples
open all close allBasic Examples (1)
Scope (8)
VertexDelete works with undirected graphs:
VertexDelete[[image], 2]VertexDelete[[image], 2]VertexDelete[[image], 2]VertexDelete[[image], 2]Delete a set of vertices from the graph:
VertexDelete[[image], {4, 5}]Use rules to specify the graph:
VertexDelete[{1 -> 3, 2 -> 1, 3 -> 6, 4 -> 6, 1 -> 5, 5 -> 4, 6 -> 1}, 2]Use a pattern to delete a subset of vertices:
VertexDelete[[image], _ ? (# > 3&)]VertexDelete works with large graphs:
g = GridGraph[{10, 10, 10, 10}];VertexDelete[g, 100];//TimingSee Also
Related Guides
Text
Wolfram Research (2010), VertexDelete, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexDelete.html (updated 2015).
CMS
Wolfram Language. 2010. "VertexDelete." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/VertexDelete.html.
APA
Wolfram Language. (2010). VertexDelete. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexDelete.html
BibTeX
@misc{reference.wolfram_2026_vertexdelete, author="Wolfram Research", title="{VertexDelete}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/VertexDelete.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_vertexdelete, organization={Wolfram Research}, title={VertexDelete}, year={2015}, url={https://reference.wolfram.com/language/ref/VertexDelete.html}, note=[Accessed: 12-June-2026]}