6

Why the space? how remove the space?

enter image description here

\begin{gather}
 W =
  \begin{bmatrix}
    {1^W}^T\\
    {2^W}^T \\
  . &\\
  . &\\
   {s^W}^T
   \end{bmatrix}
\end{gather}
information
  • 1,075
  • 5
    Get rid of the two & tabs, which create a second column. – Steven B. Segletes Dec 04 '18 at 03: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: https://tex.stackexchange.com/q/286701/579 – barbara beeton Dec 04 '18 at 14:14

1 Answers1

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} 

enter image description here

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}

enter image description here

  • 1
    Why is there more space between {2^W}^T and \vdots? – manooooh Dec 04 '18 at 03:32
  • 5
    @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 https://tex.stackexchange.com/q/412407/579 . – barbara beeton Dec 04 '18 at 04:01
  • @barbarabeeton excellent! It is something similar with \[\begin{cases}...\end{cases} \equiv \begin{cases}...\end{cases}\], right? – manooooh Dec 04 '18 at 04:20
  • 2
    @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 04 '18 at 04:43