To show a backslash (\) in your LaTeX document:
Within Text:
Use the command \textbackslash
when writing regular text.
In Math Mode:
Use \backslash
inside math environments.
The backslash also serves as an escape character in LaTeX. This means that if you want to use LaTeX special characters without triggering their functions, you can precede them with a backslash. For instance, to display a dollar sign ($) without it being interpreted as a math delimiter, you'd write: \$