Double backslash on last line of matrix
Is \
necessary on the final line of environments like matrix
, align
, and gather
? For example, with amsmath
,
[beginbmatrix
3 & 1\
2 & 4\
endbmatrix]
and
[beginbmatrix
3 & 1\
2 & 4
endbmatrix]
seem to produce the same output. But are they really the same? Is one preferable to the other, or is it a matter of taste? From my understanding, \
in one of these environments is used to separate lines, and there's nothing else to separate the final line from, so it's not necessary.
matrices
add a comment |
Is \
necessary on the final line of environments like matrix
, align
, and gather
? For example, with amsmath
,
[beginbmatrix
3 & 1\
2 & 4\
endbmatrix]
and
[beginbmatrix
3 & 1\
2 & 4
endbmatrix]
seem to produce the same output. But are they really the same? Is one preferable to the other, or is it a matter of taste? From my understanding, \
in one of these environments is used to separate lines, and there's nothing else to separate the final line from, so it's not necessary.
matrices
If it produces the same output, I guess there's no difference.
– Tvde1
Nov 12 '18 at 14:11
I think there's no rule for this. I think it depends on the implementation of the environment. Withalign
, for instance, you get an undesired line if you add the\
at the end.
– Phelype Oleinik
Nov 12 '18 at 14:16
add a comment |
Is \
necessary on the final line of environments like matrix
, align
, and gather
? For example, with amsmath
,
[beginbmatrix
3 & 1\
2 & 4\
endbmatrix]
and
[beginbmatrix
3 & 1\
2 & 4
endbmatrix]
seem to produce the same output. But are they really the same? Is one preferable to the other, or is it a matter of taste? From my understanding, \
in one of these environments is used to separate lines, and there's nothing else to separate the final line from, so it's not necessary.
matrices
Is \
necessary on the final line of environments like matrix
, align
, and gather
? For example, with amsmath
,
[beginbmatrix
3 & 1\
2 & 4\
endbmatrix]
and
[beginbmatrix
3 & 1\
2 & 4
endbmatrix]
seem to produce the same output. But are they really the same? Is one preferable to the other, or is it a matter of taste? From my understanding, \
in one of these environments is used to separate lines, and there's nothing else to separate the final line from, so it's not necessary.
matrices
matrices
edited Nov 12 '18 at 14:11
asked Nov 12 '18 at 14:07
MathIsFun
675
675
If it produces the same output, I guess there's no difference.
– Tvde1
Nov 12 '18 at 14:11
I think there's no rule for this. I think it depends on the implementation of the environment. Withalign
, for instance, you get an undesired line if you add the\
at the end.
– Phelype Oleinik
Nov 12 '18 at 14:16
add a comment |
If it produces the same output, I guess there's no difference.
– Tvde1
Nov 12 '18 at 14:11
I think there's no rule for this. I think it depends on the implementation of the environment. Withalign
, for instance, you get an undesired line if you add the\
at the end.
– Phelype Oleinik
Nov 12 '18 at 14:16
If it produces the same output, I guess there's no difference.
– Tvde1
Nov 12 '18 at 14:11
If it produces the same output, I guess there's no difference.
– Tvde1
Nov 12 '18 at 14:11
I think there's no rule for this. I think it depends on the implementation of the environment. With
align
, for instance, you get an undesired line if you add the \
at the end.– Phelype Oleinik
Nov 12 '18 at 14:16
I think there's no rule for this. I think it depends on the implementation of the environment. With
align
, for instance, you get an undesired line if you add the \
at the end.– Phelype Oleinik
Nov 12 '18 at 14:16
add a comment |
1 Answer
1
active
oldest
votes
There is no difference at all for bmatrix
. There is for align
.
Any array
or tabular
allows a trailing \
; it is obviously mandatory if hline
is needed at the bottom, but otherwise omitting it is safe.
Since Xmatrix
(where X
stands for noting, p
, b
, B
, v
or V
) is array
in disguise, the same applies. Also cases
falls in this class.
It's very different with align
, alignat
, xalignat
, flalign
and gather
(or *
-forms thereof), where a trailing \
would produce a new empty row (with the equation number in the case of no *
), so it must be avoided.
As a habit, I tend to avoid the trailing \
in Xmatrix
, just for symmetry with the alignment environments mentioned above.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459622%2fdouble-backslash-on-last-line-of-matrix%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
There is no difference at all for bmatrix
. There is for align
.
Any array
or tabular
allows a trailing \
; it is obviously mandatory if hline
is needed at the bottom, but otherwise omitting it is safe.
Since Xmatrix
(where X
stands for noting, p
, b
, B
, v
or V
) is array
in disguise, the same applies. Also cases
falls in this class.
It's very different with align
, alignat
, xalignat
, flalign
and gather
(or *
-forms thereof), where a trailing \
would produce a new empty row (with the equation number in the case of no *
), so it must be avoided.
As a habit, I tend to avoid the trailing \
in Xmatrix
, just for symmetry with the alignment environments mentioned above.
add a comment |
There is no difference at all for bmatrix
. There is for align
.
Any array
or tabular
allows a trailing \
; it is obviously mandatory if hline
is needed at the bottom, but otherwise omitting it is safe.
Since Xmatrix
(where X
stands for noting, p
, b
, B
, v
or V
) is array
in disguise, the same applies. Also cases
falls in this class.
It's very different with align
, alignat
, xalignat
, flalign
and gather
(or *
-forms thereof), where a trailing \
would produce a new empty row (with the equation number in the case of no *
), so it must be avoided.
As a habit, I tend to avoid the trailing \
in Xmatrix
, just for symmetry with the alignment environments mentioned above.
add a comment |
There is no difference at all for bmatrix
. There is for align
.
Any array
or tabular
allows a trailing \
; it is obviously mandatory if hline
is needed at the bottom, but otherwise omitting it is safe.
Since Xmatrix
(where X
stands for noting, p
, b
, B
, v
or V
) is array
in disguise, the same applies. Also cases
falls in this class.
It's very different with align
, alignat
, xalignat
, flalign
and gather
(or *
-forms thereof), where a trailing \
would produce a new empty row (with the equation number in the case of no *
), so it must be avoided.
As a habit, I tend to avoid the trailing \
in Xmatrix
, just for symmetry with the alignment environments mentioned above.
There is no difference at all for bmatrix
. There is for align
.
Any array
or tabular
allows a trailing \
; it is obviously mandatory if hline
is needed at the bottom, but otherwise omitting it is safe.
Since Xmatrix
(where X
stands for noting, p
, b
, B
, v
or V
) is array
in disguise, the same applies. Also cases
falls in this class.
It's very different with align
, alignat
, xalignat
, flalign
and gather
(or *
-forms thereof), where a trailing \
would produce a new empty row (with the equation number in the case of no *
), so it must be avoided.
As a habit, I tend to avoid the trailing \
in Xmatrix
, just for symmetry with the alignment environments mentioned above.
answered Nov 12 '18 at 14:29
egreg
709k8618823165
709k8618823165
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459622%2fdouble-backslash-on-last-line-of-matrix%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
If it produces the same output, I guess there's no difference.
– Tvde1
Nov 12 '18 at 14:11
I think there's no rule for this. I think it depends on the implementation of the environment. With
align
, for instance, you get an undesired line if you add the\
at the end.– Phelype Oleinik
Nov 12 '18 at 14:16