主要内容\(\DeclarMathOperator{\deg}{deg}
\DeclarMathOperator{\adj}{adj}
\DeclareMathOperator{\Ker}{Ker}
\DeclareMathOperator{\Ima}{Im}
\newcommand{\N}{\mathbb N}
\newcommand{\Z}{\mathbb Z}
\newcommand{\Q}{\mathbb Q}
\newcommand{\R}{\mathbb R}
\newcommand{\F}{\mathbb F}
\newcommand{\C}{\mathbb C}
\newcommand{\K}{\mathbb K}
\newcommand{\myunit}{1 cm}
\newcommand{\blue}[1]{{\color{blue}#1}}
\newcommand\iddots{\mathinner{
\kern1mu\raise1pt{.}
\kern2mu\raise4pt{.}
\kern2mu\raise7pt{\Rule{0pt}{7pt}{0pt}.}
\kern1mu
}}
\tikzset{
node style sp/.style={draw,circle,minimum size=\myunit},
node style ge/.style={circle,minimum size=\myunit},
arrow style mul/.style={draw,sloped,midway,fill=white},
arrow style plus/.style={midway,sloped,fill=white},
}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
节 3.1 行列式的展开式定义
练习 练习
基础题.
1.
计算
\(3\)阶行列式
\(\begin{vmatrix}
1&-1&-1\\
1&1&-1\\
1&1&1
\end{vmatrix}\)。
解答.
\begin{align*}
\mbox{原式} =\amp\phantom{-} 1\times 1\times 1 +(-1)\times (-1)\times 1 + (-1)\times 1 \times 1\\
\amp - (-1)\times 1\times 1 - (-1)\times 1\times 1 - 1\times (-1)\times 1 \\
=\amp 4.
\end{align*}
2.
解答.
-
因为
\begin{equation*}
\tau(5,4,3,2,1)=4+3+2+1=10,
\end{equation*}
所以排列\(5,4,3,2,1\)是偶排列。
-
因为
\begin{equation*}
\tau(5,6,1,2,3)=3+3+0+0=6,
\end{equation*}
所以排列\(5,6,1,2,3\)是偶排列。
-
因为
\begin{equation*}
\tau(5,3,1,2,6)=3+2+0+0=5,
\end{equation*}
所以排列\(5,3,1,2,6\)是奇排列。
-
因为
\begin{equation*}
\tau(5,3,1,2,6,4)=4+2+0+0+1=7,
\end{equation*}
所以排列\(5,3,1,2,6,4\)是奇排列。
-
因为
\begin{equation*}
\tau(6,3,1,2,7,5)=4+2+0+0+1=7,
\end{equation*}
所以排列\(6,3,1,2,7,5\)是奇排列。
3.
求排列
\(n,n-1,\ldots,1\)的逆序数,并指出其奇偶性。
解答.
\begin{align*}
\tau(n,n-1,\ldots, 1)&=(n-1)+(n-2)+\cdots+1 \\
&=\frac{n(n-1)}{2}.
\end{align*}
-
当
\(n=4k\)时,
\(\frac{n(n-1)}{2}=2k(4k-1)\)为偶数;
-
当
\(n=4k+1\)时,
\(\frac{n(n-1)}{2}=2k(4k+1)\)为偶数;
-
当
\(n=4k+2\)时,
\(\frac{n(n-1)}{2}=(2k+1)(4k+1)\)为奇数;
-
当
\(n=4k+3\)时,
\(\frac{n(n-1)}{2}=(2k+1)(4k+3)\)为奇数。
因此, 当\(n=4k\)或\(n=4k+1\)时,排列\(n,n-1,\dots, 1\)为偶排列;当\(n=4k+2\)或\(n=4k+3\)时,排列\(n,n-1,\dots, 1\)为奇排列。
4.
设 \(j_1,\ldots,j_n\)是 \(1,\ldots ,n\)的一个排列,证明:
\begin{equation*}
\tau(j_1,\ldots ,j_{n-1},j_n)=\tau(j_1,\ldots ,j_{n-1})+(n-j_n).
\end{equation*}
解答.
因为\(j_1,\ldots,j_n\)是 \(1,\ldots ,n\)的一个排列,所以在排列\(j_1,\ldots,j_n\)中, \(j_n\)前面有 \(n-j_n\)个数\(j_n+1,\ldots ,n\)大于 \(j_n\) 。这表明排列\(j_1,\ldots,j_{n-1},j_n\)比排列\(j_1,\ldots,j_{n-1}\)多了 \(n-j_n\)个逆序。因此
\begin{equation*}
\tau(j_1,\ldots ,j_{n-1},j_n)=\tau(j_1,\ldots ,j_{n-1})+(n-j_n).
\end{equation*}
5.
若排列
\(j_1,\ldots ,j_n\)的逆序数为
\(r\),求排列
\(j_n,j_{n-1},\ldots ,j_1\)的逆序数。
解答.
在排列\(j_1,\ldots ,j_n\)中构成逆序(顺序)的一对数,它们在\(j_n,\ldots ,j_1\)中构成一对顺序(逆序),因此\(j_n,\ldots ,j_1\)中构成顺序的数对有 \(r\)对。注意到排列\(j_n,\ldots ,1\)中从左至右构成的数对有 \(C_n^2=\frac{n(n-1)}{2}\)对,故
\begin{equation*}
\tau (j_n,j_{n-1},\ldots ,1)=\frac{n(n-1)}{2}-r.
\end{equation*}
6.
\(n\)阶行列式的反对角线上
\(n\)个元素的乘积一定带负号吗?
解答.
\(n\)阶行列式的反对角线上\(n\)个元素的乘积的符号为
\begin{equation*}
(-1)^{\tau(n,n-1,\cdots,1)}=(-1)^{\frac{n(n-1)}{2}},
\end{equation*}
由于\(\frac{n(n-1)}{2}\)可能是奇数也可能是偶数,所以反对角线上\(n\)个元素的乘积不一定带负号。
7.
设
\(A=\left(a_{ij}\right)_{4\times 4}\),请写出
\(4\)阶行列式
\(\det A\)中取正号且含
\(a_{32}a_{41}\)的项。
解答.
4阶行列式中含\(a_{32}a_{41}\)的项有
\begin{equation*}
(-1)^{\tau(3,4,2,1)}a_{13}a_{24}a_{32}a_{41},\ (-1)^{\tau(4,3,2,1)}a_{14}a_{23}a_{32}a_{41},
\end{equation*}
因为 \(\tau(3,4,2,1)=5\), \(\tau(4,3,2,1)=6\),所以所求项为
\begin{equation*}
a_{14}a_{23}a_{32}a_{41}.
\end{equation*}
8.
按定义计算行列式:
-
\(\begin{vmatrix}
0&1&0&\cdots&0\\
0&0&2&\cdots&0\\
\vdots&\vdots&\vdots&&\vdots\\
0&0&0&\cdots&n-1\\
n&0&0&\cdots&0
\end{vmatrix}\);
-
\(\begin{vmatrix}
0&\cdots&0&1&0\\
0&\cdots&2&0&0\\
\vdots&&\vdots&\vdots&\vdots\\
n-1&\cdots&0&0&0\\
0&\cdots&0&0&n
\end{vmatrix}\)。
-
\(\left|\begin{array}{cccccc}
\alpha&\beta&0&\cdots&0&0\\
0&\alpha&\beta&\cdots&0&0\\
\vdots&\vdots&\vdots&&\vdots&\vdots\\
0&0&0&\cdots&\alpha&\beta\\
\beta&0&0&\cdots&0&\alpha
\end{array}\right|\)。
解答.
-
原式
\(=(-1)^{\tau(2,3,\ldots,n,1)} n!=(-1)^{n-1}n!\)。
-
原式
\(=(-1)^{\tau(n-1,n-2,\ldots,1,n)}n!= (-1)^{\frac{(n-2)(n-1)}{2}}n!\)。
-
原式
\(=(-1)^{\tau(1,\ldots,n)} \alpha^n+(-1)^{\tau(2,\ldots,n,1)} \beta^n=\alpha^n+(-1)^{n-1} \beta^n\)。
9.
设
\(A\)是
\(n\) 阶复矩阵,证明:
\(\det \overline{A}=\overline{\det A}\)。
解答.
复数的共轭保持加法与乘法:
\begin{equation*}
\overline{z_1+z_2}=\overline{z_1}+\overline{z_2},\ \overline{z_1\cdot z_2}=\overline{z_1}\cdot \overline{z_2},
\end{equation*}
故
\begin{align*}
\overline{\det A}&=\overline{\sum\limits_{j_1,\ldots ,j_n}(-1)^{\tau(j_1,\ldots ,j_n)}a_{1j_1}\cdots a_{nj_n}} \\
&=\sum\limits_{j_1,\ldots ,j_n}(-1)^{\tau(j_1,\ldots ,j_n)}\overline{a_{1j_1}}\cdots \overline{a_{nj_n}} \\
&=\det \overline{A}.
\end{align*}
提高题.
10.
设
\begin{equation*}
f(x)=
\begin{vmatrix}
-4x & x & 1 & 2x\\
3 & x & -1 & 1\\
2 & 3 & -x & 1\\
1 & 1 & 1 & -2x
\end{vmatrix},
\end{equation*}
求\(f (x)\)中\(x^4\)与\(x^3\)的系数并说明理由。
解答.
\(4\)阶行列式展开式中,每一项都是取自不同行、不同列的
\(4\)个元素的乘积,而每一个元素的次数均
\(\le 1\),所以含
\(x^4\)项只能是
\(4\)个对角元对应的乘积项。因此
\(x^4\)的系数是
\(-8\)。
为了得到展开式中含\(x^3\)项,就应在三行中取含\(x\)的元素,在其余一行中取不含\(x\)的元素。从第\(1\)行开始考虑,
-
若取
\(a_{11}=-4x\),则第
\(2\)行只能取第
\(1\)列外的元素,即
\(x\)或
\(-1\)或
\(1\),无论取哪一个元素,都得不到含
\(x^3\)的项。
-
若取\(a_{12}=x\),则第\(2\)行取不到含\(x\)的元素,从而第\(3\)、\(4\)行都应取含\(x\)的元素,即取\(a_{33}=-x,a_{44}=-2x\),于是第\(2\)行只能取\(a_{21}=3\),这一项为
\begin{equation*}
(-1)^{\tau(2,1,3,4)}x\cdot 3\cdot (-x)\cdot (-2x)=-6x^3.
\end{equation*}
-
若取
\(a_{13}=1\),则第
\(3\)行取不到含
\(x\)的项,从而得不到含
\(x^3\)的项。
-
若取\(a_{14}=2x\),则第\(4\)行取不到含\(x\)的项,因此第\(2\)、\(3\)行都应取含\(x\)的项,即取\(a_{22}=x,a_{33}=-x\),于是第\(4\)行取\(a_{41}=1\),这一项为
\begin{equation*}
(-1)^{\tau(4,2,3,1)}2x\cdot x\cdot (-x)\cdot 1=2x^3.
\end{equation*}
因此\(f(x)\)中\(x^3\)项的系数为
\begin{equation*}
-6x^3+2x^3=-4x^3,
\end{equation*}
\(x^3\)项的系数为\(-4\)。
11.
设\(A=\left(a_{ij}\right)_{n\times n}\) 是 \(n\)阶方阵, \(x\)是未定元,
\begin{equation*}
f(x)=\det\left(xE_n-A\right),
\end{equation*}
证明: \(f(x)\)是一个首项系数为\(1\)的 \(n\)次多项式,且 \(n-1\) 次项系数为 \(-tr(A)\)。
解答.
\begin{equation*}
f(x)=\begin{vmatrix}
x-a_{11}&-a_{12}&\cdots&-a_{1n}\\
-a_{21}&x-a_{22}&\cdots&-a_{2n}\\
\vdots&\vdots&&\vdots\\
-a_{n1}&-a_{n2}&\cdots&-a_{nn}
\end{vmatrix},
\end{equation*}
上述\(n\)阶行列式展开式中,每一项都是取自不同行、不同列的\(n\)个元素的乘积,而每一个元素都是次数不超过\(1\)的多项式,所以展开式的每一项次数都不超过 \(n\),且 最高次项只能出自\(n\)个一次多项式的乘积项,即
\begin{equation*}
(x-a_{11})(x-a_{22})\cdots(x-a_{nn}).
\end{equation*}
因此\(f(x)\)是一个首项系数为\(1\)的 \(n\)次多项式。注意到行列式展开式中的其它项次数均小于等于 \(n-2\),所以 \(f(x)\)的 \(n-1\)次项也出自
\begin{equation*}
(x-a_{11})(x-a_{22})\cdots(x-a_{nn}),
\end{equation*}
故\(n-1\) 次项系数为
\begin{equation*}
-(a_{11}+a_{22}+\cdots+a_{nn})=-tr(A).
\end{equation*}
12.
设
\(A=\left(a_{ij}\right)_{n\times n},B=\left(b_{ij}\right)_{n\times n}\),其中
\(a_{ij},b_{ij}\)都是整数且奇偶性相同,证明:
\(\det A\)与
\(\det B\)奇偶性也相同。
解答.
因为\(a_{ij}\)与 \(b_{ij}\)奇偶性相同,所以 \(\det A\)与 \(\det B\)的展开式中对应每一项
\begin{equation*}
(-1)^{\tau(j_1,\ldots ,j_n)}a_{1,j_1}\cdots a_{n,j_n}
\end{equation*}
与
\begin{equation*}
(-1)^{\tau(j_1,\ldots ,j_n)}b_{1,j_1}\cdots b_{n,j_n}
\end{equation*}
奇偶性相同。因此
\begin{equation*}
\det A=\sum\limits_{j_1,\ldots ,j_n}(-1)^{\tau(j_1,\ldots ,j_n)}a_{1,j_1}\cdots a_{n,j_n}
\end{equation*}
与
\begin{equation*}
\det B=\sum\limits_{j_1,\ldots ,j_n}(-1)^{\tau(j_1,\ldots ,j_n)}b_{1,j_1}\cdots b_{n,j_n}
\end{equation*}
奇偶性相同。
13.
设
\(n\geq 2\),证明:如果
\(n\)阶矩阵
\(A\)的元素为
\(1\)或
\(-1\),那么
\(\det A\)必为偶数。
解答.
证法一:因\(A\)的元素为\(1\)或\(-1\),所以\(\det A\)展开式的每一项或为\(1\)或为\(-1\)。假设展开式中有\(k\)项\(1\),则\(-1\)有\(n!-k\)项。注意到\(n\geq 2\),故\(n!\)是偶数。因此
\begin{equation*}
\det A=1\cdot k+(-1)\cdot (n!-k)=2k-n!
\end{equation*}
是偶数。
证法二:记
\(B\)是元素全为
\(1\)的
\(n\)阶方阵,则
\(A\)和
\(B\)对应每个元素奇偶性相同。根据
练习 3.1.12,
\(\det A\)和
\(\det B\)奇偶性相同。由于
\(\det B=0\),因此
\(\det A\)必为偶数。
挑战题.
14.
设
\(A=\left(a_{ij}\right)_{3\times 3}\)是
\(3\)阶方阵,且
\(\left|a_{ij}\right|=1\),证明:
\(\left|\det A\right|\leq 4\)。
解答.
记
\begin{equation*}
b_1=a_{11}a_{22}a_{33},b_2=a_{12}a_{23}a_{31},b_3=a_{13}a_{21}a_{32},
\end{equation*}
\begin{equation*}
b_4=-a_{13}a_{22}a_{31},b_4=-a_{11}a_{23}a_{32},b_6=-a_{12}a_{21}a_{33},
\end{equation*}
则
\begin{equation}
\det A=b_1+b_2+b_3+b_4+b_5+b_6.\tag{3.1.1}
\end{equation}
因\(\left|a_{ij}\right|=1\),所以 \(|b_1|=\cdots=|b_6|=1\)且
\begin{equation*}
b_1b_2b_3b_4b_5b_6=-\prod\limits_{i=1}^3\prod\limits_{j=1}^3a_{ij}^2=-1.
\end{equation*}
这表明
\(b_1,\ldots ,b_6\)这
\(6\)个数至少有一个是
\(-1\),但不能全是
\(-1\),故
(3.1.1)的
\(6\)项中至少有两项抵消。因此
\begin{equation*}
-4\leq\det A\leq 4.
\end{equation*}
Sage相关.
15.
写一个函数,以自然数
\(n\)为输入,输出
\([n]=\{0,\ldots,n-1\}\)的所用排列(用列表表示排列)。
16.
写一个函数,以排列(列表)为输入,实现inversions()函数的功能。
17.
写一个函数,以排列(列表)
\(i_1,\ldots,i_n\)为输入,输出
\(j_1,\ldots,j_n\)。
18.
写一个函数,以排列(列表)为输入,实现is_even()函数的功能。
19.
写一个函数,以方阵为输入,利用展开式定义,输出矩阵行列式。比较新写的函数与sage自带det函数的运行时间,其中运行时间可以用类似下面的代码获得。