[Tex/LaTex] How to make two 2×1 matrices in the same column

matrices

I'm using LaTeX to show the butterfly visualization of fast Fourier transformation and I'm stuck at drawing the matrix.

I want something like this:

enter image description here

i.e. if I have a vector of length 8, in the next column (after the equal sign), I want two matrices each of length 4 on the same column one below the other, how can I achieve this?

\documentclass{article}
\begin{document}

\left[ \begin{array}{ccc}
1 \\
0 \\
0 \\
0 \\
3 \\
0 \\
0 \\
0 \\ 
\end{array} \right]

\end{document}

Best Answer

This requires some manual adjustment, but if you don't have too many of these butterflies, it might be sufficient:

\documentclass{article}
\usepackage{amsmath,xparse}

\ExplSyntaxOn
\RenewDocumentCommand{\vdots}{O{3}}
 {
  \vbox:n
   {
    \skip_set:Nn \baselineskip {4pt}
    \dim_set:Nn \lineskiplimit {0pt}
    \kern 6pt % no equivalent with expl3 at the moment
    \prg_replicate:nn { #1 } { \hbox:n { . } }
   }
 }
\ExplSyntaxOff

\begin{document}
\[
\begin{bmatrix}
0 \\ \vdots[16] \\ n
\end{bmatrix}
=
\begin{matrix}
\begin{bmatrix}
0 \\ \vdots \\ (n+1)/2
\end{bmatrix}
\\[4.7ex]
\begin{bmatrix}
0 \\ \vdots \\ (n+1)/2
\end{bmatrix}
\end{matrix}
\]
\end{document}

The new optional argument to \vdots tells how many dots are to be printed.

enter image description here