
答案1
你可以這樣做nicematrix
:
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\setcounter{MaxMatrixCols}{15}
$\begin{bNiceMatrix}[first-row]
x & x^2 & x^3 & x^4 & x^5 & x^6 & x^7 & x^8 & x^9 & x^{10} \\
r & -r & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & \ldots \\
0 & r^2 & -2r^2 & & 0 & 0 & 0 & 0 & 0 & 0 & \ldots \\
0 & r^3 & -3r^3 & 3r^3 & r^3 & 0 & 0 & 0 & 0 & 0 & \ldots \\
0 & 0 & 0 & r^4 & -4r^4 & 6r^4 & -4r^4 & r4 & 0 & 0 & \ldots \\
0 & 0 & 0 & 0 & r^5 & -5r^5 & 10r^5 & -10r^5 & 5r^5 & -r^5 & \ldots \\
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots
\end{bNiceMatrix}$
\end{document}
答案2
只需省略每行的最終條目,否則blockarray
用於標記行(但不要這樣做)不是省略&
前面的內容。
做一個比你的稍微簡單的例子(因為你沒有提供任何原始碼,我不想費力地輸入 11 列矩陣的所有條目:
\documentclass[11pt, a4paper]{article}
\usepackage{amsmath,blkarray, bigstrut}
\begin{document}
\[
\begin{blockarray}{*{5}{>{\scriptstyle}c}}
x & x^{2}& x^{3} & \\
\begin{block}{[cccc] >{\scriptstyle}c}
\bigstrut[t] r & -r & 0 & \cdots & \\
0 & r^{2} & -2 r^{2} & \cdots & \\
0 & 0 & r^{3} & \cdots & \\
0 & 0 & 0 & \cdots & \\
\vdots & \vdots & \vdots &\ddots\\
\end{block}
\end{blockarray}
\]
\end{document}