5

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}
  • 5
    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
13

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 4 '18 at 3: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 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
  • 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 4 '18 at 4:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.