返回

定义8: 把含有n个变量x1 , x2 , ⋯ , xn的二次齐次函数

f(x1 , x2 , ⋯ , xn)=a11 x 1 2 x_{1}^{\ 2} +a22 x 2 2 x_{2}^{\ 2} +⋯+ann x n 2 x_{n}^{\ 2} +2a12x1x2+2a13x1x3+⋯+2an-1 , nxn-1xn

称为二次型

当j>i时 , 取aji=aij , 则2aijxixj = aijxixj+ajixjxi

于是上式可写成以下形式

f=a11 x 1 2 x_{1}^{\ 2} +a12x1x2+⋯+a1nx1xn+a21x2x1+a22 x 2 2 x_{2}^{\ 2} +⋯+a2nx2xn+⋯+

a n 1 x n x 1 + a n 2 x n x 2 + + a n n x n 2 = i , j = 1 n a i j x i x j a_{n1}x_{n}x_{1} + a_{n2}x_{n}x_{2} + \cdots + a_{nn}x_{n}^{\ 2} = \sum_{i\ ,\ j = 1}^{n}{a_{ij}x_{i}x_{j}}

对于二次型,

寻求可逆的线性变换 { x 1 = c 11 y 1 + c 12 y 2 + + c 1 n y n x 2 = c 21 y 1 + c 22 y 2 + + c 2 n y n x n = c n 1 y 1 + c n 2 y 2 + + c n n y n \left\{ \begin{array}{r} \begin{matrix} x_{1} = c_{11}y_{1} + c_{12}y_{2} + \cdots + c_{1n}y_{n} \\ x_{2} = c_{21}y_{1} + c_{22}y_{2} + \cdots + c_{2n}y_{n} \end{matrix} \\ \begin{matrix} \cdots\cdots\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \cdots\cdots \\ x_{n} = c_{n1}y_{1} + c_{n2}y_{2} + \cdots + c_{nn}y_{n} \end{matrix} \end{array} \right.\ 使二次型只含平方项

也就是用线性变换代入二次型 , 能使f=k1 y 1 2 y_{1}^{\ 2} +k2 y 2 2 y_{2}^{\ 2} +⋯+kn y n 2 y_{n}^{\ 2}

这种只含平方项的二次型 , 称为二次型的标准形(或法式)

如果标准形的系数k1 , k2 , ⋯ , kn只在1 , -1 , 0三个数中取值

也就是用线性变换代入二次型 , 能使f= y 1 2 y_{1}^{\ 2} +⋯+ y p 2 y_{p}^{\ 2} - y p + 1 2 y_{p + 1}^{\ 2} - ⋯ - y r 2 y_{r}^{\ 2}

则称上式为二次型的规范形

当aij为复数时 , f称为复二次型 ; 当aij为实数时 , 称为实二次型

这里 , 我们仅讨论实二次型 , 所求的线性变换也限于实系数范围

因为 A A 对称,即 a i j = a j i a_{ij} = a_{ji} ,则 a i j + a j i = 2 a i j a_{ij} + a_{ji} = 2a_{ij}

于是利用矩阵,二次型有如下表示:

f = a 11 x 1 2 + a 22 x 2 2 + + a n n x n 2 + 2 a 12 x 1 x 2 + 2 a 13 x 1 x 3 + + 2 a n 1 , n x n 1 x n . f = a_{11}x_{1}^{2} + a_{22}x_{2}^{2} + \cdots + a_{nn}x_{n}^{2} + 2a_{12}x_{1}x_{2} + 2a_{13}x_{1}x_{3} + \cdots + 2a_{n - 1,n}x_{n - 1}x_{n}.

=a11 x 1 2 x_{1}^{\ 2} +a12x1x2+⋯+a1nx1xn+a21x2x1+a22 x 2 2 x_{2}^{\ 2} +⋯+a2nx2xn+⋯+

a n 1 x n x 1 + a n 2 x n x 2 + + a n n x n 2 a_{n1}x_{n}x_{1} + a_{n2}x_{n}x_{2} + \cdots + a_{nn}x_{n}^{\ 2}

= x 1 ( a 11 x 1 + a 12 x 2 + + a 1 n x n ) + x 2 ( a 21 x 1 + a 22 x 2 + + a 2 n x n ) = x_{1}(a_{11}x_{1} + a_{12}x_{2} + \cdots + a_{1n}x_{n})\mspace{6mu} + \mspace{6mu} x_{2}(a_{21}x_{1} + a_{22}x_{2} + \cdots + a_{2n}x_{n})\mspace{6mu}

+ + x n ( a n 1 x 1 + a n 2 x 2 + + a n n x n ) + \mspace{6mu}\cdots\mspace{6mu} + \mspace{6mu} x_{n}(a_{n1}x_{1} + a_{n2}x_{2} + \cdots + a_{nn}x_{n})

= ( x 1 , x 2 , , x n ) [ a 11 x 1 + a 12 x 2 + + a 1 n x n a 21 x 1 + a 22 x 2 + + a 2 n x n a n 1 x 1 + a n 2 x 2 + + a n n x n ] = (x_{1},x_{2},\cdots,x_{n})\begin{bmatrix} a_{11}x_{1} + a_{12}x_{2} + \cdots + a_{1n}x_{n} \\ a_{21}x_{1} + a_{22}x_{2} + \cdots + a_{2n}x_{n} \\ \vdots \\ a_{n1}x_{1} + a_{n2}x_{2} + \cdots + a_{nn}x_{n} \end{bmatrix}

= ( 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 ] (x_{1},x_{2},\cdots,x_{n})\begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ \vdots \\ x_{n} \end{bmatrix}

记A= [ a 11 a 21 a n 1 a 12 a 22 a n 2 a 1 n a 2 n a n n ] \left\lbrack \begin{array}{r} \begin{matrix} a_{11} \\ a_{21} \end{matrix} \\ \begin{matrix} \vdots \\ a_{n1} \end{matrix} \end{array}\ \ \ \ \ \begin{array}{r} \begin{matrix} a_{12} \\ a_{22} \end{matrix} \\ \begin{matrix} \vdots \\ a_{n2} \end{matrix} \end{array}\ \ \ \ \ \begin{array}{r} \begin{matrix} \cdots \\ \cdots \end{matrix} \\ \begin{matrix} \\ \cdots \end{matrix} \end{array}\ \ \ \ \ \begin{array}{r} \begin{matrix} a_{1n} \\ a_{2n} \end{matrix} \\ \begin{matrix} \vdots \\ a_{nn} \end{matrix} \end{array} \right\rbrack , x= [ x 1 x 2 x n ] \left\lbrack \begin{array}{r} \begin{matrix} x_{1} \\ x_{2} \end{matrix} \\ \begin{matrix} \vdots \\ x_{n} \end{matrix} \end{array} \right\rbrack

则二次型可记作f=xTAx , 其中A为对称矩阵

例如 , 二次型f=x2-3z2-4xy+yz用矩阵记号写出来

就是f=(x , y , z) [ 1 2 0 2 0 1 2 0 1 2 3 ] [ x y z ] \begin{bmatrix} 1 & - 2 & 0 \\ - 2 & 0 & \frac{1}{2} \\ 0 & \frac{1}{2} & - 3 \end{bmatrix}\begin{bmatrix} x \\ y \\ z \end{bmatrix}

任给一个二次型 , 就惟一地确定一个对称矩阵

反之 , 任给一个对称矩阵 , 也可惟一地确定一个二次型

这样 , 二次型与对称矩阵之间存在一一对应的关系

因此 , 我们把对称矩阵A叫做二次型f的矩阵

也把f叫做对称矩阵A的二次型

对称矩阵A的秩就叫做二次型f的秩

记C=(cij) , 把可逆变换 { x 1 = c 11 y 1 + c 12 y 2 + + c 1 n y n x 2 = c 21 y 1 + c 22 y 2 + + c 2 n y n x n = c n 1 y 1 + c n 2 y 2 + + c n n y n \left\{ \begin{array}{r} \begin{matrix} x_{1} = c_{11}y_{1} + c_{12}y_{2} + \cdots + c_{1n}y_{n} \\ x_{2} = c_{21}y_{1} + c_{22}y_{2} + \cdots + c_{2n}y_{n} \end{matrix} \\ \begin{matrix} \cdots\cdots\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \cdots\cdots \\ x_{n} = c_{n1}y_{1} + c_{n2}y_{2} + \cdots + c_{nn}y_{n} \end{matrix} \end{array} \right.\ 记作x=Cy , 代入f=xTAx

有f=xTAx=(Cy)TACy=yT(CTAC)y

定义9设A和B是n阶矩阵 , 若有可逆矩阵C , 使等式CTAC=B成立,

则称矩阵A与B合同,B 称为A的合同矩阵。

例如:设A= [ 2 0 0 3 ] \begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix} ,可找到一个可逆矩阵C= [ 1 1 0 1 ] \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}

( C T A ) C = ( 1 0 1 1 ) ( 2 0 0 3 ) ( 1 1 0 1 ) = ( 2 2 2 5 ) (C^{T}A)C = \begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix}\begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 2 & 2 \\ 2 & 5 \end{pmatrix}

令B= ( 2 2 2 5 ) \begin{pmatrix} 2 & 2 \\ 2 & 5 \end{pmatrix} ,由于存在可逆矩阵C= [ 1 1 0 1 ] \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} ,使得CTAC=B成立,

所以矩阵A与B合同

定理:

若A为对称矩阵 , 则合同矩阵B=CTAC也是对称矩阵 , 且R(B)=R(A)

证:

1. 证明B=CᵀAC是对称矩阵

已知A是对称矩阵,即Aᵀ=A。

对B=CᵀAC求转置,根据矩阵转置的运算法则(ABC)ᵀ=CᵀBᵀAᵀ,可得

Bᵀ=(CᵀAC)ᵀ=CᵀAᵀ(Cᵀ)ᵀ=CᵀAC=B

所以B是对称矩阵。

2. 证明R(B)=R(A)

因为C是可逆矩阵,可逆矩阵可以表示为一系列初等矩阵的乘积。

设C=P₁P₂…Pₛ,其中Pᵢ(i=1,2,…,s)是初等矩阵,则Cᵀ=Pₛᵀ…P₂ᵀP₁ᵀ。

B=CᵀAC=Pₛᵀ…P₂ᵀP₁ᵀAP₁P₂…Pₛ。

由于左乘和右乘初等矩阵相当于对矩阵A进行初等行变换和初等列变换,

而初等变换不改变矩阵的秩,所以R(B)=R(A)。

所以 , 经可逆变换x=Cy后 , 二次型f的矩阵由A变为与A合同的矩阵CTAC,

且二次型的秩不变

举例验证

1. 选一个对称矩阵 A A A = ( 1 2 2 3 ) A = \begin{pmatrix} 1 & 2 \\ 2 & 3 \end{pmatrix} ,显然 A T = A A^{T} = A

2. 选一个可逆矩阵 C C C = ( 1 0 1 1 ) C = \begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix} ,其行列式 d e t ( C ) = 1 0 det(C) = 1 \neq 0 ,可逆。

3. 计算 B = C T A C B = C^{T}AC

A C = ( 1 2 2 3 ) ( 1 0 1 1 ) = ( 1 1 + 2 1 1 0 + 2 1 2 1 + 3 1 2 0 + 3 1 ) = ( 3 2 5 3 ) AC = \begin{pmatrix} 1 & 2 \\ 2 & 3 \end{pmatrix}\begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix} = \begin{pmatrix} 1 \cdot 1 + 2 \cdot 1 & 1 \cdot 0 + 2 \cdot 1 \\ 2 \cdot 1 + 3 \cdot 1 & 2 \cdot 0 + 3 \cdot 1 \end{pmatrix} = \begin{pmatrix} 3 & 2 \\ 5 & 3 \end{pmatrix}

B = C T ( A C ) = ( 1 1 0 1 ) ( 3 2 5 3 ) = ( 1 3 + 1 5 1 2 + 1 3 0 3 + 1 5 0 2 + 1 3 ) = ( 8 5 5 3 ) B = C^{T}(AC) = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}\begin{pmatrix} 3 & 2 \\ 5 & 3 \end{pmatrix} = \begin{pmatrix} 1 \cdot 3 + 1 \cdot 5 & 1 \cdot 2 + 1 \cdot 3 \\ 0 \cdot 3 + 1 \cdot 5 & 0 \cdot 2 + 1 \cdot 3 \end{pmatrix} = \begin{pmatrix} 8 & 5 \\ 5 & 3 \end{pmatrix}

4. 检查对称性

B T = ( 8 5 5 3 ) = B B^{T} = \begin{pmatrix} 8 & 5 \\ 5 & 3 \end{pmatrix} = B , 确实对称。

5. 检查秩

r ( A ) = 2 r(A) = 2 r ( B ) = 2 r(B) = 2 ,所以 r ( B ) = r ( A ) r(B) = r(A)

要使二次型f经可逆变换x=Cy变成标准形 , 这就是要使

yTCTACy=k1 y 1 2 y_{1}^{2} +k2 y 2 2 y_{2}^{2} +⋯+kn y n 2 y_{n}^{2} =(y1 , y2 , ⋯ , yn) [ k 1 k 2 k n ] [ y 1 y 2 y n ] \left\lbrack \begin{array}{r} \begin{matrix} k_{1} \\ \end{matrix} \\ \begin{matrix} \\ \end{matrix} \end{array}\ \ \ \ \ \begin{array}{r} \begin{matrix} \\ k_{2} \end{matrix} \\ \begin{matrix} \\ \end{matrix} \end{array}\ \ \ \ \ \begin{array}{r} \begin{matrix} \\ \end{matrix} \\ \begin{matrix} \ddots \\ \end{matrix} \end{array}\ \ \ \ \ \begin{array}{r} \begin{matrix} \\ \end{matrix} \\ \begin{matrix} \\ k_{n} \end{matrix} \end{array} \right\rbrack\left\lbrack \begin{array}{r} \begin{matrix} y_{1} \\ y_{2} \end{matrix} \\ \begin{matrix} \vdots \\ y_{n} \end{matrix} \end{array} \right\rbrack

也就是要使CTAC成为对角矩阵

因此 , 对于对称矩阵A , 寻求可逆矩阵C , 使CTAC为对角矩阵

这就称为把对称矩阵A合同对角化

因为任给对称矩阵A , 总有正交矩阵P , 使P-1AP=Λ , 即PTAP=Λ

把此结论应用于二次型 , 即有下面定理

𝟔 f = i , j = 1 n a i j x i x j ( a i j = a j i ) x = P y \mathbf{定理6}\ 任给二次型f = \sum_{i\ ,\ j = 1}^{n}{a_{ij}x_{i}x_{j}\ \ \left( a_{ij} = a_{ji} \right)},总有正交变换x = Py

使二次型f化为标准形f=λ1 y 1 2 y_{1}^{2} 2 y 2 2 y_{2}^{2} +⋯+λn y n 2 y_{n}^{2}

其中λ1 , λ2 ,⋯ , λn是标准形f的矩阵A=(aij)的特征值

举例验证

1. 取一个二次型 f ( x 1 , x 2 ) = 2 x 1 2 + 4 x 1 x 2 + 5 x 2 2 f(x_{1},x_{2}) = 2x_{1}^{2} + 4x_{1}x_{2} + 5x_{2}^{2}

这里 A = ( 2 2 2 5 ) A = \begin{pmatrix} 2 & 2 \\ 2 & 5 \end{pmatrix}

2. 求特征值

d e t ( A λ I ) = | 2 λ 2 2 5 λ | = ( λ 1 ) ( λ 6 ) = 0 det(A - \lambda I) = \left| \begin{matrix} 2 - \lambda & 2 \\ 2 & 5 - \lambda \end{matrix} \right| = (\lambda - 1)(\lambda - 6) = 0

特征值: λ 1 = 1 , λ 2 = 6 \lambda_{1} = 1,\quad\lambda_{2} = 6

3. 求正交矩阵 P P

对于 λ 1 = 1 \lambda_{1} = 1 : 解 ( A I ) v = ( 1 2 2 4 ) v = 0 (A - I)v = \begin{pmatrix} 1 & 2 \\ 2 & 4 \end{pmatrix}v = 0

得基础解 v = [ 2 1 ] v = \left\lbrack \begin{array}{r} 2 \\ - 1 \end{array} \right\rbrack ,归一化: u 1 = 1 5 [ 2 1 ] \quad u_{1} = \frac{1}{\sqrt{5}}\left\lbrack \begin{array}{r} 2 \\ - 1 \end{array} \right\rbrack

对于 λ 2 = 6 \lambda_{2} = 6 : 解 ( A 6 I ) v = ( 4 2 2 1 ) v = 0 (A - 6I)v = \begin{pmatrix} - 4 & 2 \\ 2 & - 1 \end{pmatrix}v = 0

得基础解 v = [ 1 2 ] v = \left\lbrack \begin{array}{r} 1 \\ 2 \end{array} \right\rbrack ,归一化: u 2 = 1 5 [ 1 2 ] u_{2} = \frac{1}{\sqrt{5}}\left\lbrack \begin{array}{r} 1 \\ 2 \end{array} \right\rbrack

正交矩阵 P = ( 2 5 1 5 1 5 2 5 ) P = \begin{pmatrix} \frac{2}{\sqrt{5}} & \frac{1}{\sqrt{5}} \\ - \frac{1}{\sqrt{5}} & \frac{2}{\sqrt{5}} \end{pmatrix}

检查 P T P = I P^{T}P = I (成立)。

4. 验证正交变换 x = P y x = Py 将二次型化为标准形

已知 f = x T A x f = x^{T}Ax ,令 x = P y x = Py ,则 f = ( P y ) T A ( P y ) = y T ( P T A P ) y f = (Py)^{T}A(Py) = y^{T}(P^{T}AP)y

P T A P P^{T}AP 应该等于对角矩阵 Λ = d i a g ( 1 , 6 ) \Lambda = diag(1,6)

检查: P T A P = ( 2 5 1 5 1 5 2 5 ) ( 2 2 2 5 ) ( 2 5 1 5 1 5 2 5 ) P^{T}AP = \begin{pmatrix} \frac{2}{\sqrt{5}} & - \frac{1}{\sqrt{5}} \\ \frac{1}{\sqrt{5}} & \frac{2}{\sqrt{5}} \end{pmatrix}\begin{pmatrix} 2 & 2 \\ 2 & 5 \end{pmatrix}\begin{pmatrix} \frac{2}{\sqrt{5}} & \frac{1}{\sqrt{5}} \\ - \frac{1}{\sqrt{5}} & \frac{2}{\sqrt{5}} \end{pmatrix} = ( 1 0 0 6 ) \begin{pmatrix} 1 & 0 \\ 0 & 6 \end{pmatrix}

5. 结论 经过正交变换 x = P y x = Py ,得标准形 f = y 1 2 + 6 y 2 2 f = y_{1}^{2} + 6y_{2}^{2}

特征值 1 和 6 正是标准形中的系数。

推论 任给n元二次型f(x)=xTAx (AT=A), 总有可逆变换x=Cz ,

使f(Cz)化为规范形f= y 1 2 y_{1}^{\ 2} +⋯+ y p 2 y_{p}^{\ 2} - y p + 1 2 y_{p + 1}^{\ 2} - ⋯ - y r 2 y_{r}^{\ 2}

证明:

考虑 n n 元实二次型 f ( x ) = x T A x f(x) = x^{T}Ax ,其中 A A n × n n \times n 实对称矩阵,即 A T = A A^{T} = A

1. 实对称矩阵可正交对角化

由实对称矩阵的性质,存在 n n 阶正交矩阵 Q Q (即 Q T Q = I Q^{T}Q = I ),

使得 Q T A Q = Λ , Q^{T}AQ = \Lambda, 其中 Λ = d i a g ( λ 1 , , λ n ) \Lambda = diag(\lambda_{1},\ldots,\lambda_{n}) ,且 λ 1 , , λ n \lambda_{1},\ldots,\lambda_{n} \in \mathbb{R}

2. 作正交变换

x = Q y x = Qy ,则 f ( x ) = x T A x = y T ( Q T A Q ) y = λ 1 y 1 2 + + λ n y n 2 . f(x) = x^{T}Ax = y^{T}(Q^{T}AQ)y = \lambda_{1}y_{1}^{2} + \cdots + \lambda_{n}y_{n}^{2}.

此时二次型化为标准形(系数为特征值,可正、可负、可零)。

3. 进一步化为规范形

p p 个特征值为正, q q 个特征值为负, r = p + q r = p + q ,其余 n r n - r 个特征值为零。

重排次序使得 λ 1 , , λ p > 0 , λ p + 1 , , λ r < 0 , λ r + 1 , , λ n = 0 . \lambda_{1},\ldots,\lambda_{p} > 0,\quad\lambda_{p + 1},\ldots,\lambda_{r} < 0,\quad\lambda_{r + 1},\ldots,\lambda_{n} = 0.

z i = { 1 λ i y i , i = 1 , , p , 1 λ i y i , i = p + 1 , , r , y i , i = r + 1 , , n . z_{i} = \left\{ \begin{matrix} \frac{1}{\sqrt{\lambda_{i}}}\, y_{i}, & i = 1,\ldots,p, \\ \frac{1}{\sqrt{- \lambda_{i}}}\, y_{i}, & i = p + 1,\ldots,r, \\ y_{i}, & i = r + 1,\ldots,n. \end{matrix} \right.\

f = z 1 2 + + z p 2 z p + 1 2 z r 2 + 0 z r + 1 2 + + 0 z n 2 . f = z_{1}^{2} + \cdots + z_{p}^{2} - z_{p + 1}^{2} - \cdots - z_{r}^{2} + 0 \cdot z_{r + 1}^{2} + \cdots + 0 \cdot z_{n}^{2}.

规范形中通常去掉零项,只写到 z r z_{r} ,即 f = z 1 2 + + z p 2 z p + 1 2 z r 2 . f = z_{1}^{2} + \cdots + z_{p}^{2} - z_{p + 1}^{2} - \cdots - z_{r}^{2}.

4. 变换的可逆性

变换过程为: x = Q y = Q D z , x = Qy = QDz,

其中 D = d i a g ( 1 λ 1 , , 1 λ p , 1 λ p + 1 , , 1 λ r , 1 , , 1 ) . D = diag\left( \frac{1}{\sqrt{\lambda_{1}}},\ldots,\frac{1}{\sqrt{\lambda_{p}}},\frac{1}{\sqrt{- \lambda_{p + 1}}},\ldots,\frac{1}{\sqrt{- \lambda_{r}}},1,\ldots,1 \right).

由于 Q Q 可逆, D D 可逆(对角线元素非零),故 C = Q D C = QD 是可逆矩阵。

因此存在可逆线性变换 x = C z x = Cz ,使二次型化为规范形。

示例:求二次型的规范形

考虑二次型 f ( x 1 , x 2 , x 3 ) = 2 x 1 x 2 + 2 x 1 x 3 2 x 2 x 3 , f(x_{1},x_{2},x_{3}) = 2x_{1}x_{2} + 2x_{1}x_{3} - 2x_{2}x_{3},

其对称矩阵为 A = ( 0 1 1 1 0 1 1 1 0 ) . A = \begin{pmatrix} 0 & 1 & 1 \\ 1 & 0 & - 1 \\ 1 & - 1 & 0 \end{pmatrix}.

第一步:求矩阵 A A 的特征值与特征向量

1. 特征多项式

d e t ( A λ I ) = | λ 1 1 1 λ 1 1 1 λ | = ( λ 1 ) 2 ( λ + 2 ) = 0 det(A - \lambda I) = \left| \begin{matrix} - \lambda & 1 & 1 \\ 1 & - \lambda & - 1 \\ 1 & - 1 & - \lambda \end{matrix} \right| = - (\lambda - 1)^{2}(\lambda + 2) = 0

特征值为 λ 1 = 1 ( 二重 ) , λ 2 = 2 ( 一重 ) . \lambda_{1} = 1\mspace{6mu}(\text{二重}),\quad\lambda_{2} = - 2\mspace{6mu}(\text{一重}).

2. 求特征向量

对于 λ = 1 \lambda = 1 : 解 ( A I ) x = ( 1 1 1 1 1 1 1 1 1 ) [ x 1 x 2 x 3 ] = [ 0 0 0 ] (A - I)x = \begin{pmatrix} - 1 & 1 & 1 \\ 1 & - 1 & - 1 \\ 1 & - 1 & - 1 \end{pmatrix}\left\lbrack \begin{array}{r} x_{1} \\ x_{2} \\ x_{3} \end{array} \right\rbrack = \left\lbrack \begin{array}{r} 0 \\ 0 \\ 0 \end{array} \right\rbrack

两个线性无关的解可取为 v 1 = ( 1 1 0 ) , v 2 = ( 1 0 1 ) . v_{1} = \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix},\quad v_{2} = \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix}.

对于 λ = 2 \lambda = - 2 : 解 ( A + 2 I ) x = ( 2 1 1 1 2 1 1 1 2 ) [ x 1 x 2 x 3 ] = [ 0 0 0 ] (A + 2I)x = \begin{pmatrix} 2 & 1 & 1 \\ 1 & 2 & - 1 \\ 1 & - 1 & 2 \end{pmatrix}\left\lbrack \begin{array}{r} x_{1} \\ x_{2} \\ x_{3} \end{array} \right\rbrack = \left\lbrack \begin{array}{r} 0 \\ 0 \\ 0 \end{array} \right\rbrack

解得 v 3 = ( 1 1 1 ) . v_{3} = \begin{pmatrix} 1 \\ - 1 \\ - 1 \end{pmatrix}.

3. 正交化与单位化

由于 v 1 v_{1} v 2 v_{2} 不正交(内积为 1 1 ),需进行施密特正交化。

u 1 = v 1 = ( 1 1 0 ) . u_{1} = v_{1} = \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix}. 单位化得 e 1 = 1 2 ( 1 1 0 ) . e_{1} = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix}.

v 2 v_{2} 正交化:

u 2 = v 2 v 2 u 1 u 1 u 1 u 1 = ( 1 0 1 ) 1 2 ( 1 1 0 ) = ( 1 2 1 2 1 ) = ( 1 1 2 ) u_{2} = v_{2} - \frac{v_{2} \cdot u_{1}}{u_{1} \cdot u_{1}}u_{1} = \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix} - \frac{1}{2}\begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix} = \begin{pmatrix} \frac{1}{2} \\ - \frac{1}{2} \\ 1 \end{pmatrix} = \begin{pmatrix} 1 \\ - 1 \\ 2 \end{pmatrix}

单位化得 e 2 = 1 6 ( 1 1 2 ) . e_{2} = \frac{1}{\sqrt{6}}\begin{pmatrix} 1 \\ - 1 \\ 2 \end{pmatrix}.

λ = 2 \lambda = - 2 的特征向量 v 3 v_{3} 单位化: e 3 = 1 3 ( 1 1 1 ) . e_{3} = \frac{1}{\sqrt{3}}\begin{pmatrix} 1 \\ - 1 \\ - 1 \end{pmatrix}.

于是得到正交矩阵 Q = ( 1 2 1 6 1 3 1 2 1 6 1 3 0 2 6 1 3 ) . Q = \begin{pmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} & \frac{1}{\sqrt{3}} \\ \frac{1}{\sqrt{2}} & - \frac{1}{\sqrt{6}} & - \frac{1}{\sqrt{3}} \\ 0 & \frac{2}{\sqrt{6}} & - \frac{1}{\sqrt{3}} \end{pmatrix}.

4. 正交对角化

由实对称矩阵性质: Q T A Q = d i a g ( 1 , 1 , 2 ) . Q^{T}AQ = diag(1,\mspace{6mu} 1,\mspace{6mu} - 2).

x = Q y x = Qy ,则 f = x T A x = y T ( Q T A Q ) y = y 1 2 + y 2 2 2 y 3 2 . f = x^{T}Ax = y^{T}(Q^{T}AQ)y = y_{1}^{2} + y_{2}^{2} - 2y_{3}^{2}.

这是标准形。

5. 化为规范形

z 1 = y 1 , z 2 = y 2 , z 3 = 2 y 3 , z_{1} = y_{1},\quad z_{2} = y_{2},\quad z_{3} = \sqrt{2}\, y_{3},

f = z 1 2 + z 2 2 z 3 2 . f = z_{1}^{2} + z_{2}^{2} - z_{3}^{2}.

对应的可逆变换为 x = C z x = Cz

其中 C = Q d i a g ( 1 , 1 , 1 2 ) = ( 1 2 1 6 1 6 1 2 1 6 1 6 0 2 6 1 6 ) . C = Q \cdot diag\left( 1,\mspace{6mu} 1,\mspace{6mu}\frac{1}{\sqrt{2}} \right) = \begin{pmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} & \frac{1}{\sqrt{6}} \\ \frac{1}{\sqrt{2}} & - \frac{1}{\sqrt{6}} & - \frac{1}{\sqrt{6}} \\ 0 & \frac{2}{\sqrt{6}} & - \frac{1}{\sqrt{6}} \end{pmatrix}.

第二步:验证

C T A C = ( 1 2 1 2 0 1 6 1 6 2 6 1 6 1 6 1 6 ) ( 0 1 1 1 0 1 1 1 0 ) ( 1 2 1 6 1 6 1 2 1 6 1 6 0 2 6 1 6 ) C^{T}AC = \begin{pmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} & 0 \\ \frac{1}{\sqrt{6}} & - \frac{1}{\sqrt{6}} & \frac{2}{\sqrt{6}} \\ \frac{1}{\sqrt{6}} & - \frac{1}{\sqrt{6}} & - \frac{1}{\sqrt{6}} \end{pmatrix}\begin{pmatrix} 0 & 1 & 1 \\ 1 & 0 & - 1 \\ 1 & - 1 & 0 \end{pmatrix}\begin{pmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} & \frac{1}{\sqrt{6}} \\ \frac{1}{\sqrt{2}} & - \frac{1}{\sqrt{6}} & - \frac{1}{\sqrt{6}} \\ 0 & \frac{2}{\sqrt{6}} & - \frac{1}{\sqrt{6}} \end{pmatrix}

= ( 1 0 0 0 1 0 0 0 1 ) = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & - 1 \end{pmatrix}

因此规范形为 f = z 1 2 + z 2 2 z 3 2 . f = z_{1}^{2} + z_{2}^{2} - z_{3}^{2}.

结论: 通过可逆变换 x = C z x = Cz ,原二次型化为规范形,

例14 求一个正交变换 x = P y x = Py

把二次型 f = 2 x 1 x 2 + 2 x 1 x 3 + 2 x 2 x 3 f = - 2x_{1}x_{2} + 2x_{1}x_{3} + 2x_{2}x_{3} 化为标准形。

解:

1. 求二次型矩阵

根据二次型定义,对称矩阵 为: A = [ 0 1 1 1 0 1 1 1 0 ] . A = \begin{bmatrix} 0 & - 1 & 1 \\ - 1 & 0 & 1 \\ 1 & 1 & 0 \end{bmatrix}.

2. 求矩阵 A A 的特征值

计算特征方程: | λ E A | = | λ 1 1 1 λ 1 1 1 λ | = ( λ 1 ) 2 ( λ + 2 ) = 0 . |\lambda E - A| = \left| \begin{matrix} \lambda & 1 & - 1 \\ 1 & \lambda & - 1 \\ - 1 & - 1 & \lambda \end{matrix} \right| = (\lambda - 1)^{2}(\lambda + 2) = 0.

解得: λ 1 = 2 λ 2 = 1 ( ) , \quad\lambda_{1} = - 2,\lambda_{2} = 1\ (二重),

3. 求特征向量并正交单位化

对于 λ 1 = 2 \lambda_{1} = - 2

解方程组 ( A + 2 E ) x = [ 2 1 1 1 2 1 1 1 2 ] [ x 1 x 2 x 3 ] = [ 0 0 0 ] (A + 2E)x = \begin{bmatrix} 2 & - 1 & 1 \\ - 1 & 2 & 1 \\ 1 & 1 & 2 \end{bmatrix}\left\lbrack \begin{array}{r} x_{1} \\ x_{2} \\ x_{3} \end{array} \right\rbrack = \left\lbrack \begin{array}{r} 0 \\ 0 \\ 0 \end{array} \right\rbrack

得基础解系: ξ 1 = [ 1 1 1 ] . \xi_{1} = \begin{bmatrix} - 1 \\ - 1 \\ 1 \end{bmatrix}.

单位化: p 1 = ξ 1 ξ 1 = [ 1 3 1 3 1 3 ] . p_{1} = \frac{\xi_{1}}{\parallel \xi_{1} \parallel} = \begin{bmatrix} - \frac{1}{\sqrt{3}} \\ - \frac{1}{\sqrt{3}} \\ \frac{1}{\sqrt{3}} \end{bmatrix}.

对于 λ 2 = 1 \lambda_{2} = 1

( A E ) x = [ 1 1 1 1 1 1 1 1 1 ] [ x 1 x 2 x 3 ] = [ 0 0 0 ] (A - E)x = \begin{bmatrix} - 1 & - 1 & 1 \\ - 1 & - 1 & 1 \\ 1 & 1 & - 1 \end{bmatrix}\left\lbrack \begin{array}{r} x_{1} \\ x_{2} \\ x_{3} \end{array} \right\rbrack = \left\lbrack \begin{array}{r} 0 \\ 0 \\ 0 \end{array} \right\rbrack

得 基础解系: ξ 2 = [ 1 1 0 ] , ξ 3 = [ 1 0 1 ] . \xi_{2} = \begin{bmatrix} - 1 \\ 1 \\ 0 \end{bmatrix},\quad\xi_{3} = \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix}.

施密特正交化:

η 2 = ξ 2 \eta_{2} = \xi_{2}

η 3 = ξ 3 ξ 3 , η 2 η 2 , η 2 η 2 = [ 1 0 1 ] 1 2 [ 1 1 0 ] = [ 1 2 1 2 1 ] . \eta_{3} = \xi_{3} - \frac{\langle\xi_{3},\eta_{2}\rangle}{\langle\eta_{2},\eta_{2}\rangle}\eta_{2} = \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} - \frac{- 1}{2}\begin{bmatrix} - 1 \\ 1 \\ 0 \end{bmatrix} = \begin{bmatrix} \frac{1}{2} \\ \frac{1}{2} \\ 1 \end{bmatrix}.

单位化: p 2 = η 2 η 2 = [ 1 2 1 2 0 ] , p 3 = η 3 η 3 = [ 1 6 1 6 2 6 ] . p_{2} = \frac{\eta_{2}}{\parallel \eta_{2} \parallel} = \begin{bmatrix} - \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \\ 0 \end{bmatrix},\ \ \ \ \ \ \ \ p_{3} = \frac{\eta_{3}}{\parallel \eta_{3} \parallel} = \begin{bmatrix} \frac{1}{\sqrt{6}} \\ \frac{1}{\sqrt{6}} \\ \frac{2}{\sqrt{6}} \end{bmatrix}.

4. 构造正交矩阵 P P

将单位正交特征向量按列排列(通常按特征值从小到大顺序排列):

P = [ p 1 p 2 p 3 ] = [ 1 3 1 2 1 6 1 3 1 2 1 6 1 3 0 2 6 ] . P = \begin{bmatrix} p_{1} & p_{2} & p_{3} \end{bmatrix} = \begin{bmatrix} - \frac{1}{\sqrt{3}} & - \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\ - \frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\ \frac{1}{\sqrt{3}} & 0 & \frac{2}{\sqrt{6}} \end{bmatrix}.

此时 P T A P = Λ P^{T}AP = \Lambda ,其中: Λ = [ 2 0 0 0 1 0 0 0 1 ] . \Lambda = \begin{bmatrix} - 2 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}.

5. 正交变换与标准形

令正交变换 x = P y x = Py

代入二次型: f = x T A x = ( P y ) T A ( P y ) = y T ( P T A P ) y = y T Λ y . f = x^{T}Ax = (Py)^{T}A(Py) = y^{T}(P^{T}AP)y = y^{T}\Lambda y.

于是得标准形: f = y T Λ y = [ y 1 y 2 y 3 ] [ 2 0 0 0 1 0 0 0 1 ] [ y 1 y 2 y 3 ] = 2 y 1 2 + y 2 2 + y 3 2 . f = y^{T}\Lambda y = \begin{bmatrix} y_{1} & y_{2} & y_{3} \end{bmatrix}\begin{bmatrix} - 2 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}\begin{bmatrix} y_{1} \\ y_{2} \\ y_{3} \end{bmatrix} = - 2y_{1}^{2} + y_{2}^{2} + y_{3}^{2}.

6. 化为规范形

由标准形 f = 2 y 1 2 + y 2 2 + y 3 2 f = - 2y_{1}^{2} + y_{2}^{2} + y_{3}^{2}

引入代换: { y 1 = 1 2 z 1 y 2 = z 2 y 3 = z 3 \left\{ \begin{matrix} y_{1} = \frac{1}{\sqrt{2}}z_{1} \\ y_{2} = z_{2} \\ y_{3} = z_{3} \end{matrix} \right.\ ,则: 2 y 1 2 = 2 ( 1 2 z 1 2 ) = z 1 2 - 2y_{1}^{2} = - 2 \cdot \left( \frac{1}{2}z_{1}^{2} \right) = - z_{1}^{2}

于是: f = z 1 2 + z 2 2 + z 3 2 f = - z_{1}^{2} + z_{2}^{2} + z_{3}^{2}