# Scaling \ddots in smallmatrix

I'm trying visualize a very large matrix. To do so, I'm trying to use \vdots and \ddots in a bsmallmatrix enviroment. It works but they do not scale properly as \cdots do. Now, in the minimal reproducible example below, I have found a fix here which works, but only the vertical dots and not the diagonal dots. I do not understand why it does not work for \ddots.

\documentclass{article}

\usepackage{mathtools}
\newcommand{\svdots}{\raisebox{3pt}{\scalebox{.75}{\vdots}}} % <- Works
\newcommand{\sddots}{\raisebox{3pt}{\scalebox{.75}{\ddots}}} % <- Do not work

\begin{document}

\begin{equation*}
\begin{bsmallmatrix}
a_{11}  & a_{12}  & \cdots  & a_{1m}  \\
a_{21}  & a_{22}  & \cdots  & a_{2m}  \\
\svdots & \svdots & \sddots & \svdots \\
a_{n1}  & a_{n2}  & \cdots  & a_{nm}
\end{bsmallmatrix}
\end{equation*}

\end{document}


The compilation errors revolves around missing $ and brackets. The document complies fine when substituting \sddots for \ddots but, obviously, the ddots have the wrong size. How do I best accomplish my desired result? • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. May 24 '15 at 11:48 • the version in the answer you reverence has $ to put the dots in math mode but you have omitted them here. May 24 '15 at 12:09
• @DavidCarlisle Indeed I have, adding them around the \scalebox makes no difference. \svdots still works fine, but \sddots does not. May 24 '15 at 12:29
– GuM
May 24 '15 at 14:17

For information, the package nicematrix provides homogeneous tools to construct mathematical matrices with dotted lines, included small matrices'' with the key small.

\documentclass{article}
\usepackage{nicematrix}

\begin{document}
\begin{equation*}
\begin{bNiceMatrix}[small,xdots/shorten=5pt]
a_{11}  & a_{12}  & \Ldots  & a_{1m}  \\
a_{21}  & a_{22}  & \Ldots  & a_{2m}  \\
\Vdots  & \Vdots  & \Ddots  & \Vdots \\
a_{n1}  & a_{n2}  & \Ldots  & a_{nm}
\end{bNiceMatrix}
\end{equation*}
\end{document}