I was trying to build a matrix with vertical, horizontal and diagonal dots, but I'm pretty disappointed by the result. The spaces between each line aren't always equal, and same applies to colums. Could anyone come to help me please? Here is my code:
$$A = \begin{pmatrix}
1 & 0 & & \dots & & 0 \\
d & e & f & & &\vdots \\
0 & d & e & f & \\
\vdots & & \ddots & \ddots & \ddots & 0 \\
& & & d & e & f \\
0 & & \dots & & 0 & 1
\end{pmatrix}$$



$$in LaTeX, but instead reach for\[ ... \], or use one of the named environments, e.g.equation*fromamsmath. See https://tex.stackexchange.com/q/503/158639 . – chsk Mar 31 '21 at 21:16