I'm trying to write a set subtraction operation in an AMS formatted template. In the end, what I want should look like A\B. But I'm doing this in math-mode `$A\B$`

and this gives me errors. I've also tried using the `\diagdown`

symbol, but it doesn't work either. Is there another way to do this?

# [Tex/LaTex] How to insert a backslash inside a mathematical statement

amssymbmath-modesymbols

## Best Answer

`\setminus`

should be what you are after.Note that you can find more information here on How to look up a symbol?. In particular, you have the Comprehensive LaTeX symbols and the website Detexify. There is also this post which was mentioned earlier in a comment