Complete Graph in LaTeX (K_n)
- LaTeX command
K_n- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Complete graph on n vertices, in which every pair of distinct vertices is joined by an edge.
K_n has \binom{n}{2} = n(n-1)/2 edges and chromatic number n. The letter honors Kuratowski, whose theorem says a graph is planar if and only if it contains no subdivision of K_5 or K_{3,3}. Ramsey numbers are phrased with complete graphs, R(3,3) = 6 meaning any 2-coloring of the edges of K_6 contains a monochromatic triangle. Cayley's formula counts n^{n-2} spanning trees of K_n. Use braces for multi-character subscripts like K_{n+1}. A clique of size k in G is a subgraph isomorphic to K_k.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Complete Graph: $K_n$
\[ |E(K_n)| = \binom{n}{2} = \frac{n(n-1)}{2} \]
\end{document}Related symbols
All 그래프 이론 →Frequently asked questions
- How do I write Complete Graph in LaTeX?
- Type K_n in math mode, for example $|E(K_n)| = \binom{n}{2} = \frac{n(n-1)}{2}$. It works in plain LaTeX without loading any package.
- Which package do I need for K_n?
- None. K_n is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use K_n in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $K_n$ in running text.
Math poweredAI로 LaTeX 작성
최고의 AI LaTeX 편집기, Overleaf 대안
Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움
- AI로 아름다운 TikZ 다이어그램 생성
- 이미지를 업로드하고 LaTeX로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기