To improve the spacing between the matrix and the surrounding braces, insert an extra column on either side. Additionally, specify the exact column gap using the @{...} specifier. In the above example, two "dummy" centered columns were added with an \hspace{5pt} gap.
Best Answer
This is very easy with
nicematrix
:This requires several LaTeX runs at the beginning, but the typesetting will soon stabilize.