
O que devo fazer para alinhar todos os 1
com sinal de menos ( -
) na frente deles com os outros 1
e 0
nesses vetores?
\documentclass[a4paper, 12pt]{book}
\usepackage{amsmath}
\begin{document}
$$
v_1 = \begin{bmatrix} 1 \\ -1 \\ 0 \\0 \end{bmatrix}, \quad
v_2 = \begin{bmatrix} 1 \\ 0 \\ -1 \\0 \end{bmatrix}, \quad
v_3 = \begin{bmatrix} 1 \\ 0 \\ 0 \\-1 \end{bmatrix},
$$
\end{document}
Responder1
Como você descobriu, o bmatrix
ambiente centraliza o conteúdo da célula. Para obter o alinhamento correto, você pode querer carregar o mathtools
pacote (um superconjunto do amsmath
pacote) e usar um bmatrix*
ambiente com argumento opcional r
.
\documentclass[a4paper, 12pt]{book}
\usepackage{mathtools}
\begin{document}
\[
v_1 = \begin{bmatrix} 1 \\ -1 \\ 0 \\0 \end{bmatrix}, \quad
v_2 = \begin{bmatrix} 1 \\ 0 \\ -1 \\0 \end{bmatrix}, \quad
v_3 = \begin{bmatrix} 1 \\ 0 \\ 0 \\-1 \end{bmatrix}.
\]
\[
v_1 = \begin{bmatrix*}[r] 1 \\ -1 \\ 0 \\0 \end{bmatrix*}, \quad
v_2 = \begin{bmatrix*}[r] 1 \\ 0 \\ -1 \\0 \end{bmatrix*}, \quad
v_3 = \begin{bmatrix*}[r] 1 \\ 0 \\ 0 \\-1 \end{bmatrix*}.
\]
\end{document}