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

Try Connected in a real LaTeX document

Open a ready-to-compile document that already uses u \leftrightarrow v, with the right packages loaded. Edit it and see the PDF, no install needed.

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 poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث