Double backslash on last line of matrix

Multi tool use
up vote
7
down vote
favorite
Is \
necessary on the final line of environments like matrix
, align
, and gather
? For example, with amsmath
,
[begin{bmatrix}
3 & 1\
2 & 4\
end{bmatrix}]
and
[begin{bmatrix}
3 & 1\
2 & 4
end{bmatrix}]
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 |
up vote
7
down vote
favorite
Is \
necessary on the final line of environments like matrix
, align
, and gather
? For example, with amsmath
,
[begin{bmatrix}
3 & 1\
2 & 4\
end{bmatrix}]
and
[begin{bmatrix}
3 & 1\
2 & 4
end{bmatrix}]
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
7 hours ago
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
7 hours ago
add a comment |
up vote
7
down vote
favorite
up vote
7
down vote
favorite
Is \
necessary on the final line of environments like matrix
, align
, and gather
? For example, with amsmath
,
[begin{bmatrix}
3 & 1\
2 & 4\
end{bmatrix}]
and
[begin{bmatrix}
3 & 1\
2 & 4
end{bmatrix}]
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
,
[begin{bmatrix}
3 & 1\
2 & 4\
end{bmatrix}]
and
[begin{bmatrix}
3 & 1\
2 & 4
end{bmatrix}]
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 7 hours ago
asked 7 hours ago
MathIsFun
505
505
If it produces the same output, I guess there's no difference.
– Tvde1
7 hours ago
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
7 hours ago
add a comment |
If it produces the same output, I guess there's no difference.
– Tvde1
7 hours ago
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
7 hours ago
If it produces the same output, I guess there's no difference.
– Tvde1
7 hours ago
If it produces the same output, I guess there's no difference.
– Tvde1
7 hours ago
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
7 hours ago
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
7 hours ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
7
down vote
accepted
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 |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
7
down vote
accepted
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 |
up vote
7
down vote
accepted
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 |
up vote
7
down vote
accepted
up vote
7
down vote
accepted
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 6 hours ago


egreg
696k8518483111
696k8518483111
add a comment |
add a comment |
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
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
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
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
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
TgM H,O Ix9IT,RDYfjsgJ,YM0mk
If it produces the same output, I guess there's no difference.
– Tvde1
7 hours ago
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
7 hours ago