【线性代数】二次型

文章内容

  • 二次型及其标准型
  • 配方法
  • 正/负定二次型

二次型及其标准型

什么是二次型和其标准型

定义:数域K上的一个n元二次型是系数在K中的n个变量的二次齐次多项式

一般形式: <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x 1 , x 2 , ⋯   , x n ) = ( a 11 x 1 2 + 2 a 12 x 1 x 2 + 2 a 13 x 1 x 3 + ⋯ + 2 a 1 n x 1 x n ) + ( a 22 x 1 2 + 2 a 23 x 2 x 3 + ⋯ + 2 a 2 n x 2 x n ) + ⋯ + a n n x n 2 f(x_1,x_2,\cdots,x_n)=(a_{11}x_1^2+2a_{12}x_1x_2+2a_{13}x_1x_3+\cdots+2a_{1n}x_1x_n)+(a_{22}x_1^2+2a_{23}x_2x_3+\cdots+2a_{2n}x_2x_n)+\cdots+a_{nn}x_n^2 </math>f(x1,x2,⋯,xn)=(a11x12+2a12x1x2+2a13x1x3+⋯+2a1nx1xn)+(a22x12+2a23x2x3+⋯+2a2nx2xn)+⋯+annxn2

观察易得,这个式子里面未知数仅由 <math xmlns="http://www.w3.org/1998/Math/MathML"> x i 2 x_i^2 </math>xi2 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> x i x j x_ix_j </math>xixj 组成

对于一个二次型 <math xmlns="http://www.w3.org/1998/Math/MathML"> a x 2 + b x y + c y 2 = 1 ax^2+bxy+cy^2=1 </math>ax2+bxy+cy2=1,这个式子的几何意义是一个歪了的椭圆或者双曲线或者其它图形,例如一个椭圆,我们的目的是将这个椭圆的中心点回到坐标原点,让轴水平和竖直,也就是进行一个变换操作,将椭圆标准化,准确地说就是将原来的方程变换为标准方程,对应的标准方程就是这个二次型的标准型
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> a x 2 + b x y + c y 2 = 1 → m x ′ 2 + n y ′ 2 = 1 ax^2+bxy+cy^2=1 \rightarrow mx'^2+ny'^2=1 </math>ax2+bxy+cy2=1→mx′2+ny′2=1

  • 椭圆标准方程: <math xmlns="http://www.w3.org/1998/Math/MathML"> x 2 a 2 + y 2 b 2 = 1 ( a > b > 0 ) \frac{x^2}{a^2}+\frac{y^2}{b^2}=1 \quad (a>b>0) </math>a2x2+b2y2=1(a>b>0)
  • 双曲线标准方程: <math xmlns="http://www.w3.org/1998/Math/MathML"> x 2 a 2 − y 2 b 2 = 1 ( a > b > 0 ) \frac{x^2}{a^2}-\frac{y^2}{b^2}=1 \quad (a>b>0) </math>a2x2−b2y2=1(a>b>0)

对于上边二次型的一般形式,可以用矩阵的形式来表达:

<math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x 1 , x 2 , ⋯   , x n ) = [ x 1 x 2 ⋯ x n ] [ a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋮ ⋮ ⋮ a n 1 a n 2 ⋯ a n n ] [ x 1 x 2 ⋯ x n ] f(x_1,x_2,\cdots,x_n)=\begin{bmatrix} x_1 & x_2 & \cdots & x_n \end{bmatrix}\begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \\ \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ \cdots \\ x_n \end{bmatrix} </math>f(x1,x2,⋯,xn)=[x1x2⋯xn]⎣ ⎡a11a21⋮an1a12a22⋮an2⋯⋯⋯a1na2n⋮ann⎦ ⎤⎣ ⎡x1x2⋯xn⎦ ⎤

令 <math xmlns="http://www.w3.org/1998/Math/MathML"> x = [ x 1 x 2 ⋯ x n ] T , A = [ a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋮ ⋮ ⋮ a n 1 a n 2 ⋯ a n n ] x= \begin{bmatrix} x_1 & x_2 & \cdots & x_n \end{bmatrix}^T,A=\begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \\ \end{bmatrix} </math>x=[x1x2⋯xn]T,A=⎣ ⎡a11a21⋮an1a12a22⋮an2⋯⋯⋯a1na2n⋮ann⎦ ⎤,则 <math xmlns="http://www.w3.org/1998/Math/MathML"> f = x T A x f=x^TAx </math>f=xTAx,其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 是对称矩阵,这里被称为二次型的矩阵

  • 任意一个二次型和它的实对称矩阵是一一对应的
  • 实对称矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的秩就是二次型 <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f 的秩

当把一个二次型写成矩阵表达式时,矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 一定是一个对称矩阵;但当把一个矩阵表达式写成二次型时,即使矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 不是对称矩阵,展开后仍然是一个二次型。

原因:自己展开尝试一下就理解了,二次型中每个含两个未知数的积的系数都是 <math xmlns="http://www.w3.org/1998/Math/MathML"> a a </math>a的2倍,因此相应对称矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 中的对应值就是 <math xmlns="http://www.w3.org/1998/Math/MathML"> a a </math>a,当将矩阵表达式转换为二次型时,是在对应位置的参数相加,而当二次型转换为矩阵表达式时,则是对当前系数除以二作为相应矩阵的对应值。

:写出二次型 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x , y , z ) = x 2 − 3 z 2 − 4 x y + y z f(x,y,z)=x^2-3z^2-4xy+yz </math>f(x,y,z)=x2−3z2−4xy+yz 的实对称矩阵以及矩阵表达式

矩阵表达式: <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x , y , z ) = [ x y z ] [ 1 − 2 0 − 2 0 1 2 0 1 2 3 2 ] [ x y z ] f(x,y,z)=\begin{bmatrix}x & y & z \end{bmatrix} \begin{bmatrix} 1 & -2 & 0 \\ -2 & 0 & \frac{1}{2} \\ 0 & \frac{1}{2} & \frac{3}{2} \end{bmatrix} \begin{bmatrix}x \\ y \\ z \end{bmatrix} </math>f(x,y,z)=[xyz]⎣ ⎡1−20−202102123⎦ ⎤⎣ ⎡xyz⎦ ⎤

对于这里的实对称矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 中对应系数的位置,可以想象成这样一个表格:

x y z
x <math xmlns="http://www.w3.org/1998/Math/MathML"> x 2 x^2 </math>x2的系数 <math xmlns="http://www.w3.org/1998/Math/MathML"> x y xy </math>xy的系数 <math xmlns="http://www.w3.org/1998/Math/MathML"> x z xz </math>xz的系数
y <math xmlns="http://www.w3.org/1998/Math/MathML"> x y xy </math>xy的系数 <math xmlns="http://www.w3.org/1998/Math/MathML"> y 2 y^2 </math>y2的系数 <math xmlns="http://www.w3.org/1998/Math/MathML"> y z yz </math>yz的系数
z <math xmlns="http://www.w3.org/1998/Math/MathML"> x z xz </math>xz的系数 <math xmlns="http://www.w3.org/1998/Math/MathML"> y z yz </math>yz的系数 <math xmlns="http://www.w3.org/1998/Math/MathML"> z 2 z^2 </math>z2的系数

根据二次型中 <math xmlns="http://www.w3.org/1998/Math/MathML"> x 2 , y 2 , z 2 x^2,y^2,z^2 </math>x2,y2,z2 的系数和 <math xmlns="http://www.w3.org/1998/Math/MathML"> x y , x z , y z xy, xz, yz </math>xy,xz,yz 的系数来写矩阵即可

合同变换

例如一个二次型的矩阵表达式: <math xmlns="http://www.w3.org/1998/Math/MathML"> f = [ x 1 x 2 x 3 ] [ c 11 c 12 c 13 c 21 c 22 c 23 c 31 c 32 c 33 ] [ x 1 x 2 x 3 ] f=\begin{bmatrix} x_1 & x_2 & x_3 \end{bmatrix}\begin{bmatrix} c_{11} & c_{12} & c_{13} \\ c_{21} & c_{22} & c_{23} \\ c_{31} & c_{32} & c_{33} \\ \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} </math>f=[x1x2x3]⎣ ⎡c11c21c31c12c22c32c13c23c33⎦ ⎤⎣ ⎡x1x2x3⎦ ⎤

我们对其中的三个元素 <math xmlns="http://www.w3.org/1998/Math/MathML"> x 1 , x 2 , x 3 x_1, x_2, x_3 </math>x1,x2,x3 做线性变换,即: <math xmlns="http://www.w3.org/1998/Math/MathML"> [ x 1 x 2 x 3 ] = [ c 11 c 12 c 13 c 21 c 22 c 23 c 31 c 32 c 33 ] [ y 1 y 2 y 3 ] \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} c_{11} & c_{12} & c_{13} \\ c_{21} & c_{22} & c_{23} \\ c_{31} & c_{32} & c_{33} \\ \end{bmatrix}\begin{bmatrix} y_1 \\ y_2 \\ y_3 \end{bmatrix} </math>⎣ ⎡x1x2x3⎦ ⎤=⎣ ⎡c11c21c31c12c22c32c13c23c33⎦ ⎤⎣ ⎡y1y2y3⎦ ⎤

则有: <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x ) = x T A x = ( C y ) T A ( C y ) = y T C T A C y = y T ( C T A C ) y = y T B y f(x)=x^TAx=(Cy)^TA(Cy)=y^TC^TACy=y^T(C^TAC)y=y^TBy </math>f(x)=xTAx=(Cy)TA(Cy)=yTCTACy=yT(CTAC)y=yTBy,这里 <math xmlns="http://www.w3.org/1998/Math/MathML"> B = C T A C B=C^TAC </math>B=CTAC

设 <math xmlns="http://www.w3.org/1998/Math/MathML"> A , B A,B </math>A,B 为 <math xmlns="http://www.w3.org/1998/Math/MathML"> n n </math>n 阶矩阵,如果存在可逆矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> C C </math>C,使得 <math xmlns="http://www.w3.org/1998/Math/MathML"> B = C T A C B=C^TAC </math>B=CTAC,则称 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 与 <math xmlns="http://www.w3.org/1998/Math/MathML"> B B </math>B 合同 ,记作 . ,这种对 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的运算被称为合同变换

注意这里不要与相似变换混淆的概念,相似变换是 <math xmlns="http://www.w3.org/1998/Math/MathML"> B = P − 1 A P B=P^{-1}AP </math>B=P−1AP,相似变换是在不同基的同一矩阵进行变换,而合同变换则表示二次型到标准型的变换

将二次型转换为标准型

要想将其化为标准型,我们需要将所有的 <math xmlns="http://www.w3.org/1998/Math/MathML"> x i x j x_ix_j </math>xixj的系数变为0,不难想到,当矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 除正对角线以外的元素都为0时,所有 <math xmlns="http://www.w3.org/1998/Math/MathML"> x i x j x_ix_j </math>xixj 的系数也就为0了。

对于合同变换,可以看到,矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> B B </math>B 与矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> C C </math>C 和矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 相关,而向量 <math xmlns="http://www.w3.org/1998/Math/MathML"> y y </math>y 与向量 <math xmlns="http://www.w3.org/1998/Math/MathML"> x x </math>x 和矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> C C </math>C 相关,我们不关心向量y是什么样的,在新的式子中,我们要通过矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> C C </math>C 将矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的除正对角线以外的所有元素都变换为0,得到这样一个矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> B B </math>B,最后也就得到了二次型对应的标准型。

定理 :对于任一个 n 元二次型 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x ) = x T A x f(x)=x^TAx </math>f(x)=xTAx,存在正交变换 <math xmlns="http://www.w3.org/1998/Math/MathML"> x = Q y x=Qy </math>x=Qy ( <math xmlns="http://www.w3.org/1998/Math/MathML"> Q Q </math>Q 为 n 阶正交矩阵),使得 <math xmlns="http://www.w3.org/1998/Math/MathML"> x T A x = y T ( Q T A Q ) y = λ 1 y 1 2 + λ 2 y 2 2 + ⋯ + λ n y n 2 x^TAx=y^T(Q^TAQ)y=\lambda_1 y_1^2+\lambda_2y_2^2+\cdots+\lambda_ny_n^2 </math>xTAx=yT(QTAQ)y=λ1y12+λ2y22+⋯+λnyn2。其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> λ 1 , λ 2 , ⋯   , λ n \lambda_1,\lambda_2,\cdots,\lambda_n </math>λ1,λ2,⋯,λn 是实对称矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的 n 个特征值, <math xmlns="http://www.w3.org/1998/Math/MathML"> Q Q </math>Q 的 n 个列向量 <math xmlns="http://www.w3.org/1998/Math/MathML"> α 1 , α 2 , ⋯   , α n \alpha_1, \alpha_2, \cdots, \alpha_n </math>α1,α2,⋯,αn 是 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 对应于特征值 <math xmlns="http://www.w3.org/1998/Math/MathML"> λ 1 , λ 2 , ⋯   , λ n \lambda_1, \lambda_2, \cdots, \lambda_n </math>λ1,λ2,⋯,λn 的标准正交特征向量.

  • 任一实对称矩阵都与一个对角阵合同
  • 用正交变换化二次型为标准型,具有保持几何形状不变的优点

这里的 <math xmlns="http://www.w3.org/1998/Math/MathML"> x x </math>x 是二次型中的未知数, <math xmlns="http://www.w3.org/1998/Math/MathML"> y y </math>y 是该二次型对应的标准型中的未知数

在对称矩阵的相似对角化中讲过,任何一个对称矩阵,都可以通过一个正交变换变为一个对角阵,这是实对称矩阵的特点。即: <math xmlns="http://www.w3.org/1998/Math/MathML"> n n </math>n 阶实对称矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 必可相似对角化,且总存在正交矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> Q Q </math>Q,使得 <math xmlns="http://www.w3.org/1998/Math/MathML"> Q T A Q = d i a g ( λ 1 , λ 2 , ⋯   , λ n ) Q^TAQ=diag(λ1,λ2,⋯ ,λn) </math>QTAQ=diag(λ1,λ2,⋯ ,λn),其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> λ 1 , λ 2 , ⋯   , λ n λ 1 , λ 2 , ⋯   , λ n λ1,λ2,⋯ ,λn\lambda_1,\lambda_2,\cdots,\lambda_n </math>λ1,λ2,⋯ ,λnλ1,λ2,⋯,λn 是矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的特征值.

即: <math xmlns="http://www.w3.org/1998/Math/MathML"> Q − 1 A Q = Q T A Q = Λ = [ λ 1 λ 2 ⋯ λ n ] Q^{-1}AQ=Q^TAQ=\Lambda=\begin{bmatrix} \lambda_1 & & \\ & \lambda_2 & & \\ & & \cdots & \\ & & & \lambda_n \end{bmatrix} </math>Q−1AQ=QTAQ=Λ=⎣ ⎡λ1λ2⋯λn⎦ ⎤

当我们通过 <math xmlns="http://www.w3.org/1998/Math/MathML"> B = Q T A Q = Λ B=Q^TAQ=\Lambda </math>B=QTAQ=Λ,即矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> B B </math>B 变为一个对角阵,对角阵中除正对角线以外其它位置的值都为0,最后 <math xmlns="http://www.w3.org/1998/Math/MathML"> y T B y y^TBy </math>yTBy当然只剩下平方项了。

正交矩阵中每一个向量都满足和其本身内积为1,和其它向量内积为0,且正交矩阵的转置和其逆矩阵相同。

从中也可以看出,这里这个合同变换的方法本质上就是相似变换,不过这里的相似变换是由正交变换构成的。

参考相似对角化的概念,这里就是矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 和一个对角阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> Λ \Lambda </math>Λ 相似,性质当然也相同:

  • 对角阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> Λ \Lambda </math>Λ 的值是矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的特征值
  • 矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> Q Q </math>Q 中的列向量为矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的特征向量

同时,在这里因为矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> Q Q </math>Q 是正交矩阵,因此矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 中的特征向量相互正交,即其中的每一个向量都满足和其本身内积为1,和其它向量内积为0。

此外,由于对角阵中的元素为矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 对应的特征值,因此对于一个二次型对应的标准型,该标准型中未知数的系数就是矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 对应的特征值。

二次型变换为标准型的本质

先联想一下相似变换的本质,相似变换就是从一个基到另一个基,但原本图形形状不做改变的过程,仅仅是同一图形在不同基下的表达形式而已。因此,对于二次型标准化的本质也就清楚了,所谓二次型标准化,本质上就是基的改变,通过定义一个新的基,使得原图形在新的基下是标准形式,然后再通过相似变换将原图形映射过去即可。

我们之前讲过线性空间中的基是什么,参考上图,这里再通俗点讲,就是构建了一个新的坐标系,使得图形在新的坐标系下的方程是标准方程。

规范型:在标准型中,若平方项的系数为1或-1或0,则称其为二次型的规范型。

:某二次型的标准型为 <math xmlns="http://www.w3.org/1998/Math/MathML"> 8 y 1 2 + 1 2 y 2 2 − 9 y 3 2 = 1 8y_1^2+\frac{1}{2}y_2^2-9y_3^2=1 </math>8y12+21y22−9y32=1

则有: <math xmlns="http://www.w3.org/1998/Math/MathML"> ( 2 2 y 1 ) 2 + ( 1 2 y 2 ) 2 − ( 3 y 3 ) 2 = z 1 2 + z 2 2 + z 3 2 = 1 (2\sqrt 2y_1)^2+(\frac{1}{\sqrt 2}y_2)^2-(3y_3)^2=z_1^2+z_2^2+z_3^2=1 </math>(22 y1)2+(2 1y2)2−(3y3)2=z12+z22+z32=1

<math xmlns="http://www.w3.org/1998/Math/MathML"> z 1 2 + z 2 2 + z 3 2 = 1 z_1^2+z_2^2+z_3^2=1 </math>z12+z22+z32=1 这种形式就是规范型,但注意它对于原来的图形在形状上已经伸缩变换了。

:求一个正交变换 <math xmlns="http://www.w3.org/1998/Math/MathML"> x = P y x=Py </math>x=Py,把二次型 <math xmlns="http://www.w3.org/1998/Math/MathML"> f = − 2 x 1 x 2 + 2 x 1 x 3 + 2 x 2 x 3 f=-2x_1x_2+2x_1x_3+2x_2x_3 </math>f=−2x1x2+2x1x3+2x2x3 化为标准型

想将二次型化为标准型,其实就是求我们上述所讲的矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> P P </math>P 和矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> Λ \Lambda </math>Λ,由于矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> P P </math>P 中的列向量就是矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的特征向量,而矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> Λ \Lambda </math>Λ 中的值则为矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的特征值,因此我们首先要求出来矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的特征向量和特征值。

易得该二次型对应的矩阵表达式为:

<math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x ) = [ x 1 x 2 x 3 ] [ 0 − 1 1 − 1 0 1 1 1 0 ] [ x 1 x 2 x 3 ] f(x)=\begin{bmatrix} x_1 & x_2 & x_3 \end{bmatrix} \begin{bmatrix} 0 & -1 & 1 \\ -1 & 0 & 1 \\ 1 & 1 & 0 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} </math>f(x)=[x1x2x3]⎣ ⎡0−11−101110⎦ ⎤⎣ ⎡x1x2x3⎦ ⎤

要想化为标准型,我们首先要找到矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 对应的对角阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> Λ \Lambda </math>Λ,也就是也行哦爱你找到矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 对应的特征值。

因 <math xmlns="http://www.w3.org/1998/Math/MathML"> ( A − λ E ) x = 0 (A-\lambda E)x=0 </math>(A−λE)x=0,由 <math xmlns="http://www.w3.org/1998/Math/MathML"> ( A − λ E ) = 0 (A-\lambda E)=0 </math>(A−λE)=0 得有:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> ∣ A − λ E ∣ = ∣ − λ − 1 1 − 1 − λ 1 1 1 − λ ∣ ∼ ∣ − 1 − λ − 1 1 0 1 − λ 0 2 1 − λ ∣ = ( 1 − λ ) ( − 1 ) 2 + 2 ∣ − 1 − λ 1 2 − λ ∣ = ( 1 − λ ) ( λ + 2 ) ( λ − 1 ) \begin{align} |A-\lambda E| &= \begin{vmatrix} -\lambda & -1 & 1 \\ -1 & -\lambda & 1 \\ 1 & 1 & -\lambda \end{vmatrix} \\ &\sim \begin{vmatrix} -1-\lambda & -1 & 1 \\ 0 & 1-\lambda & 0 \\ 2 & 1 & -\lambda \end{vmatrix} \\ &= (1-\lambda)(-1)^{2+2}\begin{vmatrix} -1-\lambda & 1 \\ 2 & -\lambda \end{vmatrix} \\ &=(1-\lambda)(\lambda+2)(\lambda-1) \end{align} </math>∣A−λE∣=∣ ∣−λ−11−1−λ111−λ∣ ∣∼∣ ∣−1−λ02−11−λ110−λ∣ ∣=(1−λ)(−1)2+2∣ ∣−1−λ21−λ∣ ∣=(1−λ)(λ+2)(λ−1)

即: <math xmlns="http://www.w3.org/1998/Math/MathML"> { λ 1 = − 2 λ 2 = λ 3 = 1 \begin{cases} \lambda_1=-2 \\ \lambda_2=\lambda_3=1 \end{cases} </math>{λ1=−2λ2=λ3=1

当 <math xmlns="http://www.w3.org/1998/Math/MathML"> λ 1 = − 2 \lambda_1=-2 </math>λ1=−2 时, <math xmlns="http://www.w3.org/1998/Math/MathML"> A − λ 1 E = [ 2 − 1 1 − 1 2 1 1 1 2 ] ∼ [ 1 0 1 0 1 1 0 0 0 ] A-\lambda_1 E=\begin{bmatrix} 2 & -1 & 1 \\ -1 & 2 & 1 \\ 1 & 1 & 2 \end{bmatrix} \sim \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix} </math>A−λ1E=⎣ ⎡2−11−121112⎦ ⎤∼⎣ ⎡100010110⎦ ⎤

新的齐次方程组为: <math xmlns="http://www.w3.org/1998/Math/MathML"> { x 1 + x 3 = 0 x 2 + x 3 = 0 \begin{cases} x_1 + x_3 = 0 \\ x_2 + x_3 =0 \end{cases} </math>{x1+x3=0x2+x3=0

自由变量个数为 <math xmlns="http://www.w3.org/1998/Math/MathML"> n − R ( A − λ E ) = 1 n-R(A-\lambda E)=1 </math>n−R(A−λE)=1,主元为 <math xmlns="http://www.w3.org/1998/Math/MathML"> x 1 , x 2 x_1, x_2 </math>x1,x2,自由变量为 <math xmlns="http://www.w3.org/1998/Math/MathML"> x 3 x_3 </math>x3

易得基础解系: <math xmlns="http://www.w3.org/1998/Math/MathML"> [ x 1 x 2 1 ] \begin{bmatrix} x_1 \\ x_2 \\ 1 \end{bmatrix} </math>⎣ ⎡x1x21⎦ ⎤

代入易得,特征向量 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 1 = [ − 1 − 1 1 ] \xi_1=\begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} </math>ξ1=⎣ ⎡−1−11⎦ ⎤

对于一般做法,我们这是会同理得 特征向量 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 2 = [ − 1 1 0 ] , ξ 3 = [ 1 0 1 ] \xi_2=\begin{bmatrix} -1 \\ 1 \\ 0 \end{bmatrix}, \xi_3 = \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} </math>ξ2=⎣ ⎡−110⎦ ⎤,ξ3=⎣ ⎡101⎦ ⎤,同时观察到 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 1 \xi_1 </math>ξ1 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 2 \xi_2 </math>ξ2 正交,但是由于这里的特征向量是正交矩阵中的列向量,因此特征向量 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 1 , ξ 2 , ξ 3 \xi_1,\xi_2,\xi_3 </math>ξ1,ξ2,ξ3 之间两两正交,而这时如果我们这样求出来 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 2 \xi_2 </math>ξ2 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 3 \xi_3 </math>ξ3 的话,紧接着要使用施密特正交法进行处理,增大了计算量,因此当我们求出 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 1 \xi_1 </math>ξ1 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 2 \xi_2 </math>ξ2 时,参考正交矩阵两两正交的性质来求出特征向量 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 3 \xi_3 </math>ξ3,而不使用一般的方法建立基础解系来求 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 3 \xi_3 </math>ξ3。

同理得特征向量 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 2 = [ − 1 1 0 ] \xi_2=\begin{bmatrix} -1 \\ 1 \\ 0 \end{bmatrix} </math>ξ2=⎣ ⎡−110⎦ ⎤

由于 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 1 , ξ 2 , ξ 3 \xi_1, \xi_2, \xi_3 </math>ξ1,ξ2,ξ3 之间两两正交,则易得 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 3 = [ 1 1 2 ] \xi_3=\begin{bmatrix} 1 \\ 1 \\ 2 \end{bmatrix} </math>ξ3=⎣ ⎡112⎦ ⎤

将特征向量单位化后得: <math xmlns="http://www.w3.org/1998/Math/MathML"> p 1 = 1 3 [ 1 1 2 ] , p 2 = 1 2 [ 1 1 2 ] , p 3 = 1 6 [ 1 1 2 ] p_1=\frac{1}{\sqrt 3}\begin{bmatrix} 1 \\ 1 \\ 2 \end{bmatrix}, p_2=\frac{1}{\sqrt 2}\begin{bmatrix} 1 \\ 1 \\ 2 \end{bmatrix}, p_3=\frac{1}{6}\begin{bmatrix} 1 \\ 1 \\ 2 \end{bmatrix} </math>p1=3 1⎣ ⎡112⎦ ⎤,p2=2 1⎣ ⎡112⎦ ⎤,p3=61⎣ ⎡112⎦ ⎤

则正交矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> P = [ p 1 p 2 p 3 ] P=\begin{bmatrix} p_1 & p_2 & p_3 \end{bmatrix} </math>P=[p1p2p3]

易得该二次型对应的标准型: <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( y ) = − 2 y 1 2 + y 2 2 + y 3 2 f(y)=-2y_1^2+y_2^2+y_3^2 </math>f(y)=−2y12+y22+y32

总结:这里二次型转标准型的计算过程基本和前一章节的求法相同,主要是求特征值和特征向量,这两个求出来,结果自然也就出来了。

:求椭圆 <math xmlns="http://www.w3.org/1998/Math/MathML"> x 2 + 4 x y + 5 y 2 = 1 x^2+4xy+5y^2=1 </math>x2+4xy+5y2=1 的面积

二次型转换为其标准型,图形形状不变,则图形对应面积也不变,因此我们可以先将不标准的椭圆标准化得到其标准型,然后再求面积即可。

易得该二次型的矩阵表达式: <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x , y ) = [ x y ] [ 1 2 2 5 ] [ x y ] f(x,y)=\begin{bmatrix} x & y \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 2 & 5 \end{bmatrix}\begin{bmatrix} x \\ y\end{bmatrix} </math>f(x,y)=[xy][1225][xy],其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> A = [ 1 2 2 5 ] A=\begin{bmatrix} 1 & 2 \\ 2 & 5 \end{bmatrix} </math>A=[1225]

由 <math xmlns="http://www.w3.org/1998/Math/MathML"> ( A − λ E ) x = 0 (A-\lambda E)x=0 </math>(A−λE)x=0 得 <math xmlns="http://www.w3.org/1998/Math/MathML"> ∣ A − λ E ∣ = ∣ 1 − λ 2 2 5 − λ ∣ = λ 2 − 6 λ + 1 = 0 |A-\lambda E| = \begin{vmatrix} 1-\lambda & 2 \\ 2 & 5-\lambda \end{vmatrix} = \lambda^2-6\lambda+1=0 </math>∣A−λE∣=∣ ∣1−λ225−λ∣ ∣=λ2−6λ+1=0

求根公式得 <math xmlns="http://www.w3.org/1998/Math/MathML"> { λ 1 = 6 + 4 2 2 λ 2 = 6 − 4 2 2 \begin{cases} \lambda_1 = \frac{6+4\sqrt 2}{2} \\ \lambda_2 = \frac{6-4\sqrt 2}{2} \end{cases} </math>{λ1=26+42 λ2=26−42

求根公式 (初中数学): <math xmlns="http://www.w3.org/1998/Math/MathML"> x = − b ± b 2 − 4 a c 2 a x = \frac{-b \pm \sqrt {b^2-4ac}}{2a} </math>x=2a−b±b2−4ac

特征值较复杂,对应的特征向量应该也比较复杂,因此这里紧接着先不算特征向量,因为对于这道题我们并没有必要去求正交矩阵。

假设特征向量为 <math xmlns="http://www.w3.org/1998/Math/MathML"> ξ 1 , ξ 2 \xi_1, \xi_2 </math>ξ1,ξ2

则矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> Q = [ ξ 1 ξ 2 ] Q=\begin{bmatrix} \xi_1 & \xi_2 \end{bmatrix} </math>Q=[ξ1ξ2], <math xmlns="http://www.w3.org/1998/Math/MathML"> Λ = Q T A Q = [ λ 1 0 0 λ 2 ] \Lambda=Q^TAQ=\begin{bmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{bmatrix} </math>Λ=QTAQ=[λ100λ2]

设标准型下 <math xmlns="http://www.w3.org/1998/Math/MathML"> x , y x,y </math>x,y 对应的两个未知数分别为 <math xmlns="http://www.w3.org/1998/Math/MathML"> u , v u,v </math>u,v

则有 <math xmlns="http://www.w3.org/1998/Math/MathML"> [ x y ] = Q [ u v ] \begin{bmatrix} x \\ y \end{bmatrix} = Q\begin{bmatrix} u \\ v \end{bmatrix} </math>[xy]=Q[uv],则原式 <math xmlns="http://www.w3.org/1998/Math/MathML"> f = λ 1 u 2 + λ 2 v 2 = 1 f=\lambda_1 u^2+ \lambda_2 v^2=1 </math>f=λ1u2+λ2v2=1

整理得: <math xmlns="http://www.w3.org/1998/Math/MathML"> u 2 ( 1 λ 1 ) 2 + v 2 ( 1 λ 2 ) 2 = 1 \frac{u^2}{(\sqrt{\frac{1}{\lambda_1}})^2}+\frac{v^2}{(\sqrt{\frac{1}{\lambda_2}})^2}=1 </math>(λ11 )2u2+(λ21 )2v2=1

这里就是椭圆的标准公式: <math xmlns="http://www.w3.org/1998/Math/MathML"> x 2 a 2 + y 2 b 2 = 1 \frac{x^2}{a^2}+\frac{y^2}{b^2}=1 </math>a2x2+b2y2=1

即 <math xmlns="http://www.w3.org/1998/Math/MathML"> a = 1 λ 1 , b = 1 λ 2 a=\sqrt{\frac{1}{\lambda_1}},b=\sqrt{\frac{1}{\lambda_2}} </math>a=λ11 ,b=λ21

由椭圆面积公式得: <math xmlns="http://www.w3.org/1998/Math/MathML"> S = π a b = π λ 1 λ 2 = π 1 = π S=\pi ab=\frac{\pi}{\sqrt{\lambda_1 \lambda_2}}=\frac {\pi}{1}=\pi </math>S=πab=λ1λ2 π=1π=π

正交变换具有保形性,变化前后图形形状不会发生改变

配方法

配方法很简单,共分为两种情况,这里直接通过举例来进行说明。

  1. 二次型中存在平方项则直接使用最简单粗暴的方法凑平方
  2. 二次型中不存在平方项我们先变换一次得到第一种情况,再使用相同的方法凑平方

简而言之,无论哪种情况,我们的目的都是凑平方,消去非平方项,再将平方项从 <math xmlns="http://www.w3.org/1998/Math/MathML"> x x </math>x 映射到 <math xmlns="http://www.w3.org/1998/Math/MathML"> y y </math>y 即可。

配方法的第一种使用情况

三个主要步骤:

  1. 式子配方成平方相加减的形式
  2. 写过渡矩阵,并验证该过渡矩阵行列式不为0 (矩阵可逆)
  3. 根据要求算出指定结果

:化二次型 <math xmlns="http://www.w3.org/1998/Math/MathML"> f = x 1 2 + 2 x 2 2 + 5 x 3 2 + 2 x 1 x 2 + 2 x 1 x 3 + 6 x 2 x 3 f=x_1^2+2x_2^2+5x_3^2+2x_1x_2+2x_1x_3+6x_2x_3 </math>f=x12+2x22+5x32+2x1x2+2x1x3+6x2x3 成标准型,并求出所使用的变换矩阵。
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f = x 1 2 + 2 x 2 2 + 5 x 3 2 + 2 x 1 x 2 + 2 x 1 x 3 + 6 x 2 x 3 = ( x 1 + x 2 + x 3 ) 2 + x 2 2 + 4 x 3 2 + 4 x 2 x 3 = ( x 1 + x 2 + x 3 ) 2 + ( x 2 + 2 x 3 ) 2 \begin{align} f&=x_1^2+2x_2^2+5x_3^2+2x_1x_2+2x_1x_3+6x_2x_3 \\ &= (x_1 + x_2 + x_3)^2 +x_2^2+4x_3^2+4x_2x_3 \\ &= (x_1 + x_2 + x_3)^2 + (x_2 + 2x_3)^2 \end{align} </math>f=x12+2x22+5x32+2x1x2+2x1x3+6x2x3=(x1+x2+x3)2+x22+4x32+4x2x3=(x1+x2+x3)2+(x2+2x3)2

到这里,已经求出来该二次型对应的标准型了,即: <math xmlns="http://www.w3.org/1998/Math/MathML"> f = y 1 2 + y 2 2 f=y_1^2+y_2^2 </math>f=y12+y22,接下来求变换矩阵。

令 <math xmlns="http://www.w3.org/1998/Math/MathML"> { y 1 = x 1 + x 2 + x 3 y 2 = x 2 + 2 x 3 y 3 = x 3 \begin{cases} y_1 = x_1+x_2+x_3 \\ y_2=x_2+2x_3 \\ y_3=x_3 \end{cases} </math>⎩ ⎨ ⎧y1=x1+x2+x3y2=x2+2x3y3=x3,则有 <math xmlns="http://www.w3.org/1998/Math/MathML"> { x 1 = y 1 − y 2 + y 3 x 2 = y 2 − 2 y 3 x 3 = y 3 \begin{cases} x_1=y_1-y_2+y_3 \\ x_2=y_2-2y_3 \\ x_3=y_3 \end{cases} </math>⎩ ⎨ ⎧x1=y1−y2+y3x2=y2−2y3x3=y3

注意这里尽管没有第三个项, <math xmlns="http://www.w3.org/1998/Math/MathML"> y 3 y_3 </math>y3 也不能为0,我们把式子配方成平方相加减的形式就是为了去掉所有的非平方项,剩下的这些平方项就是我们前面所说的 <math xmlns="http://www.w3.org/1998/Math/MathML"> x x </math>x 对应的标准型下的变量 <math xmlns="http://www.w3.org/1998/Math/MathML"> y y </math>y,二次型中 <math xmlns="http://www.w3.org/1998/Math/MathML"> x x </math>x 有三个,那 <math xmlns="http://www.w3.org/1998/Math/MathML"> y y </math>y 也有三个,因此不能置为0,关于 <math xmlns="http://www.w3.org/1998/Math/MathML"> y y </math>y 的值,一般指定为对应的 <math xmlns="http://www.w3.org/1998/Math/MathML"> x x </math>x 的值,这样比较有利于计算。

由 <math xmlns="http://www.w3.org/1998/Math/MathML"> x = Q y x=Qy </math>x=Qy 得,即 <math xmlns="http://www.w3.org/1998/Math/MathML"> [ x 1 x 2 x 3 ] = [ y 1 − y 2 + y 3 y 2 − 2 y 3 y 3 ] = [ q 11 q 12 q 13 q 21 q 22 q 23 q 31 q 32 q 33 ] [ y 1 y 2 y 3 ] \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} y_1-y_2+y_3 \\ y_2-2y_3 \\ y_3 \end{bmatrix} = \begin{bmatrix} q_{11} & q_{12} & q_{13} \\ q_{21} & q_{22} & q_{23} \\ q_{31} & q_{32} & q_{33} \end{bmatrix} \begin{bmatrix} y_1 \\ y_2 \\ y_3 \end{bmatrix} </math>⎣ ⎡x1x2x3⎦ ⎤=⎣ ⎡y1−y2+y3y2−2y3y3⎦ ⎤=⎣ ⎡q11q21q31q12q22q32q13q23q33⎦ ⎤⎣ ⎡y1y2y3⎦ ⎤

易得变换矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> Q = [ 1 − 1 1 0 1 − 2 0 0 1 ] Q=\begin{bmatrix} 1 & -1 & 1 \\ 0 & 1 & -2 \\ 0 & 0 & 1 \end{bmatrix} </math>Q=⎣ ⎡100−1101−21⎦ ⎤,且 <math xmlns="http://www.w3.org/1998/Math/MathML"> ∣ Q ∣ ≠ 0 |Q| \neq 0 </math>∣Q∣=0

ps:上下三角形矩阵一定可逆,因为对应行列式展开之后只有一种符号(全+或全-)

综上所述,对应标准型: <math xmlns="http://www.w3.org/1998/Math/MathML"> f = y 1 2 + y 2 2 f=y_1^2+y_2^2 </math>f=y12+y22,变换矩阵: <math xmlns="http://www.w3.org/1998/Math/MathML"> Q = [ 1 − 1 1 0 1 − 2 0 0 1 ] Q=\begin{bmatrix} 1 & -1 & 1 \\ 0 & 1 & -2 \\ 0 & 0 & 1 \end{bmatrix} </math>Q=⎣ ⎡100−1101−21⎦ ⎤

配方法的第二种使用情况

:化二次型 <math xmlns="http://www.w3.org/1998/Math/MathML"> f = 2 x 1 x 2 + 2 x 1 x 3 − 6 x 2 x 3 f=2x_1x_2+2x_1x_3-6x_2x_3 </math>f=2x1x2+2x1x3−6x2x3 成规范型,并求出所使用的的变换矩阵。

思路:二次型中没有平方项,我们可以用平方差产生平方项

令 <math xmlns="http://www.w3.org/1998/Math/MathML"> { x 1 = y 1 + y 2 x 2 = y 1 − y 2 x 3 = y 3 \begin{cases} x_1=y_1+y_2 \\ x_2=y_1-y_2 \\ x_3=y_3 \end{cases} </math>⎩ ⎨ ⎧x1=y1+y2x2=y1−y2x3=y3

这里设置什么样的映射都可以,但需要保证使得计算简便,求出的过渡矩阵可逆。

则由 <math xmlns="http://www.w3.org/1998/Math/MathML"> [ x 1 x 2 x 3 ] = C 1 [ y 1 y 2 y 3 ] \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = C_1\begin{bmatrix} y_1 \\ y_2 \\ y_3 \end{bmatrix} </math>⎣ ⎡x1x2x3⎦ ⎤=C1⎣ ⎡y1y2y3⎦ ⎤ 易得, <math xmlns="http://www.w3.org/1998/Math/MathML"> C 1 = [ 1 1 0 1 − 1 0 0 0 1 ] C_1 = \begin{bmatrix} 1 & 1 & 0 \\ 1 & -1 & 0 \\ 0 & 0 & 1 \end{bmatrix} </math>C1=⎣ ⎡1101−10001⎦ ⎤, <math xmlns="http://www.w3.org/1998/Math/MathML"> ∣ C 1 ∣ ≠ 0 |C_1| \neq 0 </math>∣C1∣=0

则有:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f = 2 x 1 x 2 + 2 x 1 x 3 − 6 x 2 x 3 = 2 ( y 1 + y 2 ) ( y 1 − y 2 ) + 2 ( y 1 + y 2 ) y 3 − 6 ( y 1 − y 2 ) y 3 = 2 y 1 2 − 2 y 2 2 + 2 y 1 y 3 + 2 y 2 y 3 − 6 y 1 y 3 + 6 y 2 y 3 = 2 ( y 1 − y 3 ) 2 − ( 2 y 3 2 + 2 y 2 2 − 8 y 2 y 3 ) = 2 ( y 1 − y 3 ) 2 − 2 ( y 2 − 2 y 3 ) 2 + 6 y 3 2 = [ 2 ( y 1 − y 3 ) ] 2 − [ 2 ( y 2 − 2 y 3 ) ] 2 + [ 6 y 3 ] 2 \begin{align} f &= 2x_1x_2+2x_1x_3-6x_2x_3 \\ &=2(y_1+y_2)(y_1-y_2)+2(y_1+y_2)y_3-6(y_1-y_2)y_3 \\ &= 2y_1^2-2y_2^2+2y_1y_3+2y_2y_3-6y_1y_3+6y_2y_3 \\ &= 2(y_1-y_3)^2-(2y_3^2+2y_2^2-8y_2y_3) \\ &= 2(y_1-y_3)^2-2(y_2-2y_3)^2+6y_3^2 \\ &= [\sqrt 2(y_1-y_3)]^2-[\sqrt 2(y_2-2y_3)]^2+ [\sqrt 6y_3]^2 \end{align} </math>f=2x1x2+2x1x3−6x2x3=2(y1+y2)(y1−y2)+2(y1+y2)y3−6(y1−y2)y3=2y12−2y22+2y1y3+2y2y3−6y1y3+6y2y3=2(y1−y3)2−(2y32+2y22−8y2y3)=2(y1−y3)2−2(y2−2y3)2+6y32=[2 (y1−y3)]2−[2 (y2−2y3)]2+[6 y3]2

这里因为要求的不是标准型,而是标准型对应的规范型,因此将每项的系数都变换为1、-1、0的形式。

令 <math xmlns="http://www.w3.org/1998/Math/MathML"> { z 1 = 2 ( y 1 − y 3 ) z 2 = 2 ( y 2 − 2 y 3 ) z 3 = 6 y 3 \begin{cases} z_1=\sqrt 2(y_1-y_3) \\ z_2=\sqrt 2(y_2-2y_3) \\ z_3=\sqrt 6 y_3 \end{cases} </math>⎩ ⎨ ⎧z1=2 (y1−y3)z2=2 (y2−2y3)z3=6 y3,则有: <math xmlns="http://www.w3.org/1998/Math/MathML"> { y 1 = 1 2 z 1 + 1 6 z 3 y 2 = 1 2 z 2 + 2 6 z 3 y 3 = 1 6 z 3 \begin{cases} y_1= \frac {1}{\sqrt 2}z_1+\frac{1}{\sqrt 6}z_3\\ y_2=\frac{1}{\sqrt 2}z_2 + \frac{2}{\sqrt 6}z_3 \\ y_3=\frac{1}{\sqrt 6}z_3 \end{cases} </math>⎩ ⎨ ⎧y1=2 1z1+6 1z3y2=2 1z2+6 2z3y3=6 1z3

由 <math xmlns="http://www.w3.org/1998/Math/MathML"> [ y 1 y 2 y 3 ] = C 2 [ z 1 z 2 z 3 ] \begin{bmatrix} y_1 \\ y_2 \\ y_3 \end{bmatrix} = C_2\begin{bmatrix} z_1 \\ z_2 \\ z_3 \end{bmatrix} </math>⎣ ⎡y1y2y3⎦ ⎤=C2⎣ ⎡z1z2z3⎦ ⎤ 易得, <math xmlns="http://www.w3.org/1998/Math/MathML"> C 2 = [ 1 2 0 1 6 0 1 2 2 6 0 0 1 6 ] C_2 = \begin{bmatrix} \frac{1}{\sqrt 2} & 0 & \frac{1}{\sqrt 6} \\ 0 & \frac{1}{\sqrt 2} & \frac{2}{\sqrt 6} \\ 0 & 0 & \frac{1}{\sqrt 6} \end{bmatrix} </math>C2=⎣ ⎡2 10002 106 16 26 1⎦ ⎤, <math xmlns="http://www.w3.org/1998/Math/MathML"> ∣ C 2 ∣ ≠ 0 |C_2| \neq 0 </math>∣C2∣=0

由 <math xmlns="http://www.w3.org/1998/Math/MathML"> x = C 1 y , y = C 2 z x=C_1y, y=C_2z </math>x=C1y,y=C2z 得, <math xmlns="http://www.w3.org/1998/Math/MathML"> x = C 1 C 2 z x=C_1C_2z </math>x=C1C2z

<math xmlns="http://www.w3.org/1998/Math/MathML"> C = C 1 C 2 = [ 1 1 0 1 − 1 0 0 0 1 ] [ 1 2 0 1 6 0 1 2 2 6 0 0 1 6 ] = [ 1 2 1 2 3 6 1 2 − 1 2 − 1 6 0 0 1 6 ] C=C_1C_2=\begin{bmatrix} 1 & 1 & 0 \\ 1 & -1 & 0 \\ 0 & 0 & 1 \end{bmatrix}\begin{bmatrix} \frac{1}{\sqrt 2} & 0 & \frac{1}{\sqrt 6} \\ 0 & \frac{1}{\sqrt 2} & \frac{2}{\sqrt 6} \\ 0 & 0 & \frac{1}{\sqrt 6} \end{bmatrix}=\begin{bmatrix} \frac{1}{\sqrt 2} & \frac{1}{\sqrt 2} & \frac{3}{\sqrt 6} \\ \frac{1}{\sqrt 2} & \frac{-1}{\sqrt 2} & \frac{-1}{\sqrt 6} \\ 0 & 0 & \frac{1}{\sqrt 6}\end{bmatrix} </math>C=C1C2=⎣ ⎡1101−10001⎦ ⎤⎣ ⎡2 10002 106 16 26 1⎦ ⎤=⎣ ⎡2 12 102 12 −106 36 −16 1⎦ ⎤, <math xmlns="http://www.w3.org/1998/Math/MathML"> ∣ C ∣ ≠ 0 |C| \neq 0 </math>∣C∣=0

综上所述,对应的标准型为 <math xmlns="http://www.w3.org/1998/Math/MathML"> f = z 1 2 − z 2 2 + z 3 2 f=z_1^2-z_2^2+z_3^2 </math>f=z12−z22+z32,变换矩阵为 <math xmlns="http://www.w3.org/1998/Math/MathML"> [ 1 2 1 2 3 6 1 2 − 1 2 − 1 6 0 0 1 6 ] \begin{bmatrix} \frac{1}{\sqrt 2} & \frac{1}{\sqrt 2} & \frac{3}{\sqrt 6} \\ \frac{1}{\sqrt 2} & \frac{-1}{\sqrt 2} & \frac{-1}{\sqrt 6} \\ 0 & 0 & \frac{1}{\sqrt 6}\end{bmatrix} </math>⎣ ⎡2 12 102 12 −106 36 −16 1⎦ ⎤

总结

配方法相对更加简单,但配方法不具有保形性,也就是使用配方法进行变换后原图形可能伸缩或拉伸,如果要求求图形面积,就不能用配方法了,只能用正交变换的方法。

正/负 定二次型

惯性定理

定理 (惯性定理):二次型的标准型显然不是唯一的,只是标准型中所含项数 (二次型的秩) 是确定的,不仅如此,在限定变换为实变换时,标准型中正系数或负系数的个数是不变的,也就是有:

  • 设二次型 <math xmlns="http://www.w3.org/1998/Math/MathML"> f = x T A x f=x^TAx </math>f=xTAx 的秩为 <math xmlns="http://www.w3.org/1998/Math/MathML"> r r </math>r,且有两个可逆变换 <math xmlns="http://www.w3.org/1998/Math/MathML"> x = C y x=Cy </math>x=Cy 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> x = P z x=Pz </math>x=Pz
  • 使: <math xmlns="http://www.w3.org/1998/Math/MathML"> f = k 1 y 1 2 + k 2 y 2 2 + ⋯ + k r y r 2 ( k i ≠ 0 ) f=k_1y_1^2+k_2y_2^2+\cdots+k_ry_r^2 \quad (k_i \neq 0) </math>f=k1y12+k2y22+⋯+kryr2(ki=0)
  • 及: <math xmlns="http://www.w3.org/1998/Math/MathML"> f = λ 1 z 1 2 + λ 2 z 2 2 + ⋯ + λ r z r 2 ( λ i ≠ 0 ) f=\lambda_1z_1^2+\lambda_2z_2^2+\cdots+\lambda_rz_r^2 \quad (\lambda_i \neq 0) </math>f=λ1z12+λ2z22+⋯+λrzr2(λi=0)
  • 则: <math xmlns="http://www.w3.org/1998/Math/MathML"> k 1 , k 2 , ⋯   , k r k_1,k_2,\cdots,k_r </math>k1,k2,⋯,kr 中正数的个数与 <math xmlns="http://www.w3.org/1998/Math/MathML"> λ 1 , λ 2 , ⋯   , λ r \lambda_1,\lambda_2,\cdots,\lambda_r </math>λ1,λ2,⋯,λr 中正数的个数相等

以一个三个未知数的二次型为例,令 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x , y , z ) = 1 f(x,y,z)=1 </math>f(x,y,z)=1,表示空间上的一个曲面,将该二次型化为标准型后有三种情况,当三个系数都为正数的话表示一个椭球;若三个系数中一负两正,则表示一个单叶双曲面;若三个系数中一正两负,则表示一个双叶双曲面。

二次型中所做的各种可逆变换的本质是将这个曲面进行平移、旋转、缩放等

图形位置变换的本质:这里所说将这个曲面(图形)进行移动并不标准,因为本质上是相似变换,也就是基在变换,但达到的效果和曲面(图形)进行移动是相同的。

图形被伸缩或拉伸的本质:新的基与原来的基相比某些方向的单位向量大小不同。

也就是说图形本身没有变化,但衡量它的标准变化了,因此在新的标准下它看起来位置变换了或者伸缩拉伸了,而新旧标准(基)对于我们来说只是换了套坐标系。

二次型化为标准型中使用正交变换的话图形是不变的,但使用其它方法形状可能会发生一定的改变,如伸缩、拉伸等,但是无论这个图形怎样伸缩,例如单叶双曲面再怎么伸缩也是单叶双曲面,不可能通过伸缩或拉伸变成一个椭球,而它的形状又是由二次型中的系数的正负来决定的,因此变换前后正系数和负系数的个数不变。

为什么被称为惯性定理:类似于惯性中物体拥有保持当前运动状态的性质,图形也拥有保持当前形状不变的特性,因此被称为惯性定理。

正惯性指数和负惯性指数

二次型的标准型中正系数的个数称为二次型的正惯性指数;负系数的个数称为福惯性指数。若二次型 <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f 的正惯性指数为 <math xmlns="http://www.w3.org/1998/Math/MathML"> p p </math>p,秩为 <math xmlns="http://www.w3.org/1998/Math/MathML"> r r </math>r,则 <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f 的规范型便可确定为: <math xmlns="http://www.w3.org/1998/Math/MathML"> f = y 1 2 + ⋯ + y p 2 − y p + 1 2 − ⋯ − y r 2 f=y_1^2+\cdots+y_p^2-y_{p+1}^2-\cdots-y_r^2 </math>f=y12+⋯+yp2−yp+12−⋯−yr2

正惯性指数为 <math xmlns="http://www.w3.org/1998/Math/MathML"> p p </math>p,二次型的秩为 <math xmlns="http://www.w3.org/1998/Math/MathML"> r r </math>r,则负惯性指数就为 <math xmlns="http://www.w3.org/1998/Math/MathML"> r − p r-p </math>r−p

正/负定判断条件

定义 :若二次型 <math xmlns="http://www.w3.org/1998/Math/MathML"> f = x T A x f=x^TAx </math>f=xTAx 对任何 <math xmlns="http://www.w3.org/1998/Math/MathML"> x ≠ 0 x\neq 0 </math>x=0 都有 <math xmlns="http://www.w3.org/1998/Math/MathML"> f > 0 f>0 </math>f>0,则称 <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f 为正定二次型,正定二次型的矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 为正定矩阵。例如 <math xmlns="http://www.w3.org/1998/Math/MathML"> f = x 1 2 + 2 x 2 2 + 5 x 3 2 + 8 x 4 2 + 6 x 5 2 f=x_1^2+2x_2^2+5x_3^2+8x_4^2+6x_5^2 </math>f=x12+2x22+5x32+8x42+6x52 就是一个正定二次型。

  • 若 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 正定,则 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 一定可逆, <math xmlns="http://www.w3.org/1998/Math/MathML"> A − 1 A^{-1} </math>A−1 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> A ∗ A^* </math>A∗ 也一定正定

<math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 为正定矩阵,则 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 为对角阵且 <math xmlns="http://www.w3.org/1998/Math/MathML"> λ 1 , λ 2 , ⋯   , λ n \lambda_1, \lambda_2, \cdots, \lambda_n </math>λ1,λ2,⋯,λn 全都大于0,由于 <math xmlns="http://www.w3.org/1998/Math/MathML"> ∣ A ∣ = λ 1 λ 2 ⋯ λ n |A|=\lambda_1 \lambda_2\cdots\lambda_n </math>∣A∣=λ1λ2⋯λn,则 <math xmlns="http://www.w3.org/1998/Math/MathML"> ∣ A ∣ ≠ 0 |A| \neq 0 </math>∣A∣=0,因此矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 一定可逆。

若 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的特征值为 <math xmlns="http://www.w3.org/1998/Math/MathML"> λ 1 , λ 2 , ⋯   , λ n \lambda_1, \lambda_2, \cdots, \lambda_n </math>λ1,λ2,⋯,λn,则 <math xmlns="http://www.w3.org/1998/Math/MathML"> A − 1 A^{-1} </math>A−1 的特征值为 <math xmlns="http://www.w3.org/1998/Math/MathML"> 1 λ 1 , 1 λ 2 , ⋯   , 1 λ n \frac{1}{\lambda_1}, \frac{1}{\lambda_2}, \cdots, \frac{1}{\lambda_n} </math>λ11,λ21,⋯,λn1,因此当然 <math xmlns="http://www.w3.org/1998/Math/MathML"> A − 1 A^{-1} </math>A−1 也正定。

由 <math xmlns="http://www.w3.org/1998/Math/MathML"> A x = λ x Ax=\lambda x </math>Ax=λx 两边同乘 <math xmlns="http://www.w3.org/1998/Math/MathML"> A − 1 A^{-1} </math>A−1 易得 <math xmlns="http://www.w3.org/1998/Math/MathML"> A − 1 x = 1 λ x A^{-1}x=\frac{1}{\lambda}x </math>A−1x=λ1x,则 <math xmlns="http://www.w3.org/1998/Math/MathML"> A ∗ ∣ A ∣ x = 1 λ x \frac{A^*}{|A|}x=\frac{1}{\lambda}x </math>∣A∣A∗x=λ1x,整理得 <math xmlns="http://www.w3.org/1998/Math/MathML"> A ∗ x = ∣ A ∣ λ x A^*x=\frac{|A|}{\lambda}x </math>A∗x=λ∣A∣x。可见若 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的特征值为 <math xmlns="http://www.w3.org/1998/Math/MathML"> λ 1 , λ 2 , ⋯   , λ n \lambda_1, \lambda_2, \cdots, \lambda_n </math>λ1,λ2,⋯,λn,则 <math xmlns="http://www.w3.org/1998/Math/MathML"> A ∗ A^* </math>A∗ 的特征值为 <math xmlns="http://www.w3.org/1998/Math/MathML"> ∣ A ∣ λ 1 , ∣ A ∣ λ 2 , ⋯   , ∣ A ∣ λ n \frac{|A|}{\lambda_1}, \frac{|A|}{\lambda_2}, \cdots, \frac{|A|}{\lambda_n} </math>λ1∣A∣,λ2∣A∣,⋯,λn∣A∣,已知 <math xmlns="http://www.w3.org/1998/Math/MathML"> ∣ A ∣ > 0 |A| > 0 </math>∣A∣>0,因此 <math xmlns="http://www.w3.org/1998/Math/MathML"> A ∗ A^* </math>A∗ 肯定也正定。

正定二次型判别法 (三个充要条件)

  1. <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f 的标准型的 <math xmlns="http://www.w3.org/1998/Math/MathML"> n n </math>n 个系数全为正
  2. <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f 的正惯性指数为 <math xmlns="http://www.w3.org/1998/Math/MathML"> n n </math>n ( <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f 的秩等于其正惯性指数)
  3. <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f 的矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的特征值全大于0

这三个条件其实都是等价的,不同说法而已

定义 :若二次型 <math xmlns="http://www.w3.org/1998/Math/MathML"> f = x T A x f=x^TAx </math>f=xTAx 对任何 <math xmlns="http://www.w3.org/1998/Math/MathML"> x ≠ 0 x\neq 0 </math>x=0 都有 <math xmlns="http://www.w3.org/1998/Math/MathML"> f < 0 f<0 </math>f<0,则称 <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f 为负定二次型,负定二次型的矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 为负定矩阵。例如 <math xmlns="http://www.w3.org/1998/Math/MathML"> f = − x 1 2 − 2 x 2 2 − 5 x 3 2 − 8 x 4 2 − 6 x 5 2 f=-x_1^2-2x_2^2-5x_3^2-8x_4^2-6x_5^2 </math>f=−x12−2x22−5x32−8x42−6x52 就是一个负定二次型

负定二次型判别法 (三个充要条件)

  1. <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f 的标准型的 <math xmlns="http://www.w3.org/1998/Math/MathML"> n n </math>n 个系数全为负
  2. <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f 的负惯性指数为 <math xmlns="http://www.w3.org/1998/Math/MathML"> n n </math>n ( <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f 的秩等于其负惯性指数)
  3. <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f 的矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的特征值全小于0

对于负定二次型,和正定二次型的概念基本相同,不过相反而已,就不再过多解释了。

赫尔维茨定理

定理 (赫尔维茨定理) :对称矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 为正定的充分必要条件是: <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的各阶主子式都为正,即 <math xmlns="http://www.w3.org/1998/Math/MathML"> a 11 > 0 , [ a 11 a 12 a 21 a 22 ] > 0 , ⋯   , [ a 11 ⋯ a 1 n ⋮ ⋮ a n 1 ⋯ a n n ] > 0 a_{11}>0,\begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix} >0,\cdots, \begin{bmatrix} a_{11} & \cdots & a_{1n} \\ \vdots & & \vdots \\ a_{n1}& \cdots & a_{nn} \end{bmatrix} > 0 </math>a11>0,[a11a21a12a22]>0,⋯,⎣ ⎡a11⋮an1⋯⋯a1n⋮ann⎦ ⎤>0。

对称矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 为负定的充分必要条件为:奇数阶主子式为负,而偶数阶主子式为正,即 <math xmlns="http://www.w3.org/1998/Math/MathML"> ( − 1 ) r [ a 11 ⋯ a 1 n ⋮ ⋮ a n 1 ⋯ a n n ] > 0 ( r = 1 , 2 , ⋯   , n ) (-1)^r\begin{bmatrix} a_{11} & \cdots & a_{1n} \\ \vdots & & \vdots \\ a_{n1}& \cdots & a_{nn} \end{bmatrix} > 0 \quad (r=1,2,\cdots,n) </math>(−1)r⎣ ⎡a11⋮an1⋯⋯a1n⋮ann⎦ ⎤>0(r=1,2,⋯,n)。

主子式:矩阵对应行列式沿主对角线上的 <math xmlns="http://www.w3.org/1998/Math/MathML"> n n </math>n 阶子式。

有时候矩阵的特征值比较难求,这时候就可以用赫尔维茨定理

:若二次型 <math xmlns="http://www.w3.org/1998/Math/MathML"> f = x 1 2 + 2 x 2 2 + 5 x 3 2 + 8 x 4 2 + 6 x 5 2 f=x_1^2+2x_2^2+5x_3^2+8x_4^2+6x_5^2 </math>f=x12+2x22+5x32+8x42+6x52

易得矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A = [ 1 2 5 8 6 ] A=\begin{bmatrix} 1 & & & & \\ & 2 & & & \\ && 5 && \\ &&& 8 & \\ &&&& 6 \end{bmatrix} </math>A=⎣ ⎡12586⎦ ⎤

其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> ∣ 1 ∣ , ∣ 1 0 0 2 ∣ , ∣ 1 0 0 0 2 0 0 0 5 ∣ , ∣ 1 0 0 0 0 2 0 0 0 0 0 5 0 0 8 0 ∣ , ∣ 1 0 0 0 0 0 2 0 0 0 0 0 5 0 0 0 0 0 0 8 0 0 0 0 6 ∣ \begin{vmatrix} 1 \end{vmatrix}, \begin{vmatrix} 1 & 0 \\ 0 & 2 \end{vmatrix}, \begin{vmatrix} 1 & 0 &0 \\ 0 & 2 & 0 \\ 0 & 0 & 5 \end{vmatrix}, \begin{vmatrix} 1 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 \\ 0 & 0 & 0 & 5 \\ 0 & 0 & 8 & 0\end{vmatrix}, \begin{vmatrix} 1 & 0 &0 & 0 &0 \\ 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 5 & 0 & 0\\ 0 & 0&0&0&8\\0&0&0&0&6 \end{vmatrix} </math>∣ ∣1∣ ∣,∣ ∣1002∣ ∣,∣ ∣100020005∣ ∣,∣ ∣1000020000080050∣ ∣,∣ ∣1000002000005000000000086∣ ∣ 都大于0,因此该二次型为正定二次型。负定二次型同理

:判定二次型 <math xmlns="http://www.w3.org/1998/Math/MathML"> f = − 5 x 2 − 6 y 2 − 4 z 2 + 4 x y + 4 x z f=-5x^2-6y^2-4z^2+4xy+4xz </math>f=−5x2−6y2−4z2+4xy+4xz 的正定性

易得该二次型对应的矩阵表达式: <math xmlns="http://www.w3.org/1998/Math/MathML"> f = [ x y z ] [ − 5 2 2 2 − 6 0 2 0 − 4 ] [ x y z ] f=\begin{bmatrix} x & y & z \end{bmatrix}\begin{bmatrix} -5 & 2 & 2 \\ 2 & -6 & 0 \\ 2 & 0 & -4 \end{bmatrix}\begin{bmatrix} x \\ y \\ z \end{bmatrix} </math>f=[xyz]⎣ ⎡−5222−6020−4⎦ ⎤⎣ ⎡xyz⎦ ⎤

其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> A = [ − 5 2 2 2 − 6 0 2 0 − 4 ] A = \begin{bmatrix} -5 & 2 & 2 \\ 2 & -6 & 0 \\ 2 & 0 & -4 \end{bmatrix} </math>A=⎣ ⎡−5222−6020−4⎦ ⎤

  • 一阶主子式: <math xmlns="http://www.w3.org/1998/Math/MathML"> − 5 < 0 -5 < 0 </math>−5<0

  • 二阶主子式: <math xmlns="http://www.w3.org/1998/Math/MathML"> [ − 5 2 2 − 6 ] = 26 > 0 \begin{bmatrix} -5 & 2 \\ 2 & -6 \end{bmatrix}=26>0 </math>[−522−6]=26>0

  • 三阶主子式: <math xmlns="http://www.w3.org/1998/Math/MathML"> [ − 5 2 2 2 − 6 0 2 0 − 4 ] = − 80 < 0 \begin{bmatrix} -5 & 2 & 2 \\ 2 &-6 & 0 \\ 2 & 0 & -4 \end{bmatrix}=-80 < 0 </math>⎣ ⎡−5222−6020−4⎦ ⎤=−80<0

由赫尔维茨定理易得,该二次型负定

:设 <math xmlns="http://www.w3.org/1998/Math/MathML"> f = x 1 2 + x 2 2 + 5 x 3 2 + 2 a x 1 x 2 − 2 x 1 x 3 + 4 x 2 x 3 f=x_1^2+x_2^2+5x_3^2+2ax_1x_2-2x_1x_3+4x_2x_3 </math>f=x12+x22+5x32+2ax1x2−2x1x3+4x2x3 为正定二次型,求 <math xmlns="http://www.w3.org/1998/Math/MathML"> a a </math>a 的取值范围

对于这种题最合适的方法就是赫尔维茨定理,因为带着参数值去求特征值是比较麻烦的

该二次型对应矩阵表达式为: <math xmlns="http://www.w3.org/1998/Math/MathML"> f = [ x 1 x 2 x 3 ] [ 1 a − 1 a 1 2 − 1 2 5 ] [ x 1 x 2 x 3 ] f=\begin{bmatrix} x_1 & x_2 & x_3 \end{bmatrix} \begin{bmatrix} 1 & a & -1 \\ a & 1 & 2 \\ -1 & 2 & 5 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} </math>f=[x1x2x3]⎣ ⎡1a−1a12−125⎦ ⎤⎣ ⎡x1x2x3⎦ ⎤

由该二次型为正定二次型得:

  • 一阶主子式: <math xmlns="http://www.w3.org/1998/Math/MathML"> 1 > 0 1 > 0 </math>1>0
  • 二阶主子式: <math xmlns="http://www.w3.org/1998/Math/MathML"> [ 1 a a 1 ] = 1 − a 2 > 0 \begin{bmatrix} 1 & a \\ a & 1 \end{bmatrix} = 1-a^2 > 0 </math>[1aa1]=1−a2>0
  • 三阶主子式: <math xmlns="http://www.w3.org/1998/Math/MathML"> ∣ A ∣ = − a ( 4 + 5 a ) > 0 |A|=-a(4+5a) > 0 </math>∣A∣=−a(4+5a)>0

即: <math xmlns="http://www.w3.org/1998/Math/MathML"> { 1 − a 2 > 0 − a ( 4 + 5 a ) > 0 \begin{cases} 1-a^2 > 0 \\ -a(4+5a) > 0 \end{cases} </math>{1−a2>0−a(4+5a)>0,解得 <math xmlns="http://www.w3.org/1998/Math/MathML"> − 4 5 < a < 0 -\frac{4}{5}<a<0 </math>−54<a<0

第二个式子是一个抛物线(二次函数),可以很容易得到x轴上的两个点以及其开口向下

矩阵合同

回顾前面讲的矩阵合同和合同变换的知识:设 <math xmlns="http://www.w3.org/1998/Math/MathML"> A , B A,B </math>A,B 为 <math xmlns="http://www.w3.org/1998/Math/MathML"> n n </math>n 阶矩阵,若存在可逆矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> C C </math>C,使得 <math xmlns="http://www.w3.org/1998/Math/MathML"> B = C T A C B=C^TAC </math>B=CTAC,则称 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 与 <math xmlns="http://www.w3.org/1998/Math/MathML"> B B </math>B 合同,记作 . ,这种对矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A 的运算被称为合同变换。

根据上面的惯性定理,两矩阵合同就等价于两矩阵的正惯性指数、负惯性指数、二次型的秩都相同。

  • 即充要条件:矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A , B A,B </math>A,B 合同 <math xmlns="http://www.w3.org/1998/Math/MathML"> ↔ p , q , r \leftrightarrow p,q,r </math>↔p,q,r 相同

<math xmlns="http://www.w3.org/1998/Math/MathML"> p p </math>p:正惯性指数, <math xmlns="http://www.w3.org/1998/Math/MathML"> q q </math>q:负惯性指数, <math xmlns="http://www.w3.org/1998/Math/MathML"> r r </math>r:二次型的秩

<math xmlns="http://www.w3.org/1998/Math/MathML"> f = x T A x = y T B y f=x^TAx = y^TBy </math>f=xTAx=yTBy,这里矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A , B A,B </math>A,B 的关系就是合同,而将一个二次型化为一个标准型时会保持一个惯性,可以理解成,合同变换就是基于 <math xmlns="http://www.w3.org/1998/Math/MathML"> p , q , r p,q,r </math>p,q,r 不发生改变而完成的变换,后者是前者的充要条件。

例:设矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A = [ 0 0 2 0 1 0 2 0 0 ] , B = = [ 1 0 0 0 1 0 0 0 − 1 ] A=\begin{bmatrix} 0&0&2\\0&1&0\\2&0&0\end{bmatrix},B==\begin{bmatrix} 1&0&0\\0&1&0\\0&0&-1\end{bmatrix} </math>A=⎣ ⎡002010200⎦ ⎤,B==⎣ ⎡10001000−1⎦ ⎤,则两矩阵是否相似?是否合同?

  • 对于矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A:由 <math xmlns="http://www.w3.org/1998/Math/MathML"> ∣ A − λ E ∣ = 0 |A-\lambda E|=0 </math>∣A−λE∣=0 得特征值为 1,2,-2;易得 <math xmlns="http://www.w3.org/1998/Math/MathML"> p = 2 , q = 1 , r = 3 p=2, q=1, r=3 </math>p=2,q=1,r=3
  • 对于矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> B B </math>B:同理得特征值为 1,1,-1;易得 <math xmlns="http://www.w3.org/1998/Math/MathML"> p = 2 , q = 1 , r = 3 p=2,q=1,r=3 </math>p=2,q=1,r=3

因此矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> A , B A,B </math>A,B 合同但不相似。

特征值相同是矩阵相似的必要条件,而合同则是要看这两个矩阵的 <math xmlns="http://www.w3.org/1998/Math/MathML"> p , q , r p,q,r </math>p,q,r是否相同

相关推荐
hsling松子2 小时前
使用PaddleHub智能生成,献上浓情国庆福
人工智能·算法·机器学习·语言模型·paddlepaddle
正在走向自律2 小时前
机器学习框架
人工智能·机器学习
好吃番茄3 小时前
U mamba配置问题;‘KeyError: ‘file_ending‘
人工智能·机器学习
slomay4 小时前
关于对比学习(简单整理
经验分享·深度学习·学习·机器学习
AI完全体5 小时前
【AI知识点】偏差-方差权衡(Bias-Variance Tradeoff)
人工智能·深度学习·神经网络·机器学习·过拟合·模型复杂度·偏差-方差
羊小猪~~7 小时前
深度学习项目----用LSTM模型预测股价(包含LSTM网络简介,代码数据均可下载)
pytorch·python·rnn·深度学习·机器学习·数据分析·lstm
我是哈哈hh7 小时前
专题十_穷举vs暴搜vs深搜vs回溯vs剪枝_二叉树的深度优先搜索_算法专题详细总结
服务器·数据结构·c++·算法·机器学习·深度优先·剪枝
萱仔学习自我记录9 小时前
微调大语言模型——超详细步骤
人工智能·深度学习·机器学习
大神薯条老师9 小时前
Python从入门到高手5.1节-Python简单数据类型
爬虫·python·深度学习·机器学习·数据分析
zmjia11111 小时前
全流程Python编程、机器学习与深度学习实践技术应用
python·深度学习·机器学习