I'm trying to put vertical dots into a matrix, and I can only get it to align with one of the elements - as shown in:
$$ \begin{pmatrix} 1 & -1 & 0 & 0 & \hdots & 0\\
0 & 1 & -1 & 0 & \hdots & 0\\
& & & \vdots & \\
0 & \hdots & 1 & -1 & 0 & 0
\end{pmatrix}
$$
I was wondering if there was a way to centering the dots? I reviewed "Centering \vdots in a sparse matrix with an even number of rows" but unfortunately couldn't implement the solution.
Any help would be much appreciated.
$$ … $$
for displayed equations: it is plain TeX syntax and can lead to bad vertical spacing.