\documentclass{ctexart}
\usepackage{amsmath}
\begin{document}
$\begin{vmatrix}
a_{11} & a_{12} & a_{13} \\
a_{21} & a_{22} & a_{23} \\
a_{31} & a_{32} & a_{33}
\end{vmatrix}$
\end{document}
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\[\begin{vmatrix}
\tikzmarknode{11}{a_{11}} & \tikzmarknode{12}{a_{12}} & \tikzmarknode{13}{a_{13}} \\
\tikzmarknode{21}{a_{21}} & \tikzmarknode{22}{a_{22}} & \tikzmarknode{23}{a_{23}} \\
\tikzmarknode{31}{a_{31}} & \tikzmarknode{32}{a_{32}} & \tikzmarknode{33}{a_{33}}
\end{vmatrix}\]
\begin{tikzpicture}[remember picture, overlay]
\draw (11)--(22)--(33);
\draw (12)--(23);
\draw (21)--(32);
\draw[densely dashed] (31)--(22)--(13);
\draw[densely dashed] (21)--(12);
\draw[densely dashed] (32)--(23);
\draw[rounded corners] (31)--++(1.25,-0.65)--++(1.25,0.65)--(23);
\draw[rounded corners] (32)--++(1.25,-0.65)--++(1.25,0.65)--(13);
\draw[rounded corners, densely dashed] (11)--++(1.25,0.65)--++(1.25,-0.65)--(23);
\draw[rounded corners, densely dashed] (12)--++(1.25,0.65)--++(1.25,-0.65)--(33);
\end{tikzpicture}
\end{document}