\begin{displaymath}
P=
\left[
\begin{matrix}
x & 0 & 0 \\
x & x & 0 \\
x & x & x \\
0 & x & x \\
0 & 0 & x \\
\end{matrix}
答案1
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
P=
\left[\;
\begin{matrix}
x & 0 & 0 \\
x & x & 0 \\
x & x & x \\
0 & x & x \\
0 & 0 & x \\
\end{matrix}\;
\right]
\end{equation}
\end{document}