I wish to center the 3 vertical dots and align this equation but am not able to do so in the below code.
How shall I do it?

\dot{x}=x_1 \\
\dot{x_1}=x_2 \\
\vdots \\
\dot{x_n}= -\frac{f_0}{f_n}x_1  -\frac{f_1}{f_n}x_2- \cdots -\frac{f_{n-1}}{f_n}x_n
  • Can you please give the complete code how to do it
    – ShJ
    Mar 21, 2018 at 12:39

3 Answers 3


mathtools (an extension to amsmath) provides a macro for this:


\usepackage{mathtools} % loads amsmath


\dot{x} &= x_1 \\
\dot{x}_1 & =x_2 \\
&\vdotswithin{=} \\
\dot{x}_n& = -\frac{f_0}{f_n} x_1  -\frac{f_1}{f_n}x_2- \cdots -\frac{f_{n-1}}{f_n}x_n


enter image description here

The tweak with \MTFlushSpaceAbove is needed because of the fractions in the last line. Note furthermore that I replaced \dot{x_1} by \dot{x}_1.

  • 3
    Just use & \shortvdotswithin{=} with no \\ at the end, then it uses even less space
    – daleif
    Mar 21, 2018 at 18:44
  • @daleif I had tried it, but it felt too tight to me. But I can add it out of completeness.
    – campa
    Mar 22, 2018 at 8:09
  • I upvote you also for my previous errors :-)+1.
    – Sebastiano
    Mar 24, 2018 at 20:41

A tabular stack could work here, in lieu of aligned.

\setstacktabulargap{0pt}% Horz. gap between columns
\setstackgap{L}{1.2\baselineskip}% Vert. baselineskip between rows
\TABbinary% apply {} before and after each cell to set proper = spacing
\dot{x}&=&x_1 \\
\dot{x_1}&=&x_2 \\

enter image description here


enter image description here

Use the array environment:

    \begin{array}{c @{\thickspace}c @{\thickspace}c l}
        \dot{x} &= & x_{1} & \\
        \dot{x}_{1} &= & x_{2} & \\
        &\vdots& \\
        \dot{x}_n &= & - & \hspace{-3mm} \frac{f_0}{f_n} x_1  -\frac{f_1}{f_n}x_2- \cdots -\frac{f_{n-1}}{f_n}x_n
  • Thanks for the suggestion. Now it is handling appropriately by doing further customizations to the columns. Mar 21, 2018 at 13:04
  • the first minus sign in the last line should be a unary minus. you can tidy that up by wrapping that minus in braces. Mar 21, 2018 at 17:49

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.