# How remove the space in matrix?

Why the space? how remove the space? \begin{gather}
W =
\begin{bmatrix}
{1^W}^T\\
{2^W}^T \\
. &\\
. &\\
{s^W}^T
\end{bmatrix}
\end{gather}

• Get rid of the two & tabs, which create a second column. – Steven B. Segletes Dec 4 '18 at 3:14
• although it isn't mentioned in the question, the dots don't look too good. (this was questioned in a comment to the accepted answer.) this problem is addressed in answers to this question: tex.stackexchange.com/q/286701/579 – barbara beeton Dec 4 '18 at 14:14

Get rid of the two & tab separators...they result in the creation of a 2nd column in the matrix.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather}
W =
\begin{bmatrix}
{1^W}^T\\
{2^W}^T \\
. \\
. \\
{s^W}^T
\end{bmatrix}
\end{gather}
\end{document} Also, consider replacing the .\\.\\ with \vdots\\, as in

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather}
W =
\begin{bmatrix}
{1^W}^T\\
{2^W}^T \\
\vdots \\
{s^W}^T
\end{bmatrix}
\end{gather}
\end{document} • Why is there more space between {2^W}^T and \vdots? – manooooh Dec 4 '18 at 3:32
• @manooooh -- \vdots is constructed from periods, which sit on the baseline, so there's quite a lot of "air" above the top one. some methods for compacting them or adjusting the vertical space appear in answers to tex.stackexchange.com/q/412407/579 . – barbara beeton Dec 4 '18 at 4:01
• @barbarabeeton excellent! It is something similar with $\begin{cases}...\end{cases} \equiv \begin{cases}...\end{cases}$, right? – manooooh Dec 4 '18 at 4:20
• @manooooh it is similar if you wish the syntax of cases (left brace, no right brace). Another differrence, bmatrix uses center alignment, where as cases uses right/left, right/left alignment. – Steven B. Segletes Dec 4 '18 at 4:43