答案1
你可以这样做blockarray
:
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{blkarray, bigstrut}
\begin{document}
\begin{frame}
\[ \bigstrutjot=5pt
X = \begin{blockarray}{*{7}{c}}
& 1 & 2 & \dots & j & \dots &n \\
\begin{block}{r[*{6}{c}]}%
1 & & & & & & \bigstrut[t]\\
2 & & & & & & \\
\vdots & & & & & & \\
i & & & & & & \\
\vdots & & & & & & \\
m & & & & & & \bigstrutjot = 3pt\bigstrut[b]\\
\end{block}\
\end{blockarray} \]
\end{frame}
\end{document}