Degree in LaTeX (\deg(v))
- LaTeX command
\deg(v)- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Degree of vertex v: the number of edges incident to it, counting loops twice.
\deg is one of LaTeX's predefined operator names, so it prints upright with correct spacing, unlike typing deg, which gives three italic letters. The handshake lemma states \sum_v \deg(v) = 2|E|, and many authors abbreviate to d(v) or d_G(v). Minimum and maximum degree are written \delta(G) and \Delta(G). For a subscripted graph, \deg_G(v) works naturally. The same command also typesets the degree of a polynomial, \deg(p), in algebra. A regular graph has \deg(v) = k for every vertex.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Degree: $\deg(v)$
\[ \sum_{v \in V} \deg(v) = 2|E|, \quad \delta(G) \leq \deg(v) \leq \Delta(G) \]
\end{document}Related symbols
All グラフ理論 →Frequently asked questions
- How do I write Degree in LaTeX?
- Type \deg(v) in math mode, for example $\sum_{v \in V} \deg(v) = 2|E|, \quad \delta(G) \leq \deg(v) \leq \Delta(G)$. It works in plain LaTeX without loading any package.
- Which package do I need for \deg(v)?
- None. \deg(v) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \deg(v) in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\deg(v)$ in running text.