Professional Documents
Culture Documents
1 Quadratic Forms
A quadratic function f : R → R has the form f (x) = a · x2 . Generalization
of this notion to two variables is the quadratic form
Here each term has degree 2 (the sum of exponents is 2 for all summands).
A quadratic form of three variables looks as
f (x1 , x2 , x3 ) =
a11 x21 + a12 x1 x2 + a13 x1 x3 +
a21 x2 x1 + a22 x22 + a23 x2 x3 +
a31 x1 x3 + a32 x3 x2 + a33 x23 .
A general quadratic form of n variables is a real-valued function Q : Rn →
R of the form
Q(x1 , x2 , ..., xn ) = a11 x21 + a12 x1 x2 + ... + a1n x1 xn +
a21 x2 x1 + a22 x22 + ... + a2n x2 xn +
... ... ... ...
an1 xn x1 + an2 xn x2 + ... + ann x2n
P
In short Q(x1 , x2 , ..., xn ) = ni,j aij xi xj .
As we see a quadratic form is determined by the matrix
a11 ... a1n
A = .............. .
an1 ... ann
1
Equivalently Q(x) = xT · A · x.
2 2
Example. The quadratic à form Q(x!1 , x2 , x3 ) = 5x1 − 10x1 x2 + x2 whose
5 −5
symmetric matrix is A = is the product of three matrices
−5 1
à ! x1
5 −5
(x1 , x2 , x3 ) · · x2 .
−5 1
x3
The quadratic form Q(x, y) = −x2 − y 2 is negative for all nonzero argu-
ments (x, y). Such forms are called negative definite.
2
The quadratic form Q(x, y) = −(x − y)2 is nonpositive. This means that
Q(x, y) = (x − y)2 is either negative or zero for nonzero arguments. Such
forms are called negative semidefinite.
1.2.2 Definiteness
Definition. A quadratic form Q(x) = xT · A · x (equivalently a symmetric
matrix A) is
(a) positive definite if Q(x) > 0 for all x 6= 0 ∈ Rn ;
(b) positive semidefinite if Q(x) ≥ 0 for all x 6= 0 ∈ Rn ;
(c) negative definite if Q(x) < 0 for all x 6= 0 ∈ Rn ;
(d) negative semidefinite if Q(x) ≤ 0 for all x 6= 0 ∈ Rn ;
(e) indefinite if Q(x) > 0 for some x and Q(x) < 0 for some other x.
3
1. If D1 > 0 and D2 > 0 then the form is of x2 + y 2 type, so it is positive
definite;
2. If D1 < 0 and D2 > 0 then the form is of −x2 − y 2 type, so it is negative
definite;
3. If D1 > 0 and D2 < 0 then the form is of x2 − y 2 type, so it is indefinite;
If D1 < 0 and D2 < 0 then the form is of −x2 + y 2 type, so it is also
indefinite;
Thus if D2 < 0 then the form is indefinite.
4
Now look:
Q(x1 , x2 , x3 ) = x21 + 2x22 − 7x23 − 4x1 x2 + 8x1 x3 =
x21 − 4x1 x2 + 8x1 x3 + 2x22 − 7x23 = x21 − 4x1 (x2 − 2x3 ) + 2x22 − 7x23 =
[x21 − 4x1 (x2 − 2x3 ) + 4(x2 − 2x3 ) − 4(x2 − 2x3 )] + 2x22 − 7x23 =
[x1 − 2x2 + 4x3 ]2 − 2x22 − 16x2 x3 − 23x23 =
[x1 − 2x2 + 4x3 ]2 − 2(x22 − 8x2 x3 ) − 23x23 =
[x1 − 2x2 + 4x3 ]2 − 2[x22 − 8x2 x3 + 16x23 − 16x23 ] − 23x23 =
[x1 − 2x2 + 4x3 ]2 − 2[x2 − 4x3 ]2 − 16x23 ) − 23x23 =
[x1 − 2x2 + 4x3 ]2 − 2[x2 − 4x3 ]2 + 32x23 − 23x23 =
[x1 − 2x2 + 4x3 ]2 − 2[x2 − 4x3 ]2 + 9x23 =
|D1 |l12 + D
D1
l +D
2 2 3 2
D2 3
l ,
where
l1 = x1 −2x2 +4x3 ,
l2 = x2 −4x3 ,
l3 = x3 .
That is (l1 , l2 , l3 ) are linear combinations of (x1 , x2 , x3 ). More precisely
l1 1 −2 4 x1
l2 = 0 1 −4 · x2
l3 0 0 1 x3
where
1 −2 4
P =
0 1 −4
0 0 1
is a nonsingular matrix (changing variables).
5
where l1 , l2 , l3 are some linear combinations of x1 , x2 , x3 (this is called La-
grange’s reduction).
This implies the following criteria:
1. The form is positive definite iff |D1 | > 0, |D2 | > 0, |D3 | > 0, that is all
principal minors are positive.
2. The form is negative definite iff |D1 | < 0, |D2 | > 0, |D3 | < 0, that is
principal minors alternate in sign starting with negative one.
Example. Determine the definiteness of the form Q(x1 , x2 , x3 ) = 3x21 +2x22 +
3x23 − 2x1 x2 − 2x2 x3 .
Solution. The matrix of our form is
3 −1 0
−1 2 −1 .
0 −1 3
The leading principal minors are
¯ ¯
¯ ¯ ¯ 3 −1 0 ¯
¯ 3 −1 ¯ ¯ ¯
¯ ¯ ¯ ¯
|D1 | = 3 > 0, |D2 | = ¯¯ ¯ > 5, |D3 | = ¯ −1 2 −1 ¯ = 18 > 0,
−1 2 ¯ ¯
¯ 0 −1
¯
¯
3
thus the form is positive definite.
6
where
p11 ... p1n
P = . . .
pn1 ... pnn
is a nonsingular matrix (changing variables).
7
1.4 Linear Constraints and Bordered Matrices
1.4.1 Two Variable Case
The quadratic form Q(x1 , x2 ) = x21 − x22 is indefinite (why?).
Let us repeat the last calculations for a general 2 variable quadratic form
à !à !
a b x1
Q(x1 , x2 ) = ax21 + 2bx1 x2 + cx22 = (x1 , x2 )
b c x2
Ax1 + Bx2 = 0.
aB 2 −2bAB+cA2 2
= A2
x2 .
aB 2 − 2bAB + cA2 ,
8
This matrix
0 A B
A a b
B b c
is called bordered matrix of A.
Thus we have proved the
Theorem 5 A two variable quadratic form Q(x1 , x2 ) = a11 x21 + 2a12 x1 x2 +
a22 x22 restricted on the constrained set Ax1 + Bx2 = 0 is positive (resp. neg-
ative) if and only if the determinant of the bordering matrix
0 A B
det A a b
B b c
is negative (resp. positive).
9
The first m matrices M1 , ... , Mm are zero matrices.
The determinant of the next minor M2m is ±det B 02 where B 0 is the left
m × m minor of B, it does not carry any information about A.
And only the determinants of last n−m matrices M2m+1 , ... , Mm+n carry
information about the matrix A, i.e. about the quadratic form Q. Exactly
these minors are essential for constraint definiteness.
Theorem 6 (i) If the determinant of H = Mm+n has the sign (−1)n and
the signs of determinants of last m + n leading principal minors
have the same sign (−1)m , then Q is positive definite on the constraint set
Bx = 0, so x = 0 is a strict global min of Q on the constraint set Bx = 0.
(iii) If both conditions (i) and (ii) are violated by some nonzero minors from
last m + n leading principal minors
Example
10
Solution. Here n = 3, m = 1.
The bordered matrix here is
0 | 1 1 1
− − − − −
1 | 1 −1 2 .
1 | −1 1 0
1 | 2 0 −1
since we have −4 < 0, 16 > 0, which differs from both patterns, our con-
strained quadratic is indefinite.
Q = xT Ax = y T P T AP y = y T (P T AP )y,
11
Important remark: Let
D1 , D2 , ... Dn
Silvester’s Law of inertia states that the number of 0-s n0 , the number
of 1-s n+ and the number of -1-s n− are invariant in the sense that any other
diagonalization gives the same n0 , n+ and n− .
The signature of a quadratic form is defined as n+ − n− , so the signature
is an invariant of quadratic form too.
A quadratic form Q is positive definite if n+ = n.
A quadratic form Q is negative definite if n− = n.
A quadratic form Q is positive semi definite if n− = 0.
A quadratic form Q is negative semi definite if n+ = 0.
A quadratic form Q is indefinite if n+ > 0 and n− > 0.
12
The point x0 is min if this difference f (x0 + h) − f (x0 ) is positive for all small
enough values of h.
000
For small enough h the cubical term f 3!(x0 ) · h3 , the term of degree 4
f (4) (x0 ) 00
4!
· h4 etc are smaller that the quadratic term f (x 2
0)
· h2 , so the positivity
of the difference f (x0 + h) − f (x0 ) depends on positivity of the coefficient
f 00 (x0 ) 00
2
of that quadratic form f (x 2
0)
· h2 , that is on the positivity of the second
derivative at x0 .
So, at h = 0 this form has minimum (it is positive definite) if its coefficient
00
f (x0 ) is positive (our good old second order condition).
F (x1 + h1 , x2 + h2 ) =
∂F ∂F
F (x1 , x2 ) + ∂x 1
(x1 , x2 ) · h1 + ∂x 2
(x1 , x2 ) · h2 +
1 ∂2F ∂2F 2
2 ∂x2
(x1 , x2 ) · h1 + ∂x1 ∂x2 (x1 , x2 ) · h1 h2 + 12 ∂∂xF2 (x1 , x2 ) · h22 +
2
1 2
1 ∂3F
3 ∂x31
(x1 , x2 ) · h31 + ... .
1 ∂ 2F 2 ∂ 2F 1 ∂ 2F
Q(h1 , h2 ) = (x 1 , x 2 ) · h1 + (x 1 , x 2 ) · h1 h2 + (x1 , x2 ) · h22 .
2 ∂x21 ∂x1 ∂x2 2 ∂x22
Namely, if this form is positive definite, that is if Q(h1 , h2 ) > 0 for all
(h1 , h2 ) 6= (0, 0), then (x1 , x2 ) is a point of minimum, and if the form is
negative definite, that is Q(h1 , h2 ) < 0 for all (h1 , h2 ) 6= (0, 0), then (x1 , x2 )
is a point of maximum.
13
Exercises
1. Write the following quadratic forms in matrix form
(a) Q(x1 , x2 ) = x21 − 2x1 x2 + x22 .
(b) Q(x1 , x2 ) = 5x21 − 10x1 x2 + x22 .
(c) Q(x1 , x2 , x3 ) = x21 + 2x22 + 3x23 + 4x1 x2 − 6x1 x3 + 8x2 x3 .
2. By direct matrix multiplication express each of the following matrix
products as a quadratic
à form
! Ã ! Ã ! Ã !
³ ´ 4 2 x1 ³ ´ 5 2 u
(a) x1 x2 · · , (b) u v · · .
2 3 x2 4 0 v
3. Write the quadratic form corresponding to the matrix A and then find
a symmetric matrix which determines the same quadratic form
for
1 0 3 0
à ! 1 2 0
2 −1 0 2 0 5
(a) A = , (b) A = 3 4 5 (c) A = .
−2 1 5 0 4 0
0 7 6
0 1 0 6
4. Write an example of 2 variable quadratic form Q(x1 , x2 ) which is
(a) positive definite.
(b) negative definite.
(c) positive semidefinite.
(d) negative semidefinite.
(e) indefinite.
14
a1 0 ... 0 0
0 a2 ... 0 0
... ... ... ... ...
.
0 0 ... an−1 0
0 0 ... 0 an
8. Determine the definiteness of the following constrained quadratics
Homework
|D2 | 2 |Dn | 2
Q(x1 , ... , x3 ) = |D1 |l12 + l2 + ... + l
|D1 | |Dn−1 | n
15
Short Summary
Quadratic Forms
n
X a11 ... a1n x1
Q(x1 , x2 , ..., xn ) = aij xi xj = (x1 , ..., xn )· .............. · .. = xT ·A·x
i,j an1 ... ann xn
A+AT
A is symmetric. If not, take its symmetrization A0 = 2
.
Definiteness of Q(x):
(a) positive definite if Q(x) > 0 for all x 6= 0 ∈ Rn ;
(b) positive semidefinite if Q(x) ≥ 0 for all x 6= 0 ∈ Rn ;
(c) negative definite if Q(x) < 0 for all x 6= 0 ∈ Rn ;
(d) negative semidefinite if Q(x) ≤ 0 for all x 6= 0 ∈ Rn ;
(e) indefinite if Q(x) > 0 for some x and Q(x) < 0 for some other x.
Definiteness and Optimality
If Q is positive definite then x = 0 is global maximum;
If Q is negative definite then x = 0 is global minimum.
Leading principal minors
¯ ¯
¯ ¯ ¯ a a12 ¯
¯ ¯ ¯ ¯
|D1 | = ¯ a11 ¯ , |D2 | = ¯¯ 11 ¯ , ... , |Dn | = |A|.
a21 a22 ¯
16