# 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"? Commented Feb 26, 2019 at 11:30
• Align C towards left
– ShJ
Commented Feb 26, 2019 at 11:31
• Then how do you explain your title? Commented Feb 26, 2019 at 11:32
• Sorry, by mistake. Done
– ShJ
Commented Feb 26, 2019 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. Commented Feb 26, 2019 at 11:45

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

\documentclass{article}
\usepackage{amsmath}

\begin{document}

$$\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{document}

If you want the equals signs to be aligned, use aligned:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\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{document}

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.