I'm trying to make a 6×6 matrix with the following text:
\begin{gather}
\dfrac{d}{dt}
\begin{bmatrix}
y \\ \dot{y} \\ a_{M} \\ \lambda_{T} \\ \lambda_{D} \\ a_{T}
\end{bmatrix}
=
\begin{bmatrix}
0 && 1 && 0 && 0 && 0 && 0 \\
0 && 1 && 0 && 0 && 0 && 0 \\
0 && 1 && 0 && 0 && 0 && 0 \\
0 && 1 && 0 && 0 && 0 && 0 \\
0 && 1 && 0 && 0 && 0 && 0 \\
0 && 1 && 0 && 0 && 0 && 0 \\
\end{bmatrix}
\end{gather}
And I get the following error:
Extra alignment tab has been changed to \cr. \endtemplace \end{gather}.
Whats weird is when i check the same code for 5×5 it worked.
Thank you.
Best Answer
The problem is that only up to ten columns are supported by default in
matrix
-like constructions, but the number can be increased with(twenty columns should be sufficient).
However, if you want to have wider separation between columns, set it properly, not by adding dummy columns.
I'd much prefer the latter.