Tree in LaTeX (T)
- 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.
\documentclass{article}
\begin{document}
Tree: $T$
\[ |E(T)| = |V(T)| - 1 \]
\end{document}Related symbols
- Forest
F - Connected
u \leftrightarrow v - Chromatic Number
\chi(G) - Incidence Matrix
B - Clique
\omega(G) - Adjacency Matrix
A_{ij}
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.
Pinakamahusay na AI LaTeX Editor, Alternatibo sa Overleaf
Tinutulungan ng Octree ang mga researcher mula sa 15+ na unibersidad na sumulat ng research papers nang mas mabilis gamit ang AI
- Gumawa ng magagandang TikZ diagrams gamit ang AI
- Mag-upload ng larawan at i-convert ito sa LaTeX nang walang problema
- Makakuha ng instant na tulong sa pagsulat at pag-format ng research papers