[Tex/LaTex] I am getting “illegal character in an array arg”

arraysmissingtables

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}

\begin{equation}
{S}=
 \left(\begin{tabular}{1}
&\centering\{B_{M,i}\}\\
&\centering.\\
&\centering.\\
&\centering\{B_{1,i}\}  \{B_{2,i}\}  {.}  {.}  \{B_{M,i}\}
\end{tabular}
\right)
\end{equation}
\end{document}

When I execute the above code, I am getting the output, but it's stating "illegal character in an array arg".

Best Answer

The "illegal character in array arg" references the fact that you're using 1 as a column specification which is undefined. You can only use l, r, c or p{<len>}. Also, using tabular places everything in text mode, which doesn't allow subscript/superscript without being in math mode. There is array as a math alternative.

Here's a suggested solution:

enter image description here

\documentclass{article}

\begin{document}

\[
  S = \left(\begin{array}{c}
    \{B_{M,i}\} \\
    \vdots \\
    \{B_{1,i}\} \ \{B_{2,i}\} \ \cdots \ \{B_{M,i}\}
  \end{array}\right)
\]

\end{document}