Connected in LaTeX (u \leftrightarrow v)

u↔vu \leftrightarrow v
LaTeX command
u \leftrightarrow v
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

Connectivity relation: there is a path between vertices u and v, so they lie in the same component.

\leftrightarrow is a relation-class arrow, so it gets symmetric spacing. In graph theory, u \leftrightarrow v often means u and v are connected, while in Markov chains it means two states communicate. Directed graphs need care: mutual reachability is the strongly connected relation, sometimes written u \rightleftarrows v. Do not confuse \leftrightarrow with the longer \longleftrightarrow or the double-arrow \Leftrightarrow, which means logical equivalence. Some authors write u \sim v for adjacency and reserve \leftrightarrow for connectivity, which is clean if stated. It is an equivalence relation whose classes are components.

Minimal compilable example

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

u↔v  ⟺  ∃ a u-v path in Gu \leftrightarrow v \iff \exists \text{ a } u\text{-}v \text{ path in } G
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Connected: $u \leftrightarrow v$

\[ u \leftrightarrow v \iff \exists \text{ a } u\text{-}v \text{ path in } G \]
\end{document}

Related symbols

All 그래프 이론 →

Frequently asked questions

How do I write Connected in LaTeX?
Type u \leftrightarrow v in math mode, for example $u \leftrightarrow v \iff \exists \text{ a } u\text{-}v \text{ path in } G$. It works in plain LaTeX without loading any package.
Which package do I need for u \leftrightarrow v?
None. u \leftrightarrow v is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use u \leftrightarrow v in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $u \leftrightarrow v$ in running text.
Math poweredAI로 LaTeX 작성

최고의 AI LaTeX 편집기, Overleaf 대안

Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움

  • AI로 아름다운 TikZ 다이어그램 생성
  • 이미지를 업로드하고 LaTeX로 원활하게 변환
  • 논문 작성 및 서식에 대한 즉각적인 지원 받기