Tree in LaTeX (T)

TT
LaTeX command
T
Package
No package needed: built into LaTeX
Mode
Text and math mode

Where it is used

Capital T, the usual letter for a tree: a connected graph with no cycles.

A tree on n vertices has exactly n - 1 edges, a unique path between any two vertices, and at least two leaves when n \geq 2. Spanning trees are written T \subseteq G, and Cayley's formula says K_n has n^{n-2} labeled spanning trees. Minimum spanning tree algorithms like Kruskal's and Prim's minimize w(T) = \sum_{e \in T} w(e). Plain italic T suffices; watch for clashes with the transpose superscript or time, and prefer ^\top for transposes in documents that also discuss trees. Rooted trees are often written (T, r).

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

∣E(T)∣=∣V(T)∣−1|E(T)| = |V(T)| - 1
\documentclass{article}
\begin{document}
Tree: $T$

\[ |E(T)| = |V(T)| - 1 \]
\end{document}

Related symbols

All グラフ理論 →

Frequently asked questions

How do I write Tree in LaTeX?
Type T in math mode, for example $|E(T)| = |V(T)| - 1$. It works in plain LaTeX without loading any package.
Which package do I need for T?
None. T is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use T in text mode, or only in math mode?
Both. T compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Math poweredAIでLaTeXを書く

最高のAI LaTeXエディタ、Overleaf代替

Octreeは15以上の大学の研究者がAIを使って論文をより速く書くのを支援

  • AIで美しいTikZダイアグラムを生成
  • 画像をアップロードしてシームレスにLaTeXに変換
  • 論文の執筆とフォーマットに即座にサポートを取得