三角法则:三阶行列式

三角法则:三阶行列式

三角法则

有人能帮我用 TikZ + PGF 画图吗?

答案1

正如评论中所建议的,最好使用 TikZmatrix库。

\documentclass{article}
\usepackage[T1]{fontenc}% for guillemets
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
  \matrix[matrix of nodes,left delimiter=|,right delimiter=|,
  row sep=1em,column sep=1em,
  nodes={draw,fill,circle,inner sep=1pt},nodes in empty cells] (m) at (0,0) {
    & & \\
    & & \\
    & & \\
  };
  \draw (m-2-1) -- (m-3-2);
  \draw (m-1-1) -- (m-3-3);
  \draw (m-1-2) -- (m-2-3);
  %
  \draw (m-1-2) -- (m-3-1);
  \draw (m-1-3) -- (m-3-2);
  %
  \draw (m-2-1) -- (m-1-3);
  \draw (m-3-1) -- (m-2-3);

  \matrix[matrix of nodes,left delimiter=|,right delimiter=|,
  row sep=1em,column sep=1em,
  nodes={draw,fill,circle,inner sep=1pt},nodes in empty cells] (n) at (5em,0) {
    & & \\
    & & \\
    & & \\
  };
  \draw (n-2-3) -- (n-3-2);
  \draw (n-1-3) -- (n-3-1);
  \draw (n-1-2) -- (n-2-1);
  %
  \draw (n-1-2) -- (n-3-3);
  \draw (n-1-1) -- (n-3-2);
  %
  \draw (n-2-3) -- (n-1-1);
  \draw (n-3-3) -- (n-2-1);

  \node at (0.0em,-2em) {<<$+$>>};
  \node at (2.5em,0 |- m.base) {$,$};
  \node at (5.0em,-2em) {<<$-$>>};
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容