# How to align left the matrix in bmatrix environment

In the following MWE, the A and B matrices are perfectly aligned. However, the matrix C is aligning itself towards the right. How to align it towards the left?

  \begin{multline}
A=
\begin{bmatrix}
0 & 1 & 0 & \cdots & 0\\
0 & 0 & 1 & \cdots & 0 \\
\vdots & \vdots & \vdots & \ddots & \vdots\\
0 & 0 & 0 & \cdots & 1 \\
-q_{0}&-q_{1}&-q_{2}&\cdots&-q_{n-1}
\end{bmatrix}
,\,\,
B=
\begin{bmatrix}
0 \\
0  \\
\vdots \\
b_e
\end{bmatrix}
\\
C =
\begin{bmatrix}
1 &b_1/b_0  &\cdots &b_{n-1}/b_0
\end{bmatrix}
\end{multline}

• What is your desired result? Is it "to center the matrix in bmatrix environment" or "to align it [matrix C] towards the left"? – L. F. Feb 26 '19 at 11:30
• Align C towards left – ShJ Feb 26 '19 at 11:31
• Then how do you explain your title? – L. F. Feb 26 '19 at 11:32
• Sorry, by mistake. Done – ShJ Feb 26 '19 at 11:37
• multiline does not come with alignment. I would guess its intent is to right align the 2nd line, as if it were the continuation of a long equation. Perhaps you instead want some sort of align environment. – Steven B. Segletes Feb 26 '19 at 11:45

## 2 Answers

You possibly want the row matrix to be centered with respect to the top block:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
\begin{gathered}
A=\begin{bmatrix}
0 & 1 & 0 & \cdots & 0\\
0 & 0 & 1 & \cdots & 0 \\
\vdots & \vdots & \vdots & \ddots & \vdots\\
0 & 0 & 0 & \cdots & 1 \\
-q_{0}&-q_{1}&-q_{2}&\cdots&-q_{n-1}
\end{bmatrix}
,\quad
B=\begin{bmatrix} 0 \\ 0 \\ \vdots \\ b_e \end{bmatrix}
\\[2ex]
C = \begin{bmatrix} 1 & b_1/b_0 & \cdots & b_{n-1}/b_0 \end{bmatrix}
\end{gathered}
\end{equation}

\end{document} If you want the equals signs to be aligned, use aligned:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
\begin{aligned}
A&=\begin{bmatrix}
0 & 1 & 0 & \cdots & 0\\
0 & 0 & 1 & \cdots & 0 \\
\vdots & \vdots & \vdots & \ddots & \vdots\\
0 & 0 & 0 & \cdots & 1 \\
-q_{0}&-q_{1}&-q_{2}&\cdots&-q_{n-1}
\end{bmatrix}
,\quad
B=\begin{bmatrix} 0 \\ 0 \\ \vdots \\ b_e \end{bmatrix}
\\[2ex]
C&=\begin{bmatrix} 1 & b_1/b_0 & \cdots & b_{n-1}/b_0 \end{bmatrix}
\end{aligned}
\end{equation}

\end{document} Use align* instead of multiline. Add some alignment tabs.

As commented, multiline does not come with alignment. I would guess its intent is to right align the 2nd line, as if it were the continuation of a long equation.

\documentclass{article}
\usepackage{amsmath}
%\usepackage{unicode-math}
\begin{document}
\begin{align*}
A&=
\begin{bmatrix}
0 & 1 & 0 & \cdots & 0\\
0 & 0 & 1 & \cdots & 0 \\
\vdots & \vdots & \vdots & \ddots & \vdots\\
0 & 0 & 0 & \cdots & 1 \\
-q_{0}&-q_{1}&-q_{2}&\cdots&-q_{n-1}
\end{bmatrix}
,\,\,
B=
\begin{bmatrix}
0 \\
0  \\
\vdots \\
b_e
\end{bmatrix}
\\[8pt]
C &=
\begin{bmatrix}
1 &b_1/b_0  &\cdots &b_{n-1}/b_0
\end{bmatrix}
\end{align*}

\end{document} Also, instead of \,\,, you could replace with &, which would add more gap before the B matrix.