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

Consider the following example:

line 1 \\
line 2 \\

Is the \\ in the last line completely optional or are there circumstances under which it has any effect?

share|improve this question
If you want to add a horizonal line at the bottom. You need the \\ there. If you don't want anything underneath then the \\ is superfluous and has no effect. – Roelof Spijker Jan 16 '12 at 12:10
up vote 27 down vote accepted

As @whlt3 said it is required if you intend to have a final horizontal line \hline or a partical line via \cline{...} or if you want to have some extra space blow that line produced via the optional argument of \\. If not then it is completely optional. I would however suggest to use \\ on all lines as that allows you to easily add or reorder rows in your table without the need to worry about the row markers.

However, as @egreg pointed out this is only true for tabular or array environments: within amsmath environments such as align the \\functions as a row separator so that a final \\will result in a spurious extra row.

share|improve this answer
While a final \\ is optional in array or tabular environments, it mustn't be used in environments such as align or gather, where it produces a spurious blank line. – egreg Jan 16 '12 at 13:15
@egrep you are right, thanks. updated the answer accordingly – Frank Mittelbach Jan 16 '12 at 13:31
Note that the @user notifications don't work inside question and answer posts, only in comments and in the chat. – Martin Scharrer Jan 16 '12 at 13:57
@Martin will try to remember next time – Frank Mittelbach Jan 16 '12 at 14:31

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.