1. 问题描述
给定 n n n 元变量 x 1 x_1 x1, x 2 x_2 x2, x 3 x_3 x3, ⋯ \cdots ⋯, x n x_n xn二次多项式,任意两两变量之间的系数关系关系如下,
x 1 x_1 x1 | x 2 x_2 x2 | x 3 x_3 x3 | ⋯ \cdots ⋯ | x n x_n xn | |
---|---|---|---|---|---|
x 1 x_1 x1 | a 11 a_{11} a11 | a 21 a_{21} a21 | a 31 a_{31} a31 | ⋯ \cdots ⋯ | a n 1 a_{n1} an1 |
x 2 x_2 x2 | a 12 a_{12} a12 | a 22 a_{22} a22 | a 32 a_{32} a32 | ⋯ \cdots ⋯ | a n 2 a_{n2} an2 |
x 3 x_3 x3 | a 13 a_{13} a13 | a 23 a_{23} a23 | a 33 a_{33} a33 | ⋯ \cdots ⋯ | a n 3 a_{n3} an3 |
⋯ \cdots ⋯ | ⋯ \cdots ⋯ | ⋯ \cdots ⋯ | ⋯ \cdots ⋯ | ⋯ \cdots ⋯ | ⋯ \cdots ⋯ |
x n x_n xn | a 1 n a_{1n} a1n | a 2 n a_{2n} a2n | a 3 n a_{3n} a3n | ⋯ \cdots ⋯ | a n n a_{nn} ann |
1.1. 二次多项式表达
上述多项式两两之间的系数关系可以通过二次多项式表达,如下,
f ( x 1 , x 2 , x 3 , ⋯   , x n ) f(x_1, x_2, x_3, \cdots, x_n) f(x1,x2,x3,⋯,xn)
= a 11 x 1 x 1 + a 21 x 2 x 1 + a 31 x 3 x 1 + ⋯ + a n 1 x n x 1 + a 12 x 1 x 2 + a 22 x 2 x 2 + a 32 x 3 x 2 + ⋯ + a n 2 x n x 2 + a 13 x 1 x 3 + a 23 x 2 x 3 + a 33 x 3 x 3 + ⋯ + a n 3 x n x 3 + ⋯ + ⋯ + ⋯ + ⋯ + ⋯ + a 1 n x 1 x n + a 2 n x 2 x n + a 3 n x 3 x n + ⋯ + a n n x n x n =a_{11}x_1x_1 + a_{21}x_2x_1 + a_{31}x_3x_1 + \cdots + a_{n1}x_nx_1\\+ a_{12}x_1x_2 + a_{22}x_2x_2 + a_{32}x_3x_2 + \cdots + a_{n2}x_nx_2\\+ a_{13}x_1x_3 + a_{23}x_2x_3 + a_{33}x_3x_3 + \cdots + a_{n3}x_nx_3\\+ \cdots + \cdots + \cdots + \cdots + \cdots \\+ a_{1n}x_1x_n + a_{2n}x_2x_n + a_{3n}x_3x_n + \cdots + a_{nn}x_nx_n =a11x1x1+a21x2x1+a31x3x1+⋯+an1xnx1+a12x1x2+a22x2x2+a32x3x2+⋯+an2xnx2+a13x1x3+a23x2x3+a33x3x3+⋯+an3xnx3+⋯+⋯+⋯+⋯+⋯+a1nx1xn+a2nx2xn+a3nx3xn+⋯+annxnxn
= ∑ i , j = 1 n , n a i j x i x j =\sum_{i,j=1}^{n,n}{a_{ij}x_ix_j} =∑i,j=1n,naijxixj
1.2. 矩阵表达
上述二次多项式两两之间的系数关系也可以通过矩阵表达,如下,
f ( x 1 , x 2 , x 3 , ⋯   , x n ) f(x_1, x_2, x_3, \cdots, x_n) f(x1,x2,x3,⋯,xn)
= ( x 1 x 2 x 3 ⋯ x n ) ⋅ [ a 11 a 21 a 31 ⋯ a n 1 a 12 a 22 a 32 ⋯ a n 2 a 13 a 23 a 33 ⋯ a n 3 ⋯ ⋯ ⋯ ⋯ ⋯ a 1 n a 2 n a 3 n ⋯ a n n ] ⋅ ( x 1 x 2 x 3 ⋯ x n ) =\begin{pmatrix}x_1 & x_2 & x_3 & \cdots & x_n\end{pmatrix} \cdot \begin{bmatrix} a_{11} & a_{21} & a_{31} & \cdots & a_{n1} \\ a_{12} & a_{22} & a_{32} & \cdots & a_{n2} \\ a_{13} & a_{23} & a_{33} & \cdots & a_{n3} \\ \cdots & \cdots & \cdots & \cdots & \cdots \\ a_{1n} & a_{2n} & a_{3n} & \cdots & a_{nn} \end{bmatrix} \cdot \begin{pmatrix} x_1\\ x_2\\ x_3\\ \cdots\\ x_n \end{pmatrix} =(x1x2x3⋯xn)⋅⎣⎢⎢⎢⎢⎡a11a12a13⋯a1na21a22a23⋯a2na31a32a33⋯a3n⋯⋯⋯⋯⋯an1an2an3⋯ann⎦⎥⎥⎥⎥⎤⋅⎝⎜⎜⎜⎜⎛x1x2x3⋯xn⎠⎟⎟⎟⎟⎞
= a 11 x 1 x 1 + a 21 x 2 x 1 + a 31 x 3 x 1 + ⋯ + a n 1 x n x 1 + a 12 x 1 x 2 + a 22 x 2 x 2 + a 32 x 3 x 2 + ⋯ + a n 2 x n x 2 + a 13 x 1 x 3 + a 23 x 2 x 3 + a 33 x 3 x 3 + ⋯ + a n 3 x n x 3 + ⋯ + ⋯ + ⋯ + ⋯ + ⋯ + a 1 n x 1 x n + a 2 n x 2 x n + a 3 n x 3 x n + ⋯ + a n n x n x n =a_{11}x_1x_1 + a_{21}x_2x_1 + a_{31}x_3x_1 + \cdots + a_{n1}x_nx_1\\+ a_{12}x_1x_2 + a_{22}x_2x_2 + a_{32}x_3x_2 + \cdots + a_{n2}x_nx_2\\+ a_{13}x_1x_3 + a_{23}x_2x_3 + a_{33}x_3x_3 + \cdots + a_{n3}x_nx_3\\+ \cdots + \cdots + \cdots + \cdots + \cdots \\+ a_{1n}x_1x_n + a_{2n}x_2x_n + a_{3n}x_3x_n + \cdots + a_{nn}x_nx_n =a11x1x1+a21x2x1+a31x3x1+⋯+an1xnx1+a12x1x2+a22x2x2+a32x3x2+⋯+an2xnx2+a13x1x3+a23x2x3+a33x3x3+⋯+an3xnx3+⋯+⋯+⋯+⋯+⋯+a1nx1xn+a2nx2xn+a3nx3xn+⋯+annxnxn
不妨令矩阵 A = [ a 11 a 21 a 31 ⋯ a n 1 a 12 a 22 a 32 ⋯ a n 2 a 13 a 23 a 33 ⋯ a n 3 ⋯ ⋯ ⋯ ⋯ ⋯ a 1 n a 2 n a 3 n ⋯ a n n ] A=\begin{bmatrix} a_{11} & a_{21} & a_{31} & \cdots & a_{n1} \\ a_{12} & a_{22} & a_{32} & \cdots & a_{n2} \\ a_{13} & a_{23} & a_{33} & \cdots & a_{n3} \\ \cdots & \cdots & \cdots & \cdots & \cdots \\ a_{1n} & a_{2n} & a_{3n} & \cdots & a_{nn} \end{bmatrix} A=⎣⎢⎢⎢⎢⎡a11a12a13⋯a1na21a22a23⋯a2na31a32a33⋯a3n⋯⋯⋯⋯⋯an1an2an3⋯ann⎦⎥⎥⎥⎥⎤,向量 X ⃗ = ( x 1 , x 2 , x 3 , ⋯   , x n ) \vec{X}=\left ( x_1, x_2, x_3, \cdots, x_n \right ) X=(x1,x2,x3,⋯,xn),即,
f ( x 1 , x 2 , x 3 , ⋯   , x n ) = X ⃗ A X ⃗ T f(x_1, x_2, x_3, \cdots, x_n)= \vec{X}A\vec{X}^{T} f(x1,x2,x3,⋯,xn)=XAXT
1.3. 二次型矩阵
需要说明的是,将二次多项式转换成矩阵的方法有很多,得到的矩阵的形式也不单一。特别地,当矩阵 A A A是对称矩阵的时候,即
∀ i ∈ [ 1 , n ] , j ∈ [ 1 , n ] \forall i\in [1,n], j\in [1,n] ∀i∈[1,n],j∈[1,n], a i j = a j i a_{ij}=a_{ji} aij=aji
这时,我们把矩阵 A A A称为 f ( x 1 , x 2 , x 3 , ⋯   , x n ) f(x_1, x_2, x_3, \cdots, x_n) f(x1,x2,x3,⋯,xn)的二次型矩阵。
2. 举例
问题: 给定 n n n元变量二次多项式表达为 f ( x 1 , x 2 , x 3 , x 4 ) = 2 x 1 2 + x 1 x 2 + 2 x 1 x 3 + 4 x 2 x 4 + x 3 2 + 5 x 4 2 f(x_1, x_2, x_3, x_4) = 2x_1^2 + x_1x_2 + 2x_1x_3 + 4x_2x_4 + x_3^2 + 5x_4^2 f(x1,x2,x3,x4)=2x12+x1x2+2x1x3+4x2x4+x32+5x42,写出其二次型矩阵 [2]。
解: 二次型矩阵如下
A = [ 2 1 2 1 0 1 2 0 0 2 1 0 1 0 0 2 0 5 ] A=\begin{bmatrix}2 & \frac{1}{2} & 1 & 0\\ \frac{1}{2} & 0 & 0 & 2\\ 1 & 0 & 1 & 0\\ 0 & 2 & 0 & 5 \end{bmatrix} A=⎣⎢⎢⎡221102100210100205⎦⎥⎥⎤
其中令向量 X ⃗ = ( x 1 , x 2 , x 3 , x 4 ) \vec{X}=\left ( x_1, x_2, x_3, x_4 \right ) X=(x1,x2,x3,x4),有,
f ( x 1 , x 2 , x 3 , x 4 ) = X ⃗ A X ⃗ T f(x_1, x_2, x_3, x_4) =\vec{X}A\vec{X}^{T} f(x1,x2,x3,x4)=XAXT
3. 小结和展望
本文介绍了基本的二次型矩阵的定义和计算。进一步的工作包括二次型矩阵的性质,譬如,合同矩阵 [4],二次型的标准型 [5] 等。
参考文献
[1] 二次型 https://baike.baidu.com/item/二次型/11030201?fr=aladdin
[2] 二次型矩阵 https://wenku.baidu.com/view/bf3d4359f342336c1eb91a37f111f18583d00c6e.html
[3] 二次型矩阵性质 http://dec3.jlu.edu.cn/webcourse/t000022/teach/chapter5/5_4.htm
[4] 合同矩阵 https://wenku.baidu.com/view/088b59365bcfa1c7aa00b52acfc789eb162d9e5f.html
[5] 二次型标准型 https://jingyan.baidu.com/article/3065b3b6bcbc86becff8a4d3.html