答案1
这是一个带有的命题nicematrix
。
\documentclass{article}
\usepackage{nicematrix,tikz}
\begin{document}
\NiceMatrixOptions
{
xdots =
{
color = gray ,
shorten = 3pt ,
horizontal-labels % with nicematrix ≥ 6.20
}
}
$\begin{pNiceMatrix}[columns-width=8mm,first-row,first-col]
& \Hdotsfor[line-style={solid,<->},color=black]{4}^{d_u} \\
\Vdotsfor[line-style={solid,<->},color=black]{4}_{d_1}
& a_{11} & a_{12} & \Cdots & a_{1d_u} & 0 & \Cdots & & 0 \\[1.5mm]
& a_{21} & a_{22} & & & & & & \Vdots \\[1.5mm]
& \Vdots & & \Ddots & & & \Ddots & \Ddots & \\[1.5mm]
& a_{d_11}& & & & & & & 0 \\[1.5mm]
& 0 & \Ddots[shorten-end=-5mm] & & & & & & a_{n-d_u+1,n} \\[1.5mm]
& \Vdots & \Ddots & & & & & & \\[1.5mm]
& & & & & & & & \Vdots \\[1.5mm]
& 0 & \Cdots & & 0 & a_{n,n-d_1+1} & \Cdots & & a_{nn}\\
\end{pNiceMatrix}$
\end{document}