Why \\ is wrong here? [duplicate]

The following codes return errors

\documentclass{article}
\begin{document}
cd\\
[asd]
\end{document}


But this one will work

\documentclass{article}
\begin{document}
cd

[asd]
\end{document}


marked as duplicate by Heiko Oberdiek, Werner, percusse, Adam Liter, cmhughesApr 30 '14 at 15:41

• This is caused by [ I think. \\  can take an optional argument, which is a length. LaTeX picks up [asd] as an optional argument to \\ , but asd is not a valid length, so you get an error. There have been similar questions before I think. – Torbjørn T. Apr 30 '14 at 14:33
• Instead use cd\\\relax [asd]. The \relax will prevent the following bracket from being taken as an argument. – Steven B. Segletes Apr 30 '14 at 14:37