One simple way is to use the array
environment together the expansible brackets \left[
and \right]
(note the use of {*{20}c}
as suggested by @cmhughes):
\left[
\begin{array}{*{20}c}
1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 1 & 0
\end{array}
\right]
The problem is the difference on the spacing for the brackets.
From the texdoc amsmath
documentation:
The maximum number of columns in a matrix is determined by the counter MaxMatrixCols
(normal value = 10), which you can change if necessary using
\setcounter
or \addtocounter
commands.
So, you can just use
\setcounter{MaxMatrixCols}{20}
\begin{equation}
\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 1 & 0
\end{bmatrix}
\end{equation}