TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to do the not independent sign in latex without having to install or define new commands (since I am using latexIT and I cannot load new packages).

Currently I use the following sign for independent:


What can I use for X not independent of Y? I.e., something like this: enter image description here?

share|improve this question
Related: double perpendicular symbol (for independence) – Werner Apr 29 '14 at 3:10
@Werner thanks, it looks ok but I'd like the diagonal line to go over the independence sign, is that impossible with the base latex system? – Dnaiel Apr 29 '14 at 4:41

Without packages/commands, here's one option:

enter image description here

$X \not\!\perp\!\!\!\perp Y$
share|improve this answer

The symbol can be constructed using \perp and \not. The distance between the lines of the equals symbol is taken as distance between the vertical lines in the independent symbol.


  \mathbin{%                   % The final symbol is a binary math operator
    \mathpalette{\@indep}{\not}% \mathpalette helps for the adaptation
                               % of the symbol to the different math styles.
  % #1: math style
  % #2: empty or \not
  \sbox0{$#1\perp\m@th$}%        box 0 contains \perp symbol
  \sbox2{$#1=$}%                 box 2 for the height of =
  \sbox4{$#1\vcenter{}$}%        box 4 for the height of the math axis
  \rlap{\copy0}%                 first \perp
      % The equals symbol is centered around the math axis.
      % The following equations are used to calculate the
      % right shift of the second \perp:
      % [1] ht(equals) - ht(math_axis) = line_width + 0.5 gap
      % [2] right_shift(second_perp) = line_width + gap
      % The line width is approximated by the default line width of 0.4pt
      % {\not} in case of \nindep;
      % the braces convert the relational symbol \not to an ordinary
      % math object without additional horizontal spacing.
  \copy0 %                       second \perp

\[ A \indep B \nindep C = D \]
\[ \scriptstyle A \indep B \nindep C = D \]
\[ \scriptscriptstyle A \indep B \nindep C = D\]


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.