The independence symbol in LaTeX

If two random variables X and Y are independent of each other, it is common to write it as

\begin{aligned} X \perp \!\!\! \perp Y. \end{aligned}

It appears that there isn’t a built-in LaTeX command for \perp \!\!\! \perp. The reference below presents several possible ways to reproduce this symbol. My personal favorite is the following:

\newcommand{\indep}{\perp \!\!\! \perp}

You can then use the new command wherever you want the independence symbol, e.g. X \indep Y.


  1. StackExchange. double perpendicular symbol (for independence).

1 thought on “The independence symbol in LaTeX

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s