[Tex/LaTex] Help me input a column vector

amsmathmath-modematrices

enter image description hereenter image description here

I'm trying to input an arrow vector (a column vector, see the picture) in an align environment, but it reports an error.

Can someone show me the TeX code of it in an align environment?

Best Answer

You can use bmatrix from amsmath with \vdots:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
  \begin{align}
    y &= \begin{bmatrix}
           x_{1} \\
           x_{2} \\
           \vdots \\
           x_{m}
         \end{bmatrix}
  \end{align}
\end{document}

the matrix y

Answering to the comment:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
  \begin{align}
    y &= (x_{1},x_{2},\cdots, x_{N})
        \begin{pmatrix}
          \begin{bmatrix}
           ax_{0} + bx_{1} \\           
           \vdots \\
           ax_{n-1}+bx_{n}
          \end{bmatrix} -
          \begin{bmatrix}
           z_{1} \\
           \vdots \\
           z_{n}
         \end{bmatrix}
    \end{pmatrix}
  \end{align}
\end{document}

enter image description here