Numbers with a minus sign in a matrix not aligned with the numbers without minus sign [duplicate]

Clash Royale CLAN TAG#URR8PPP
This question already has an answer here:
How do I left-align entries in a matrix with beginmatrix?
3 answers
What should I do to get all the 1 with a minus sign (-) in front of them aligned with the other 1 and the 0 in those vectors?
documentclass[a4paper, 12pt]book
usepackageamsmath
begindocument
$$
v_1 = beginbmatrix 1 \ -1 \ 0 \0 endbmatrix, quad
v_2 = beginbmatrix 1 \ 0 \ -1 \0 endbmatrix, quad
v_3 = beginbmatrix 1 \ 0 \ 0 \-1 endbmatrix,
$$
enddocument

align matrices
marked as duplicate by Phelype Oleinik, Kurt, barbara beeton, JouleV, Raaja Feb 28 at 4:32
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How do I left-align entries in a matrix with beginmatrix?
3 answers
What should I do to get all the 1 with a minus sign (-) in front of them aligned with the other 1 and the 0 in those vectors?
documentclass[a4paper, 12pt]book
usepackageamsmath
begindocument
$$
v_1 = beginbmatrix 1 \ -1 \ 0 \0 endbmatrix, quad
v_2 = beginbmatrix 1 \ 0 \ -1 \0 endbmatrix, quad
v_3 = beginbmatrix 1 \ 0 \ 0 \-1 endbmatrix,
$$
enddocument

align matrices
marked as duplicate by Phelype Oleinik, Kurt, barbara beeton, JouleV, Raaja Feb 28 at 4:32
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
You could dodocumentclass[a4paper, 12pt]book usepackageamsmath begindocument [ v_1 = left[beginarray@r@ 1 \ -1 \ 0 \0 endarrayright], quad v_2 = left[beginarray@r@ 1 \ 0 \ -1 \0 endarrayright], quad v_3 = left[beginarray@r@ 1 \ 0 \ 0 \-1 endarrayright], ] enddocumentbut please use[ ... ]instead of `$$ ... $$'.
– marmot
Feb 27 at 21:01
add a comment |
This question already has an answer here:
How do I left-align entries in a matrix with beginmatrix?
3 answers
What should I do to get all the 1 with a minus sign (-) in front of them aligned with the other 1 and the 0 in those vectors?
documentclass[a4paper, 12pt]book
usepackageamsmath
begindocument
$$
v_1 = beginbmatrix 1 \ -1 \ 0 \0 endbmatrix, quad
v_2 = beginbmatrix 1 \ 0 \ -1 \0 endbmatrix, quad
v_3 = beginbmatrix 1 \ 0 \ 0 \-1 endbmatrix,
$$
enddocument

align matrices
This question already has an answer here:
How do I left-align entries in a matrix with beginmatrix?
3 answers
What should I do to get all the 1 with a minus sign (-) in front of them aligned with the other 1 and the 0 in those vectors?
documentclass[a4paper, 12pt]book
usepackageamsmath
begindocument
$$
v_1 = beginbmatrix 1 \ -1 \ 0 \0 endbmatrix, quad
v_2 = beginbmatrix 1 \ 0 \ -1 \0 endbmatrix, quad
v_3 = beginbmatrix 1 \ 0 \ 0 \-1 endbmatrix,
$$
enddocument

This question already has an answer here:
How do I left-align entries in a matrix with beginmatrix?
3 answers
align matrices
align matrices
edited Feb 28 at 1:32
user69318
1763413
1763413
asked Feb 27 at 20:51
ecjbecjb
3276
3276
marked as duplicate by Phelype Oleinik, Kurt, barbara beeton, JouleV, Raaja Feb 28 at 4:32
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Phelype Oleinik, Kurt, barbara beeton, JouleV, Raaja Feb 28 at 4:32
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
You could dodocumentclass[a4paper, 12pt]book usepackageamsmath begindocument [ v_1 = left[beginarray@r@ 1 \ -1 \ 0 \0 endarrayright], quad v_2 = left[beginarray@r@ 1 \ 0 \ -1 \0 endarrayright], quad v_3 = left[beginarray@r@ 1 \ 0 \ 0 \-1 endarrayright], ] enddocumentbut please use[ ... ]instead of `$$ ... $$'.
– marmot
Feb 27 at 21:01
add a comment |
You could dodocumentclass[a4paper, 12pt]book usepackageamsmath begindocument [ v_1 = left[beginarray@r@ 1 \ -1 \ 0 \0 endarrayright], quad v_2 = left[beginarray@r@ 1 \ 0 \ -1 \0 endarrayright], quad v_3 = left[beginarray@r@ 1 \ 0 \ 0 \-1 endarrayright], ] enddocumentbut please use[ ... ]instead of `$$ ... $$'.
– marmot
Feb 27 at 21:01
You could do
documentclass[a4paper, 12pt]book usepackageamsmath begindocument [ v_1 = left[beginarray@r@ 1 \ -1 \ 0 \0 endarrayright], quad v_2 = left[beginarray@r@ 1 \ 0 \ -1 \0 endarrayright], quad v_3 = left[beginarray@r@ 1 \ 0 \ 0 \-1 endarrayright], ] enddocument but please use [ ... ] instead of `$$ ... $$'.– marmot
Feb 27 at 21:01
You could do
documentclass[a4paper, 12pt]book usepackageamsmath begindocument [ v_1 = left[beginarray@r@ 1 \ -1 \ 0 \0 endarrayright], quad v_2 = left[beginarray@r@ 1 \ 0 \ -1 \0 endarrayright], quad v_3 = left[beginarray@r@ 1 \ 0 \ 0 \-1 endarrayright], ] enddocument but please use [ ... ] instead of `$$ ... $$'.– marmot
Feb 27 at 21:01
add a comment |
1 Answer
1
active
oldest
votes
As you've discovered, the bmatrix environment centers the cell contents. To achieve right-alignment, you may want to load the mathtools package (a superset of the amsmath package) and use a bmatrix* environment with optional argument r.

documentclass[a4paper, 12pt]book
usepackagemathtools
begindocument
[
v_1 = beginbmatrix 1 \ -1 \ 0 \0 endbmatrix, quad
v_2 = beginbmatrix 1 \ 0 \ -1 \0 endbmatrix, quad
v_3 = beginbmatrix 1 \ 0 \ 0 \-1 endbmatrix.
]
[
v_1 = beginbmatrix*[r] 1 \ -1 \ 0 \0 endbmatrix*, quad
v_2 = beginbmatrix*[r] 1 \ 0 \ -1 \0 endbmatrix*, quad
v_3 = beginbmatrix*[r] 1 \ 0 \ 0 \-1 endbmatrix*.
]
enddocument
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
As you've discovered, the bmatrix environment centers the cell contents. To achieve right-alignment, you may want to load the mathtools package (a superset of the amsmath package) and use a bmatrix* environment with optional argument r.

documentclass[a4paper, 12pt]book
usepackagemathtools
begindocument
[
v_1 = beginbmatrix 1 \ -1 \ 0 \0 endbmatrix, quad
v_2 = beginbmatrix 1 \ 0 \ -1 \0 endbmatrix, quad
v_3 = beginbmatrix 1 \ 0 \ 0 \-1 endbmatrix.
]
[
v_1 = beginbmatrix*[r] 1 \ -1 \ 0 \0 endbmatrix*, quad
v_2 = beginbmatrix*[r] 1 \ 0 \ -1 \0 endbmatrix*, quad
v_3 = beginbmatrix*[r] 1 \ 0 \ 0 \-1 endbmatrix*.
]
enddocument
add a comment |
As you've discovered, the bmatrix environment centers the cell contents. To achieve right-alignment, you may want to load the mathtools package (a superset of the amsmath package) and use a bmatrix* environment with optional argument r.

documentclass[a4paper, 12pt]book
usepackagemathtools
begindocument
[
v_1 = beginbmatrix 1 \ -1 \ 0 \0 endbmatrix, quad
v_2 = beginbmatrix 1 \ 0 \ -1 \0 endbmatrix, quad
v_3 = beginbmatrix 1 \ 0 \ 0 \-1 endbmatrix.
]
[
v_1 = beginbmatrix*[r] 1 \ -1 \ 0 \0 endbmatrix*, quad
v_2 = beginbmatrix*[r] 1 \ 0 \ -1 \0 endbmatrix*, quad
v_3 = beginbmatrix*[r] 1 \ 0 \ 0 \-1 endbmatrix*.
]
enddocument
add a comment |
As you've discovered, the bmatrix environment centers the cell contents. To achieve right-alignment, you may want to load the mathtools package (a superset of the amsmath package) and use a bmatrix* environment with optional argument r.

documentclass[a4paper, 12pt]book
usepackagemathtools
begindocument
[
v_1 = beginbmatrix 1 \ -1 \ 0 \0 endbmatrix, quad
v_2 = beginbmatrix 1 \ 0 \ -1 \0 endbmatrix, quad
v_3 = beginbmatrix 1 \ 0 \ 0 \-1 endbmatrix.
]
[
v_1 = beginbmatrix*[r] 1 \ -1 \ 0 \0 endbmatrix*, quad
v_2 = beginbmatrix*[r] 1 \ 0 \ -1 \0 endbmatrix*, quad
v_3 = beginbmatrix*[r] 1 \ 0 \ 0 \-1 endbmatrix*.
]
enddocument
As you've discovered, the bmatrix environment centers the cell contents. To achieve right-alignment, you may want to load the mathtools package (a superset of the amsmath package) and use a bmatrix* environment with optional argument r.

documentclass[a4paper, 12pt]book
usepackagemathtools
begindocument
[
v_1 = beginbmatrix 1 \ -1 \ 0 \0 endbmatrix, quad
v_2 = beginbmatrix 1 \ 0 \ -1 \0 endbmatrix, quad
v_3 = beginbmatrix 1 \ 0 \ 0 \-1 endbmatrix.
]
[
v_1 = beginbmatrix*[r] 1 \ -1 \ 0 \0 endbmatrix*, quad
v_2 = beginbmatrix*[r] 1 \ 0 \ -1 \0 endbmatrix*, quad
v_3 = beginbmatrix*[r] 1 \ 0 \ 0 \-1 endbmatrix*.
]
enddocument
answered Feb 27 at 21:03
MicoMico
284k31388778
284k31388778
add a comment |
add a comment |
You could do
documentclass[a4paper, 12pt]book usepackageamsmath begindocument [ v_1 = left[beginarray@r@ 1 \ -1 \ 0 \0 endarrayright], quad v_2 = left[beginarray@r@ 1 \ 0 \ -1 \0 endarrayright], quad v_3 = left[beginarray@r@ 1 \ 0 \ 0 \-1 endarrayright], ] enddocumentbut please use[ ... ]instead of `$$ ... $$'.– marmot
Feb 27 at 21:01