Independence symbol (double perp) in LaTeX (\perp\!\!\!\perp)
- LaTeX command
\perp\!\!\!\perp- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Two \perp signs overlapped with negative spaces, the usual hand-built symbol for statistical independence.
Probabilists write X \perp\!\!\!\perp Y for independent random variables and X \perp\!\!\!\perp Y \mid Z for conditional independence, notation popularized by graphical models and causal inference. Three \! negative thin spaces pull the second \perp almost onto the first, creating a double-stemmed upside-down T. Because it is assembled by hand, its exact look varies a little between fonts; define a macro such as \newcommand{\indep}{\mathrel{\perp\!\!\!\perp}} so it also gets relation spacing. A single \perp is used for independence in some texts, but it collides with orthogonality.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Independence symbol (double perp): $\perp\!\!\!\perp$
\[ X \perp\!\!\!\perp Y \mid Z \]
\end{document}Related symbols
- Conditional
\mid - Perpendicular
\perp - Given
P(A \mid B) - Normal Distribution
\mathcal{N}(\mu, \sigma^2) - Rho
\rho - Similar To
\sim
Frequently asked questions
- How do I write Independence symbol (double perp) in LaTeX?
- Type \perp\!\!\!\perp in math mode, for example $X \perp\!\!\!\perp Y \mid Z$. It works in plain LaTeX without loading any package.
- Which package do I need for \perp\!\!\!\perp?
- None. \perp\!\!\!\perp is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \perp\!\!\!\perp in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\perp\!\!\!\perp$ in running text.
최고의 AI LaTeX 편집기, Overleaf 대안
Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움
- AI로 아름다운 TikZ 다이어그램 생성
- 이미지를 업로드하고 LaTeX로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기