3.2.1 Quadratic forms: definitions
A quadratic form in many variables is the sum of several terms, each of which is a constant times the product of exactly two variables.
 Definition

A quadratic form in n variables is a function Q for which
Q(x_{1}, ..., x_{n}) 
= 
b_{11}x2 1 + b_{12}x_{1}x_{2} +
... + b_{ij}x_{i}x_{j} + ... + b_{nn}x2 n 

= 
∑n i=1 ∑n j=1 b_{ij}x_{i}x_{j} 
for all (x_{1}, ..., x_{n}), where b_{ij} for i = 1, ..., n and j = 1, ..., n are constants.
 Example

The function
Q(x_{1}, x_{2}) 
= 
2x2 1 + 4x_{1}x_{2} − 6x_{2}x_{1} −
3x2 2 
is a quadratic form in two variables.
We can write the quadratic form in this example as
Q(x_{1}, x_{2}) 
= 
(x_{1}, x_{2})· 

2 
4 

−6 
−3 

· 

x_{1} 

x_{2} 

. 
Because 4
x_{1}x_{2} − 6
x_{2}x_{1} = −2
x_{1}x_{2}, we can alternatively write it as
Q(x_{1}, x_{2}) 
= 
(x_{1}, x_{2})· 

2 
−1 

−1 
−3 

· 

x_{1} 

x_{2} 

. 
In this way of writing the quadratic form, the matrix is
symmetric.
We can in fact write any quadratic form as
Q(x) = x'Ax
where
x is the column vector of
x_{i}'s and
A is a
symmetric n ×
n matrix for which the (
i,
j)th element is
a_{ij} = (1/2)(
b_{ij} +
b_{ji}). The reason is that
x_{i}x_{j} =
x_{j}x_{i} for any
i and
j, so that
b_{ij}x_{i}x_{j} + b_{ji}x_{j}x_{i} 
= 
(b_{ij} + b_{ji})x_{i}x_{j} 

= 
(1/2)(b_{ij} + b_{ji})x_{i}x_{j} + (1/2)(b_{ji} + b_{ij})x_{j}x_{i}. 
 Example

Let Q(x_{1}, x_{2}, x_{3}) = 3x2
1 + 3x_{1}x_{2} − x_{2}x_{1} + 3x_{1}x_{3} + x_{3}x_{1} + 2x_{2}x_{3} +
4x_{3}x_{2} − x2
2 + 2x2
3. That is, a_{11} = 3, a_{12} = 3, a_{21} = −1, etc. We have Q(x) = x'Ax where
A = 

3 
1 
2 

1 
−1 
3 
2 
3 
2 

. 
Subsequently, when representing a quadratic form as x'Ax we always take the matrix A to be symmetric.