## 编译环境 操作系统 * [x ] Windows 10 * [ ] macOS * [ ] Linux `若需勾选,请把[ ]改成[x]` Tex发行版 * [ x] TexLive `年份` * [ ] MikTeX `版本号` * [ ] CTeX `若需勾选,请把[ ]改成[x]` ## 我的问题 向禹老师最近发布了一份张宇考研数学书籍latex模板,我很喜欢,就下载了源码试着编译了一下,结果出现下面的报错: >Runaway argument? \reserved@a :=widthof,heightof,depthof,totalheightof,maxof,minof\do {\ETC. ! File ended while scanning use of \@for. \par l.36 \RequirePackage {mhsetup}[2017/03/31] ? 请问这是怎回事?应该怎样解决呢? ``` \documentclass[openany]{ctexbook} \usepackage[centering, top=2.5cm,bottom=2.5cm,right=2.4cm,left=2.4cm, headsep=25pt,headheight=20pt]{geometry} \usepackage{newtxtext,newtxmath} \DeclareSymbolFont{CMlargesymbols}{OMX}{cmex}{m}{n} \let\sumop\relax\let\prodop\relax \DeclareMathSymbol{\sumop}{\mathop}{CMlargesymbols}{"50} \DeclareMathSymbol{\prodop}{\mathop}{CMlargesymbols}{"51} \usepackage{amsmath} \allowdisplaybreaks \usepackage{mathdots} % 提供副对角线\iddots命令 \usepackage{extarrows} % 提供长等于号 \usepackage{array,arydshln} \newcommand\xline{\mathord{ \begin{tikzpicture}[baseline = (a.base)] \node [inner sep=0pt] (a) {\phantom{N}}; \draw[dash pattern = on 1pt off 1pt](a.south)--(a.north); \end{tikzpicture} } } %-------------------------------------------- %----------------------------------------------------------定义选择题 \def\CA{A} \def\CB{B} \def\CC{C} \def\CD{D} %%------------------这么定义的目的是为了方便修改. \newcommand{\kh}{(\rule[-2pt]{0.6cm}{0pt})} \usepackage{ifthen} \newlength{\la} \newlength{\lb} \newlength{\lc} \newlength{\ld} \newlength{\lhalf} \newlength{\lquarter} \newlength{\lmax} \newcommand{\xx}[4]{\hfill\kh\\[.5pt]% \settowidth{\la}{\CA.#1~~~} \settowidth{\lb}{\CB.#2~~~} \settowidth{\lc}{\CC.#3~~~} \settowidth{\ld}{\CD.#4~~~} \ifthenelse{\lengthtest{\la>\lb}}{\setlength{\lmax}{\la}}{\setlength{\lmax}{\lb}} \ifthenelse{\lengthtest{\lc>\lmax}}{\setlength{\lmax}{\lc}}{} \ifthenelse{\lengthtest{\ld>\lmax}}{\setlength{\lmax}{\ld}}{} \setlength{\lhalf}{\dimexpr 0.5\linewidth-\parindent/2} \setlength{\lquarter}{\dimexpr 0.25\linewidth-\parindent/4} \ifthenelse{\lengthtest{\lmax>\lhalf}}{\indent \CA.#1 \\\indent \CB.#2 \\\indent \CC.#3 \\\indent \CD.#4}{ \ifthenelse{\lengthtest{\lmax>\lquarter}}{\hspace*{2em}\makebox[\lhalf][l]{\CA.#1~~~}% \makebox[\lhalf][l]{\CB.#2~~~}\\ \indent\makebox[\lhalf][l]{\CC.#3~~~}% \makebox[\lhalf][l]{\CD.#4~~~}}% {\hspace*{2em}\makebox[\lquarter][l]{\CA.#1~~~}% \makebox[\lquarter][l]{\CB.#2~~~}% \makebox[\lquarter][l]{\CC.#3~~~}% \makebox[\lquarter][l]{\CD.#4~~~}}}} %-------------------------------------------------------------------------- %-----------------------------------------字体选项 \setCJKmainfont[BoldFont={方正黑体简体},ItalicFont={方正楷体简体},Mapping=fullwidth-stop]{方正书宋简体} \defaultfontfeatures{Mapping=tex-text} \XeTeXlinebreaklocale ”zh” \XeTeXlinebreakskip = 0pt plus 1pt %\setmainfont{Times New Roman} %------------------------------------------------ \usepackage[perpage]{footmisc} \usepackage[colorlinks=true,linkcolor=blue,linktoc=all,pdfauthor={向禹}]{hyperref} %---------------------------------------定义常用符号 \let\bd\boldsymbol \def\ft#1{\fcolorbox{cyan}{white}{\text{#1}}} \def\VA{\bd A} \def\VB{\bd B} \def\VC{\bd C} \def\VD{\bd D} \def\VE{\bd E} \def\VO{\bd O} \def\VQ{\bd Q} \def\VP{\bd P} \def\ba{\bd \alpha} \def\bb{\bd \beta} \def\bg{\bd \gamma} \def\vx{\bd x} \def\vy{\bd y} \def\TT{^{\mathrm T}} \def\ba{\bd \alpha} \def\jian#1{{\color{cyan}#1}} \let\le\leqslant \let\ge\geqslant \usepackage[Symbol]{upgreek} \renewcommand{\pi}{\uppi}%%%直立pi \newcommand\kong[1][2]{\underline{\hspace{#1 cm}}} \newcommand\bline{\textcolor{cyan}{\,\rule[0.5ex]{3mm}{0.6pt}}\,} %-------------------------------------- \usepackage{pgfornament-han} %------------------------------------------章节格式设置 \usepackage[most]{tcolorbox} \usetikzlibrary{shapes.symbols,shapes.geometric} \def \mybox#1{ \begin{tikzpicture}[baseline=(a.base)] \node[inner ysep=0pt, inner xsep=2pt, cloud ,draw=cyan, aspect=4, cloud puffs=40, fill=cyan!20] (a) {#1}; \end{tikzpicture} } \robustify{\mybox} \newcommand\exercise{ \begin{center} \mybox{习题} \end{center}} \newcommand\answer{ \begin{center} \mybox{解析} \end{center}} \newcommand*\circled[2][circle]{\tikz[baseline=(char.base)]{ \node[draw,inner sep=0.1pt,minimum height=1em,#1] (char) {#2};}} \newcommand*\scircled[2][circle]{\tikz[baseline=(char.base)]{ \node[draw,inner sep=0.1pt,minimum size=0.5em,#1] (char) {$\scriptstyle #2$};}} \newcommand*\Circled[1]{\tikz[baseline=(char.base)]{ \node[draw,inner ysep=2pt,inner xsep=6pt, fill=cyan!20,rounded corners] (char) {#1};}} \def\mytitle#1{ \begin{tikzpicture}[baseline=(a.base),remember picture] \node(a){\color{blue}#1}; \fill[rounded corners,cyan!20] (a.north west)--(a.north east)--(a.south east)[sharp corners]--(a.south west)[bend right=40]to (a.north west)--cycle; \draw[rounded corners,cyan] (a.north west)--(a.north east)--(a.south east)--(a.south west); \node(a){\color{blue}#1}; \end{tikzpicture} } %------------------关于section编号的过度定制,只是为了和张宇的书一致,大家用的话不要用这个 \def\myshift#1{% \ifcase\value{#1}% 0mm \or0.76mm \or0.05mm \or-0.05mm \or0.05mm \or0mm \or0mm \or-0.05mm \fi} \def\shift{\myshift{section}} \def\mynumber#1{ \begin{tikzpicture}[baseline=(name.base),remember picture] \node (name) {\color{blue} #1}; \node at ([yshift=\shift]name.center) {\pgfornamenthan[scale=0.1,color=cyan!40]{51}}; \end{tikzpicture} } \renewcommand\thechapter{\arabic{chapter}} \renewcommand\thesubsection{\arabic{subsection}.} \renewcommand\thesubsubsection{(\arabic{subsubsection})} \setcounter{secnumdepth}{3} \setcounter{tocdepth}{1} \usepackage{tocloft} \renewcommand\cftsecaftersnum{、} %% 目录section编号后面加一个顿号 \renewcommand\contentsname{\centerline{ \Huge\CJKfontspec{华文行楷}目 录 }} \ctexset{ chapter={ name = {第,讲}, number = \arabic{chapter} }, section = { titleformat+ = \raggedright\mytitle, nameformat = \kern-0.4cm\protect\mynumber, aftername = \hskip-1.13em\relax, number = \chinese{section} }, subsection={ format = \Large\kern1.2em\color{cyan}\CJKfontspec{汉仪大宋简}, nameformat = \bfseries, aftername = \; }, subsubsection={ format = \bfseries\large\kern1.8em, aftername = \,, aftertitle = . }, punct=kaiming } \usepackage{fancyhdr} \usetikzlibrary{fadings} \pagestyle{fancy} \fancyhf{} \fancyfoot[RO]{\tikz {\node[draw,rounded corners,inner xsep=1em,scope fading = west,fill=cyan] {\thepage}; \node[rounded corners,inner xsep=1em] {\thepage}; }} \fancyfoot[LE]{\tikz {\node[draw,rounded corners,inner xsep=1em,scope fading = east,fill=cyan] {\thepage}; \node[rounded corners,inner xsep=1em] {\thepage}; }} \fancyhead[RO]{\leftmark} \fancyhead[LE]{\rightmark} \fancyhead[RE,LO]{\href{yuxtech.github.io}{我的博客:yuxtech.github.io}} \renewcommand\sectionmark[1]{% \markright{\CTEXifname{\CTEXthesection、}{}#1}} %-------------------------------------常用环境 \newcounter{prop} \counterwithin{prop}{chapter} \renewcommand\theprop{\arabic{prop}} \newcommand{\propname}{性质} \newenvironment{prop}{\par% \refstepcounter{prop}% \textbf{\propname\theprop}\label{prop\thechapter-\theprop}\quad }{\par} \newcounter{thm} \counterwithin{thm}{chapter} \renewcommand\thethm{\arabic{thm}} \newcommand{\thmname}{定理} \newenvironment{thm}{\par% \refstepcounter{thm}% \textbf{\thmname\thethm}\label{thm\thechapter-\thethm}\quad }{\par} \newcounter{example} \counterwithin{example}{chapter} \renewcommand\theexample{\thechapter.\arabic{example}} \newcommand{\examplename}{例} \newenvironment{example}{\par% \refstepcounter{example}% \Circled{\textbf{\examplename\theexample}\label{ex\thechapter-\arabic{example}}} }{\par} \newcounter{method} \counterwithin{method}{example} \renewcommand\themethod{方法\chinese{method}} \def\method{\par\refstepcounter{method}\textbf{\themethod} \label{ex\thechapter-\arabic{example}-\arabic{method}}\quad} \usepackage{manfnt} \newenvironment{note}{\parskip=0.5ex\par\noindent\begin{tcolorbox}[sharp corners,boxrule=0.4pt,colframe=cyan,left=0.65cm,breakable,enhanced] 【\textbf{注}】} {\end{tcolorbox}\par} \newenvironment{solution} {\textcolor{cyan}{【\textbf{解}】}} {\par} \newenvironment{proof} {\textcolor{cyan}{【\textbf{证}】}} {\par} \newenvironment{analysis} {\textcolor{cyan}{【\textbf{分析}】}} {\par} %-------------------------------------------------------------- %---------------------------------------------定义习题环境与答案环境,建立习题与答案交叉引用,但是这里仅限于题目和答案在同一章,如果需要最后统一输出答案,输出第X章答案前,需要\setcounter{chapter}{X}。更好的方式是用我的博客上的方法 https://yuxtech.github.io/2020/04/15/QandA/ \newcounter{xiti} \counterwithin{xiti}{chapter} \renewcommand\thexiti{\thechapter.\arabic{xiti}} \newenvironment{xiti}{\par% \refstepcounter{xiti}% \Circled{\hyperlink{ans\thechapter-\arabic{xiti}}{\textbf{\thexiti}}} \hypertarget{xiti\thechapter-\arabic{xiti}}{} }{\par} \newcounter{ans} \counterwithin{ans}{chapter} \renewcommand\theans{\thechapter.\arabic{ans}} \newenvironment{ans}{\par% \refstepcounter{ans}% \Circled{\hyperlink{xiti\thechapter-\arabic{ans}}{\textbf{\theans}}} \hypertarget{ans\thechapter-\arabic{ans}}{} }{\par} \newcounter{amethod} \counterwithin{amethod}{ans} \renewcommand\theamethod{方法\chinese{amethod}} \def\amethod{\refstepcounter{amethod}\textbf{\theamethod} \label{ex\thechapter-\arabic{ans}-\arabic{amethod}}\quad} \usepackage[inline]{enumitem} \setlist{nosep} %------------------------------英文分号和冒号转化为中文分号 \catcode`\;=13 \newcommand{;}{\text{;}} \catcode`\:=13 \newcommand{:}{\text{:}} %------------------------------修改公式编号 \usepackage{mathtools} \newtagform{circle}{}{} \usetagform{circle} \renewcommand\theequation{\circled{\arabic{equation}}} \DeclareMathOperator\tr{tr} \begin{document} \begin{titlepage}\definecolor{zy}{RGB}{78,81,125} \begin{tikzpicture}[remember picture,overlay] \fill[color=zy](current page.south east)rectangle (current page.north west); \node[white,scale=0.3,anchor=north] (a) at ([shift={(2,-1.7)}]current page.north west){ \begin{tikzpicture}[line width=4pt,line cap=round] \draw[rounded corners=0.1cm] (0,0) rectangle (2.2,3); \draw[rounded corners=0.05cm] (0.4,1.6) -- (0.4, 0.5) -- (1.8,0.5) -- (1.8,1.6) -- (1,1.6) -- (1,1); \draw (0.4,2.1) -- (1.8,2.1) (0.4,2.5) -- (1.8,2.5); \end{tikzpicture} }; \node(b)[right=2mm,align=left,white,scale=1.5]at (a) {\scalebox{1}[1.3]{云图}\\[-3.4mm]\scalebox{0.5}{YUN\,TU}}; \node[right=6.5mm,scale=1.7,draw,rounded corners,fill=white]at(b){\phantom{2021版}}; \node[right=8mm,scale=1.5,draw,rounded corners,fill=white]at(b){2021版}; \node[text width=1em,anchor=north,white,scale=2,align=center,font=\CJKfontspec{汉仪大宋简}] at([shift={(-1.5,-1.5)}]current page.north east) {张\\[-2mm]宇\\[-2mm]数\\[-2mm]学\\[-2mm]教\\[-2mm] 育\\[-2mm]系\\[-2mm]列\\[-2mm]丛\\[-2mm]书\\[-2mm]\textbullet\\[-2mm] 二}; \node[anchor=north east] at ([shift={(-3,-1.5)}]current page.north east) {\begin{tikzpicture} \node(c)[draw=zy,align=center,font=\CJKfontspec{汉仪大宋简},scale=5,fill=white,inner xsep=2mm, inner ysep=3mm] {张\\[-2mm]宇\\[-2mm]线\\[-2mm]性\\[-2mm]代\\[-2mm]数\\[-2mm] 9\\[-2mm] 讲}; \node(b)[xscale=0.9,yscale=0.98]{\tikz\draw[color=zy,line width=3pt](c.south west)rectangle (c.north east);}; \node[xscale=0.85,yscale=0.97,anchor=center]at(b){\tikz\draw[color=zy,line width=1pt](c.south west)rectangle (c.north east);}; \node[left=2mm,anchor=south east,text=white,align=center,scale=2] at(c.south west) {\tikz\draw[line width=1pt] circle(0.4\ccwd);\\主\\[-2mm]编\\张\\[-2mm]宇}; \end{tikzpicture} }; \node[align=center,anchor=south west,text=white,font=\CJKfontspec{华文行楷},scale=3] at ([shift={(2,1.7)}]current page.south west) {高\\[-2mm]等\\[-2mm]教\\[-2mm]育\\[-2mm]出\\[-2mm]版\\[-2mm]社}; \end{tikzpicture} \end{titlepage} %\tableofcontents % 不想用下面的盒子风格输出目录的话就用原来的目录命令 \begin{tcolorbox}[enhanced,title=目\quad 录,sharp corners,breakable, colframe=blue!50!black,colback=blue!10!white,colbacktitle=blue!5!yellow!10!white, fonttitle=\bfseries,coltitle=black,attach boxed title to top center= {yshift=-0.25mm-\tcboxedtitleheight/2,yshifttext=2mm-\tcboxedtitleheight/2}, boxed title style={boxrule=0.5mm, frame code={ \path[tcb fill frame] ([xshift=-4mm]frame.west) -- (frame.north west) -- (frame.north east) -- ([xshift=4mm]frame.east) -- (frame.south east) -- (frame.south west) -- cycle; }, interior code={ \path[tcb fill interior] ([xshift=-2mm] interior.west) -- (interior.north west) -- (interior.north east) --([xshift=2mm] interior.east) -- (interior.south east) -- (interior.south west) --cycle;} }] \makeatletter \@starttoc{toc} \makeatother \end{tcolorbox} \setcounter{chapter}{1} \chapter{余子式和代数余子式的计算\label{chap2}} \mybox{知识结构} \vskip\baselineskip \[ \begin{cases} \ft{行列式}\bline k_1A_{i1}+k_2A_{i2}+\cdots+k_nA_{in}=\smash[t]{\begin{vmatrix} \ast\\ k_1\quad k_2\quad \cdots \quad k_n\\ \ast \end{vmatrix}} \\ \ft{用矩阵}\bline |\VA|\ne0时, \VA^\ast=|\VA|\VA^{-1}\\ \ft{用特征值}\bline \begin{aligned}[t] &\text{设$\VA$为3阶矩阵,当$\VA$可逆时,记其特征值为$\lambda_1,\lambda_2,\lambda_3$,}\\ &\quad \text{则}A_{11}+A_{22}+A_{33}=\lambda_2\lambda_3+\lambda_1\lambda_3+\lambda_1\lambda_2 \end{aligned}\\ \ft{求余子式的问题}\bline M_{ij}=(-1)^{i+j}A_{ij} \end{cases} \] \section{用行列式} \begin{flalign} &\qquad\text{由}& a_{i1}A_{i1} + a_{i2}A_{i2}+\cdots+a_{in}A_{in} = \begin{vmatrix} \ast\\ a_{i1}\quad a_{i2} \quad \cdots \quad a_{in}\\ \ast \end{vmatrix},&&\label{eq2.1}\\ \text{则}&& k_1A_{i1}+k_2A_{i2}+\cdots+k_nA_{in}=\begin{vmatrix} \ast\\ k_1\quad k_2\quad \cdots \quad k_n\\ \ast \end{vmatrix},&&\label{eq2.2} \end{flalign} 其中$\ast$处表示元素不变, \ref{eq2.1}, \ref{eq2.2} 的区别仅仅在于第$i$行的元素$a_{i1},a_{i2},\cdots,a_{in}$换成了$k_1,k_2,\cdots,k_n$,这样,给出不同的系数$k_1,k_2,\cdots,k_n$,即得到了不同的行列式.而若要求$k_1M_{i1}+k_2M_{i2}+\cdots+k_nM_{in}$,只需用$M_{ij}=(-1)^{i+j}A_{ij}$化为关于$A_{ij}$的线性组合即可. \jian{见例 \ref{ex2-1},例 \ref{ex2-2}.} \section{用矩阵} \textcolor{cyan}{(与第 \ref{chap3} 讲综合,考生需学习相关知识后再研读此点)} 当$|\VA|\ne0$时, $\VA^\ast=|\VA|\VA^{-1}$. 由于$\VA^\ast$由$A_{ij}$组成,求出$\VA^\ast$,即得到所有的$A_{ij}$,但要注意,此方法要求$|\VA|\ne0$,这是前提,也是一种限制. \jian{见例 \ref{ex2-3},例 \ref{ex2-4}.} \section{用特征值} \textcolor{cyan}{(与第 \ref{chap7} 讲综合,考生需学习相关知识后再研读此点)} 设$\VA$为3阶矩阵,当$\VA$为可逆矩阵时,记其特征值为$\lambda_1,\lambda_2,\lambda_3$.则$\VA^{-1}$的特征值为$\lambda_1^{-1},\lambda_2^{-1},\lambda_3^{-1}$,且由$\VA^\ast=|\VA|\VA^{-1}=\lambda_1\lambda_2\lambda_3\VA^{-1}$,可知$\VA^\ast$的特征值为 \[ \lambda_1^\ast=\lambda_1\lambda_2\lambda_3 \cdot\lambda_1^{-1}=\lambda_2\lambda_3, \lambda_2^\ast=\lambda_1\lambda_2\lambda_3 \cdot\lambda_2^{-1}=\lambda_1\lambda_3, \lambda_3^\ast=\lambda_1\lambda_2\lambda_3 \cdot\lambda_3^{-1}=\lambda_1\lambda_2, \] \begin{flalign*} \text{故由} & & \VA^\ast = \begin{bmatrix} A_{11} & A_{21} & A_{31}\\ A_{12} & A_{22} & A_{32}\\ A_{13} & A_{23} & A_{33} \end{bmatrix}&& \end{flalign*} 知$A_{11}+A_{22}+A_{33}=\tr(\VA^\ast)=\lambda_1^\ast+\lambda_2^\ast+\lambda_3^\ast=\lambda_2\lambda_3 +\lambda_1\lambda_3+\lambda_1\lambda_2$. 这公式易记,好用,考生应熟知. \jian{见例 \ref{ex2-5},例 \ref{ex2-6}.} \section{求余子式的问题} 由于$M_{ij}=(-1)^{i+j}A_{ij}$,故先求出$A_{ij}$,乘以$(-1)^{i+j}$即可. \begin{example} 设 \[ D_n = \begin{vmatrix} 1 & 2 & 3 & \cdots & n\\ 1 & 2 & 0 & \cdots & 0\\ 1 & 0 & 3 & \cdots & 0\\ \vdots & \vdots & \vdots & & \vdots\\ 1 & 0 & 0 & \cdots & n \end{vmatrix}, \] 求$A_{11}+A_{12}+\cdots +A_{1n}$. \end{example} \begin{solution} \begin{align*} A_{11}+A_{12}+\cdots+A_{1n} & =\begin{vmatrix} 1 & 1 & 1 & \cdots & 1\\ 1 & 2 & 0 & \cdots & 0\\ 1 & 0 & 3 & \cdots & 0\\ \vdots & \vdots & \vdots & & \vdots \\ 1 & 0 & 0 & \cdots &n \end{vmatrix}\\ & = \begin{vmatrix} 1-\sum_{i=2}^n\frac1i & 1 & 1 & \cdots & 1\\ 0 & 2 & 0 & \cdots & 0\\ 0 & 0 & 3 & \cdots & 0\\ \vdots & \vdots & \vdots & & \vdots \\ 0 & 0 & 0 & \cdots &n \end{vmatrix}\\ & = \Big( 1-\sum_{i=2}^n\frac1i \Big)\cdot n!. \end{align*} \end{solution} \begin{example} 已知5阶行列式 $D_5=\begin{vmatrix} 1 & 2 & 3 & 4 & 5\\ 2 & 2 & 2 & 1 & 1\\ 3 & 1 & 2 & 4 & 5\\ 1 & 1 & 1 & 2 & 2\\ 4 & 3 & 1 & 5 & 0 \end{vmatrix} = 27$. 求$A_{41}+A_{42}+A_{43}$及$A_{44}+A_{45}$. \end{example} \begin{solution} \hfil $(A_{41}+A_{42}+A_{43}) + 2(A_{44}+A_{45}) = D_5 =27$, \hfill \begin{flalign*} \text{又}&& 2(A_{41}+A_{42}+A_{43}) + (A_{44}+A_{45}) = \begin{vmatrix} 1 & 2 & 3 & 4 & 5\\ 2 & 2 & 2 & 1 & 1\\ 3 & 1 & 2 & 4 & 5\\ 2 & 2 & 2 & 1 & 1\\ 4 & 3 & 1 & 5 & 0 \end{vmatrix} = 0, && \end{flalign*} 联立上式解得 \[ A_{41}+A_{42}+A_{43}=-9, A_{44}+A_{45}=18. \] \end{solution} \begin{example} 设 $n$ 阶行列式 \[ |\VA| = \begin{vmatrix} 2 & 0 & 0 & \cdots & 0\\ 2 & 2 & 0 & \cdots & 0\\ 2 & 2 & 2 & \cdots & 0\\ 2 & 2 & 2 & \cdots & 0\\ 2 & 2 & 2 & \cdots & 2 \end{vmatrix}_n. \] 求\begin{enumerate*}[label=(\arabic*),itemjoin=\\] \item $|\VA|$中所有元素$a_{ij}$的代数余子式$A_{ij}$之和$\sum_{i=1}^n\sum_{j=1}^nA_{ij}$; \item $A_{11}+A_{22}+\cdots+A_{nn}$; \item $A_{k1}+A_{k2}+\cdots+A_{kn}(k=1,2,\cdots,n)$. \end{enumerate*} \end{example} \begin{solution} \[ \VA = \begin{bmatrix} 2 & 0 & 0 & \cdots & 0\\ 2 & 2 & 0 & \cdots & 0\\ 2 & 2 & 2 & \cdots & 0\\ 2 & 2 & 2 & \cdots & 0\\ 2 & 2 & 2 & \cdots & 2 \end{bmatrix}, \] $|\VA|=2^n\ne0$,故$\VA$可逆,且 \[ \VA^\ast=|\VA|\VA^{-1}=2^n\VA^{-1}. \] 由 $[\VA \xline\VE]\xlongrightarrow{\text{初等行变换}}[\VE \xline\VA^{-1}]$,有 \begin{align*} [\VA \xline \VE] & = \left[ \begin{array}{@{}ccccc:ccccc@{}} 2 & 0 & 0 & \cdots & 0 & 1 & 0 & 0 & \cdots & 0 \\ 2 & 2 & 0 & \cdots & 0 & 0 & 1 & 0 & \cdots & 0 \\ 2 & 2 & 2 & \cdots & 0 & 0 & 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \vdots & & \cdots & \vdots & \vdots & \vdots & & \cdots \\ 2 & 2 & 2 & \cdots & 2 & 0 & 0 & 0 & \cdots & 1 \end{array}\right]\\ &\to \left[ \begin{array}{@{}ccccc:ccccc@{}} 1 & 0 & 0 & \cdots & 0 & \frac12 & 0& 0 & \cdots & 0 \\ 0 & 1 & 0 & \cdots & 0 & -\frac12 & \frac12 & 0 & \cdots & 0 \\ 0 & 0 & 1 & \cdots & 0 & 0 & -\frac12 & \frac12 & \cdots & 0 \\ \vdots & \vdots & \vdots & & \cdots & \vdots & \vdots & \vdots & & \cdots \\ 0 & 0 & 0 & \cdots & 1 & 0 & 0 & 0 & \cdots & \frac12 \end{array} \right] \end{align*} 即 \begin{align*} \VA^\ast & = \begin{bmatrix} A_{11} & A_{21} & \cdots & A_{n1}\\ A_{12} & A_{22} & \cdots & A_{n2}\\ \vdots & \vdots & & \vdots\\ A_{1n} & A_{2n} & \cdots & A_{nn} \end{bmatrix}\\ & = 2^n\VA^{-1} = 2^n \begin{bmatrix} \frac12 & 0& 0 & \cdots & 0 & 0 \\ -\frac12 & \frac12 & 0 & \cdots & 0 & 0 \\ 0 & -\frac12 & \frac12 & \cdots & 0 & 0\\ \vdots & \vdots & \vdots & & \cdots & \vdots \\ 0 & 0 & 0 & \cdots & \frac12 & 0 \\ 0 & 0 & 0 & \cdots & -\frac12 & \frac12 \end{bmatrix}. \end{align*} 故有 \begin{enumerate*}[label=(\arabic*),itemjoin=\\] \item $\sum_{i=1}^n\sum_{j=1}^nA_{ij}=2^n\big[n\cdot\frac12 + (n-1)\cdot \big( -\frac12 \big)\big]=2^{n-1}$. \item $\sum_{i=1}^nA_{ii}=2^n\cdot n\cdot\frac12 = 2^{n-1}\cdot n$. \item 当$k=1,2,\cdots,n-1$时, \end{enumerate*} \[ A_{k1}+A_{k2}+\cdots+A_{kn} = 2^n\Big( \frac12-\frac12 \Big) = 0. \] 当$k=n$时, $A_{n1}+A_{n2}+\cdots+A_{nn}=2^n\cdot\frac12=2^{n-1}$. \end{solution} \begin{example} 已知3阶行列式$|\VA|$的元素$a_{ij}$均为实数,且$a_{ij}$不全为0.若 \[ a_{ij} = -A_{ij}(i,j=1,2,3), \] 其中$A_{ij}$是$a_{ij}$的代数余子式. 则$|\VA|=$\kong. \end{example} \begin{solution} 应填$-1$. 由$a_{ij}=-A_{ij}$有$\VA^\ast=-\VA\TT$. 于是 \[ \VA\VA^\ast = -\VA\VA\TT. \] 又$\VA\VA^\ast=|\VA|\VE$,故 \[ \VA\VA\TT = -|\VA|\VE. \] 两边取行列式得 \[ |\VA||\VA\TT| = -|\VA|^3,\,\text{即}\,|\VA|^2=-|\VA|^3, \] 也即 \begin{equation}\label{ex2.1} |\VA|^2 (|\VA|+1) = 0. \tag{($\ast$)} \end{equation} 由$a_{ij}$不全为0知,存在$a_{kj}\ne0$,将行列式$|\VA|$ 按第$k$行展开得 \begin{align*} |\VA| & = a_{k1}A_{k1} + a_{k2}A_{k2} + a_{k3}A_{k3}\\ & = -a_{k1}^2 -a_{k2}^2-a_{k3}^2 < 0. \end{align*} 故由 \eqref{ex2.1}, $|\VA|=-1$. \end{solution} \begin{example} 设$\VA=\begin{bmatrix} a_{11} & 1 & a_{13}\\ a_{21} & 1 & a_{23}\\ a_{31} & 1 & a_{33} \end{bmatrix}$,已知$\VA$的特征值是$2,1$,求$A_{11}A_{23}-A_{21}A_{13}$. \end{example} \begin{solution} 由题设 \begin{gather*} |\VA| = 2\times 1\times (-1) = -2,\\ |\VA^\ast| = |\VA|^2 = 4. \end{gather*} 由$\VA = \begin{bmatrix} a_{11} & 1 & a_{13}\\ a_{21} & 1 & a_{23}\\ a_{31} & 1 & a_{33} \end{bmatrix}$,有 \begin{align*} & A_{11}+A_{21}+A_{31} = \begin{vmatrix} 1 & 1 & a_{13} \\ 1 & 1 & a_{23}\\ 1 & 1 & a_{33} \end{vmatrix} = 0,\\ & A_{12}+A_{22}+A_{32} = \begin{vmatrix} a_{11} & 1 & a_{13}\\ a_{21} & 1 & a_{23}\\ a_{31} & 1 & a_{33} \end{vmatrix} = -2,\\ &A_{13}+A_{23}+A_{33} = \begin{vmatrix} a_{11} & 1 & 1\\ a_{21} & 1 & 1 \\ a_{31} & 1 & 1 \end{vmatrix} = 0. \end{align*} 故 \begin{align*} |\VA^\ast| & = \begin{vmatrix} A_{11} & A_{21} & A_{31} \\ A_{12} & A_{22} & A_{32} \\ A_{13} & A_{23} & A_{33} \end{vmatrix} = \begin{vmatrix} A_{11} & A_{21} & A_{11}+A_{21}+A_{31}\\ A_{12} & A_{22} & A_{12}+A_{22}+A_{32}\\ A_{13} & A_{23} & A_{13}+A_{23}+A_{33} \end{vmatrix}\\ & = \begin{vmatrix} A_{11} & A_{21} & 0 \\ A_{12} & A_{22} & -2 \\ A_{13} & A_{23} & 0 \end{vmatrix} = - (-2) \begin{vmatrix} A_{11} & A_{21} \\ A_{13} & A_{23} \end{vmatrix}. \end{align*} 于是 \[ A_{11}A_{23} - A_{21}A_{13} = 2. \] \end{solution} \begin{example} 已知3阶方阵$\VA$的特征值为$-1,2,3$. 求$\VA$的行列式$|\VA|$中元素$a_{11},a_{22},a_{33}$的代数余子式的和$A_{11}+A_{22}+A_{33}$. \end{example} \begin{solution} \hfil $|\VA|=-1\times2\times3=-6\ne0$, \hfill \noindent 故$\VA$可逆,且$\VA^\ast=|\VA|\VA^{-1}=-6\VA^{-1}.\VA^{-1}$的特征值为$-1,\frac12,\frac13,\VA^\ast=-\VA^{-1}$的3个特征值为 \begin{gather*} \lambda_1^\ast = (-6)\times(-1)=6,\lambda_2^\ast=(-6)\times\frac12=-3,\\ \lambda_3^\ast = (-6)\times\frac13=-2. \end{gather*} \begin{flalign*} \text{故} && A_{11}+A_{22}+A_{33} & =\tr(\VA^\ast) =\lambda_1^\ast +\lambda_2^\ast +\lambda_3^\ast\\ && & = 6 - 3 - 2 =1. && \end{flalign*} \end{solution} \exercise \begin{xiti} 设 \[ |\VA| = \begin{vmatrix} 2 & 1 & -3 & 5\\ 1 & 1 & 1 & 2 \\ 4 & 2 & 3 & 1 \\ 2 & 5 & 1 & 3 \end{vmatrix}, \] 计算$A_{41}+A_{42}+A_{43}+A_{44}$,其中$A_{ij}$是元素$a_{ij}(j=1,2,3,4)$ 的代数余子式. \end{xiti} \begin{xiti} 设 \[ |\VA| = \begin{vmatrix} 2 & 2 & 2 & 2 \\ a_{11} & a_{22} & a_{23} & a_{24}\\ a_{31} & a_{32} & a_{33} & a_{34}\\ a_{41} & a_{42} & a_{43} & a_{44} \end{vmatrix} = a, \] 计算$\sum_{i=1}^4\sum_{j=1}^4A_{ij}$. \end{xiti} \begin{xiti} 设$n$阶行列式 \[ D_n = \begin{vmatrix} x & a & \cdots & a\\ a & x & \cdots & a\\ \vdots & \vdots & & \vdots\\ a & a & \cdots & x \end{vmatrix}, \] $A_{ij}$是$D_n$中元素$a_{ij}(i,j=1,2,\cdots,n)$的代数余子式,求$D_n$的全部代数余子式之和. \end{xiti} \begin{xiti} 证明:若行列式的某行元素全为$k(k\ne0)$,则这个行列式的全部代数余子式之和为该行列式值的$\frac1k$倍,即 $\sum_{i=1}^n\sum_{j=1}^nA_{ij}=\frac1k|\VA|$. \end{xiti} \begin{xiti} 设$\VA$是$n(n>2)$阶非零实矩阵, $A_{ij}$是$|\VA|$中元素$a_{ij}$的代数余子式,且 \[ a_{ij}=A_{ij}(i,j=1,2,\cdots,n). \] 证明$|\VA|=1$. \end{xiti} \answer \begin{ans} \begin{analysis} $A_{4j}$是第4行元素$a_{4j}(j=1,2,3,4)$的代数余子式,其值只与第$1,2,3$行元素有关,与第4行元素无关. \end{analysis} \begin{solution} 将$|\VA|$中第4行元素依次换为$1,1,1,1$,并不改变$A_{4j}(j=1,2,3,4)$的大小,有 \begin{align*} A_{41}+A_{42}+A_{43}+A_{44} & =1\cdot A_{41}+1\cdot A_{42}+1\cdot A_{43}+1\cdot A_{44}\\ & = \begin{vmatrix} 2 & 1 & -3 & 5\\ 1 & 1 & 1 & 2\\ 4 & 2 & 3 & 1\\ 1 & 1 & 1 & 1 \end{vmatrix} \xlongequal{\scircled{2}-\scircled{4}} \begin{vmatrix} 2 & 1 & -3 & 5\\ 0 & 0 & 0 & 1\\ 4 & 2 & 3 & 1\\ 1 & 1 & 1 & 1 \end{vmatrix}\\ & = (-1)^{2+4}\begin{vmatrix} 2 & 1 & -3 \\4 & 2 & 3\\ 1 & 1 & 1 \end{vmatrix} \xlongequal[{[3]-[1]}]{[2]-[1]} \begin{vmatrix} 2 & -1 & -5\\4 & -2 & -1\\1 & 0 & 0 \end{vmatrix}=1-10=-9. \end{align*} \end{solution} \end{ans} \begin{ans} \begin{solution} \begin{align*} \sum_{i=1}^4\sum_{j=1}^4A_{ij} = {}& A_{11}+A_{12}+A_{13}+A_{14}+A_{22}+A_{23}+A_{24}\\ & A_{31}+A_{32}+A_{33}+A_{34}+A_{41}+A_{42}+A_{43}+A_{44}+\\ ={}&\frac12(2A_{11}+2A_{12}+2A_{13}+2A_{14}) +\frac12(A_{21}+2A_{22}+2A_{23}+2A_{24})+\\ & \frac12(2A_{31}+2A_{32}+2A_{33}+2A_{34}) +\frac12(2A_{41}+2A_{42}+2A_{43}+2A_{44})\\ ={}&\frac a2+0+0+0=\frac a2. \end{align*} \begin{note} 本题若命制成“设$|\VA|$的某行元素全为2,且$|\VA|=a$,计算$\sum_{i=1}^4\sum_{j=1}^4A_{ij}$”估计会增加一些难度,但解法和过程与本题完全一样,只不过要求读者多写一句“不妨设$|\VA|$的第一行元素全为2”即可.应对考试,读者一定要多从命题人的角度出发,想想看如何“变着花样”出题(例如习题 \hyperlink{xiti2-4}{2.4},知己知彼,才是科学的复习策略. \end{note} \end{solution} \end{ans} \begin{ans} $\sum_{j=1}^nA_{1j} = \begin{vmatrix} 1 & 1 & \cdots & 1\\ a & x & \cdots & a\\ \vdots & \vdots & & \vdots\\ a & a & \cdots & x \end{vmatrix}= \begin{vmatrix} 1 & 1 & \cdots & 1\\ 0 & x-a & \cdots & 0\\ \vdots & \vdots & & \vdots\\ 0 & 0 & \cdots & x-a \end{vmatrix}=(x-a)^{n-1}, $ \[ \sum_{j=1}^nA_{2j} = \begin{vmatrix} x & a & a & \cdots & a\\ 1 & 1 & 1 & \cdots & 1\\ a & a & x & \cdots & a\\ \vdots & \vdots & \vdots & & \vdots\\ a & a & a & \cdots & x \end{vmatrix} = \begin{vmatrix} x-a & 0 & 0 & \cdots & 0\\ 1 & 1 & 1 & \cdots & 1\\ 0 & 0 & x-a & \cdots & 0\\ \vdots & \vdots & \vdots & & \vdots\\ 0 & 0 & 0 & \cdots & x-a \end{vmatrix} = (x-a)^{n-1}. \] 同理, $\sum_{j=1}^nA_{ij}=(x-a)^{n-1},i=3,4,\cdots,n$. 故$\sum_{i=1}^n\sum_{j=1}^nA_{ij}=n(x-a)^{n-1}$. \end{ans} \begin{ans} 不失一般性,设 \[ |\VA|=\begin{vmatrix} k & k & \cdots &k\\ a_{11} & a_{22} & \cdots &a_{2n}\\ \vdots & \vdots & &\vdots\\ a_{n1} & a_{n2} & \cdots &a_{nn} \end{vmatrix} = k \begin{vmatrix} 1 & 1 & \cdots & 1\\ a_{21} & a_{22} & \cdots & a_{2n}\\ \vdots & \vdots & &\vdots\\ a_{n1} & a_{n2} & \cdots &a_{nn} \end{vmatrix} = k\sum_{j=1}^nA_{1j}, \] 且$\sum_{j=1}^nA_{ij}=0,i=2,3,\cdots,n$. 故$\sum_{i=1}^n\sum_{j=1}^nA_{ij}=\frac1k|\VA|$. \end{ans} \begin{ans} \begin{proof} 由于$\VA\ne\VO$,不妨设$a_{11}\ne0$,则 \begin{gather*} |\VA| = \sum_{j=1}^na_{1j}A_{1j} = \sum_{j=1}^na_{1j}^2 >0 (A_{ij}=a_{ij},i,j=1,2,\cdots,n).\\ \begin{aligned} \begin{bmatrix} |\VA| & 0 & \cdots & 0\\ 0 & |\VA| & \cdots & 0\\ \vdots & \vdots & & \vdots\\ 0 & 0 & \cdots & |\VA| \end{bmatrix} & = \begin{bmatrix} a_{11} & a_{12} & \cdots &a_{1n}\\ a_{11} & a_{22} & \cdots &a_{2n}\\ \vdots & \vdots & &\vdots\\ a_{n1} & a_{n2} & \cdots &a_{nn} \end{bmatrix} \begin{bmatrix} A_{11} & A_{21} & \cdots &A_{n1}\\ A_{12} & A_{22} & \cdots &A_{n2}\\ \vdots & \vdots & &\vdots\\ A_{1n} & A_{2n} & \cdots &A_{nn} \end{bmatrix}\\ & = \begin{bmatrix} a_{11} & a_{12} & \cdots &a_{1n}\\ a_{11} & a_{22} & \cdots &a_{2n}\\ \vdots & \vdots & &\vdots\\ a_{n1} & a_{n2} & \cdots &a_{nn} \end{bmatrix} \begin{bmatrix} a_{11} & a_{21} & \cdots &a_{n1}\\ a_{12} & a_{22} & \cdots &a_{n2}\\ \vdots & \vdots & &\vdots\\ a_{1n} & a_{2n} & \cdots &a_{nn} \end{bmatrix} = \VA\VA\TT, \end{aligned} \end{gather*} 两边取行列式,得 \[ \begin{vmatrix} |\VA| & 0 & \cdots & 0\\ 0 & |\VA| & \cdots & 0\\ \vdots & \vdots & & \vdots\\ 0 & 0 & \cdots & |\VA| \end{vmatrix} = |\VA|^n = |\VA\VA\TT|=|\VA|^2, \] 故$|\VA|^2(|\VA|^{n-2}-1)=0$,又$|\VA|>0$,则$|\VA|^{n-2}=1$,得$|\VA|=1$ ($\VA$是实矩阵, $|\VA|$ 是实数,且$|\VA|>0$,舍去$-1$). \end{proof} \end{ans} \end{document} ```

1 回答1

16
把 ```tex %------------------------------英文分号和冒号转化为中文分号 \catcode`\;=13 \newcommand{;}{\text{;}} \catcode`\:=13 \newcommand{:}{\text{:}} ``` 改成 ```tex %------------------------------英文分号和冒号转化为中文分号 \begingroup \catcode`\;=13 \gdef;{\text{;}} \catcode`\:=13 \gdef:{\text{:}} \endgroup \mathcode`\;="8000 \mathcode`\:="8000 ```
  • 谢谢您的解答,对我很有帮助! – 学忠 2020-07-08 10:27 回复

你的回答

请登录后回答

你的回答将会帮助更多人,请务必认真回答问题。