Graph in LaTeX (G = (V, E))
- LaTeX command
G = (V, E)- Package
- No package needed: built into LaTeX
- Mode
- Text and math mode
Try Graph in a real LaTeX document
Open a ready-to-compile document that already uses G = (V, E), with the right packages loaded. Edit it and see the PDF, no install needed.
Where it is used
Definition of a graph G as an ordered pair of a vertex set V and an edge set E.
This is the opening line of most graph-theory arguments; it fixes V as the vertex set and E \subseteq \binom{V}{2} as edges for a simple graph, or E \subseteq V \times V for a directed one. Common shorthand: n = |V| and m = |E|. Weighted graphs extend it to G = (V, E, w). Use parentheses, not angle brackets, for the ordered pair. In longer works, write V(G) and E(G) when several graphs are in play. Calligraphic \mathcal{G} is sometimes reserved for a family of graphs or a graphical model.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Graph: $G = (V, E)$
\[ G = (V, E), \quad |V| = n, \quad |E| = m \]
\end{document}Related symbols
All نظرية البيان →Frequently asked questions
- How do I write Graph in LaTeX?
- Type G = (V, E) in math mode, for example $G = (V, E), \quad |V| = n, \quad |E| = m$. It works in plain LaTeX without loading any package.
- Which package do I need for G = (V, E)?
- None. G = (V, E) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use G = (V, E) in text mode, or only in math mode?
- Both. G = (V, E) compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf
يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي
- أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
- ارفع صورة وحولها إلى LaTeX بسلاسة
- احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث