Quadratic form

In mathematics, a **quadratic form** is a polynomial with terms all of degree two. For example,

4

x
2

2
x
y
−
3

y
2

{\displaystyle 4x^2 + 2xy - 3y^2}

is a quadratic form in the variables *x* and *y*. The coefficients usually belong to a fixed field *K*, such as the real or complex numbers, and we speak of a quadratic form over *K*.

Quadratic forms occupy a central place in various branches of mathematics, including number theory, linear algebra, group theory (orthogonal group), differential geometry (Riemannian metric, second fundamental form), differential topology (intersection forms of four-manifolds), and Lie theory (the Killing form).

Quadratic forms are not to be confused with a quadratic equation which has only one variable and includes terms of degree two or less. A quadratic form is one case of the more general concept of homogeneous polynomials.

## Introduction

Quadratic forms are homogeneous quadratic polynomials in *n* variables. In the cases of one, two, and three variables they are called **unary**, **binary**, and **ternary** and have the following explicit form:

q
(
x
)

=
a

x
2

(unary)

q
(
x
,
y
)

=
a

x
2

b
x
y
c

y
2

(binary)

q
(
x
,
y
,
z
)

=
a

x
2

b
x
y
c

y
2

d
y
z
e

z
2

f
x
z

(ternary)

{\displaystyle \begin{align}
 q(x) &= ax^2&\textrm{(unary)} \\
 q(x,y) &= ax^2 + bxy + cy^2&\textrm{(binary)} \\
 q(x,y,z) &= ax^2 + bxy + cy^2 + dyz + ez^2 + fxz&\textrm{(ternary)}
\end{align}}

where *a*, …, *f* are the **coefficients**.

The notation

⟨

a
1

,
…
,

a
n

⟩

{\displaystyle \langle a\_1, \dots, a\_n\rangle}

 is often used for the quadratic form

q
(
x
# )

a
1

x
1
2

a
2

x
2
2

…

a
n

x
n
2

.

{\displaystyle q(x)=a\_1 x\_1^2 + a\_2 x\_2^2+ \ldots +a\_n x\_n^2.}

The theory of quadratic forms and methods used in their study depend in a large measure on the nature of the coefficients, which may be real or complex numbers, rational numbers, or integers. In linear algebra, analytic geometry, and in the majority of applications of quadratic forms, the coefficients are real or complex numbers. In the algebraic theory of quadratic forms, the coefficients are elements of a certain field. In the arithmetic theory of quadratic forms, the coefficients belong to a fixed commutative ring, frequently the integers **Z** or the *p*-adic integers **Z***p*. Binary quadratic forms have been extensively studied in number theory, in particular, in the theory of quadratic fields, continued fractions, and modular forms. The theory of integral quadratic forms in *n* variables has important applications to algebraic topology.

Using homogeneous coordinates, a non-zero quadratic form in *n* variables defines an (*n*−2)-dimensional quadric in the (*n*−1)-dimensional projective space. This is a basic construction in projective geometry. In this way one may visualize 3-dimensional real quadratic forms as conic sections.
An example is given by the three-dimensional Euclidean space and the square of the Euclidean norm expressing the distance between a point with coordinates (*x*, *y*, *z*) and the origin:

q
(
x
,
y
,
z
# )
d
(
(
x
,
y
,
z
)
,
(
0
,
0
,
0
)

)
2

=
‖
(
x
,
y
,
z
)

‖
2

=

x
2

y
2

z
2

.

{\displaystyle q(x,y,z) = d((x,y,z), (0,0,0))^2 = \|(x,y,z)\|^2 = x^2 + y^2 + z^2.}

A closely related notion with geometric overtones is a **quadratic space**, which is a pair (*V*, *q*), with *V* a vector space over a field *K*, and *q* : *V* → *K* a quadratic form on *V*.

## History

The study of particular quadratic forms, in particular the question of whether a given integer can be the value of a quadratic form over the integers, dates back many centuries. One such case is Fermat's theorem on sums of two squares, which determines when an integer may be expressed in the form *x*2 + *y*2, where *x*, *y* are integers. This problem is related to the problem of finding Pythagorean triples, which appeared in the second millennium B.C.

In 628, the Indian mathematician Brahmagupta wrote *Brāhmasphuṭasiddhānta* which includes, among many other things, a study of equations of the form *x*2 − *ny*2 = *c*. In particular he considered what is now called Pell's equation, *x*2 − *ny*2 = 1, and found a method for its solution. In Europe this problem was studied by Brouncker, Euler and Lagrange.

In 1801 Gauss published *Disquisitiones Arithmeticae,* a major portion of which was devoted to a complete theory of binary quadratic forms over the integers. Since then, the concept has been generalized, and the connections with quadratic number fields, the modular group, and other areas of mathematics have been further elucidated.

## Real quadratic forms

See also: Sylvester's law of inertia, Definite quadratic form
Any *n*×*n* real symmetric matrix *A* determines a quadratic form *q**A* in *n* variables by the formula

q
A

(

x
1

,
…
,

x
n

# i
1

n

∑

# j
1

n

a

i
j

x
i

x
j

=

x

T

A

x

.

{\displaystyle q\_A(x\_1,\ldots,x\_n) = \sum\_{i=1}^{n}\sum\_{j=1}^{n}a\_{ij}{x\_i}{x\_j} = \mathbf x^\mathrm{T} A \mathbf x. }

Conversely, given a quadratic form in *n* variables, its coefficients can be arranged into an *n* × *n* symmetric matrix.

An important question in the theory of quadratic forms is how to simplify a quadratic form *q* by a homogeneous linear change of variables. A fundamental theorem due to Jacobi asserts that a real quadratic form *q* has an orthogonal diagonalization.

λ
1

x
~

1
2

λ
2

x
~

2
2

⋯

λ
n

x
~

n
2

,

{\displaystyle \lambda\_1 \tilde x\_1^2 + \lambda\_2 \tilde x\_2^2 + \cdots + \lambda\_n \tilde x\_n^2, }

so that the corresponding symmetric matrix is diagonal, and this is accomplished with a change of variables given by an orthogonal matrix – in this case the coefficients *λ*1, *λ*2, ..., *λ**n* are determined uniquely up to a permutation.

There always exists a change of variables given by an invertible matrix, not necessarily orthogonal, such that the coefficients *λ**i* are 0, 1, and −1. Sylvester's law of inertia states that the numbers of each 1 and −1 are invariants of the quadratic form, in the sense that any other diagonalization will contain the same number of each. The **signature** of the quadratic form is the triple (*n*0, *n*+, *n*−), where *n*0 is the number of 0s and *n*± is the number of ±1s. Sylvester's law of inertia shows that this is a well-defined quantity attached to the quadratic form. The case when all *λ**i* have the same sign is especially important: in this case the quadratic form is called **positive definite** (all 1) or **negative definite** (all −1). If none of the terms are 0, then the form is called **nondegenerate**; this includes positive definite, negative definite, and indefinite (a mix of 1 and −1); equivalently, a nondegenerate quadratic form is one whose associated symmetric form is a nondegenerate *bilinear* form. A real vector space with an indefinite nondegenerate quadratic form of index (*p*, *q*) (denoting *p* 1s and *q* −1s) is often denoted as **R***p*,*q* particularly in the physical theory of spacetime.

The discriminant of a quadratic form, concretely the class of the determinant of a representing matrix in *K*/(*K*×)2 (up to non-zero squares) can also be defined, and for a real quadratic form is a cruder invariant than signature, taking values of only “positive, zero, or negative”. Zero corresponds to degenerate, while for a non-degenerate form it is the parity of the number of negative coefficients,

(
−
1

)

n

−

.

{\displaystyle (-1)^{n\_{-}}.}

These results are reformulated in a different way below.

Let *q* be a quadratic form defined on an *n*-dimensional real vector space. Let *A* be the matrix of the quadratic form *q* in a given basis. This means that *A* is a symmetric *n* × *n* matrix such that

q
(
v
# )

x

T

A
x
,

{\displaystyle q(v)=x^\mathrm{T} Ax,}

where *x* is the column vector of coordinates of *v* in the chosen basis. Under a change of basis, the column *x* is multiplied on the left by an *n* × *n* invertible matrix *S*, and the symmetric square matrix *A* is transformed into another symmetric square matrix *B* of the same size according to the formula

A
→
# B

S

T

A
S
.

{\displaystyle A\to B=S^\mathrm{T}AS.}

Any symmetric matrix *A* can be transformed into a diagonal matrix

# B

(

λ
1

0

⋯

0

0

λ
2

⋯

0

⋮

⋮

⋱

0

0

0

⋯

λ
n

)

{\displaystyle B=\begin{pmatrix}
\lambda\_1 & 0 & \cdots & 0\\
0 & \lambda\_2 & \cdots & 0\\
\vdots & \vdots & \ddots & 0\\
0 & 0 & \cdots & \lambda\_n
\end{pmatrix}}

by a suitable choice of an orthogonal matrix *S*, and the diagonal entries of *B* are uniquely determined – this is Jacobi's theorem. If *S* is allowed to be any invertible matrix then *B* can be made to have only 0,1, and −1 on the diagonal, and the number of the entries of each type (*n*0 for 0, *n*+ for 1, and *n*− for −1) depends only on *A*. This is one of the formulations of Sylvester's law of inertia and the numbers *n*+ and *n*− are called the **positive** and **negative** **indices of inertia**. Although their definition involved a choice of basis and consideration of the corresponding real symmetric matrix *A*, Sylvester's law of inertia means that they are invariants of the quadratic form *q*.

The quadratic form *q* is positive definite (resp., negative definite) if *q*(*v*) > 0 (resp., *q*(*v*) < 0) for every nonzero vector *v*. When *q*(*v*) assumes both positive and negative values, *q* is an **indefinite** quadratic form. The theorems of Jacobi and Sylvester show that any positive definite quadratic form in *n* variables can be brought to the sum of *n* squares by a suitable invertible linear transformation: geometrically, there is only *one* positive definite real quadratic form of every dimension. Its isometry group is a *compact* orthogonal group O(*n*). This stands in contrast with the case of indefinite forms, when the corresponding group, the indefinite orthogonal group O(*p*, *q*), is non-compact. Further, the isometry groups of *Q* and −*Q* are the same (O(*p*, *q*) ≈ O(*q*, *p*)), but the associated Clifford algebras (and hence pin groups) are different.

## Definitions

A **quadratic form** over a field *K* is a map

q
:
V
→
K

{\displaystyle q: V \to K}

 from a finite dimensional *K* vector space to *K* such that

q
(
a
v
# )

a
2

q
(
v
)

{\displaystyle q(av) = a^2q(v)}

 for all

a
∈
K
,
v
∈
V

{\displaystyle a \in K, v \in V}

 and the function

q
(
u
v
)
−
q
(
u
)
−
q
(
v
)

{\displaystyle q(u+v) - q(u) - q(v)}

 is bilinear.

More concretely, an *n*-ary **quadratic form** over a field *K* is a homogeneous polynomial of degree 2 in *n* variables with coefficients in *K*:

q
(

x
1

,
…
,

x
n

# i
1

n

∑

# j
1

n

a

i
j

x
i

x
j

,

a

i
j

∈
K
.

{\displaystyle q(x\_1,\ldots,x\_n) = \sum\_{i=1}^{n}\sum\_{j=1}^{n}a\_{ij}{x\_i}{x\_j}, \quad a\_{ij}\in K. }

This formula may be rewritten using matrices: let *x* be the column vector with components *x*1, ..., *x**n* and *A* = (*a**ij*) be the *n*×*n* matrix over *K* whose entries are the coefficients of *q*. Then

q
(
x
# )

x

T

A
x
.

{\displaystyle q(x)=x^\mathrm{T}Ax. }

A vector

# v
(

x
1

,
…
,

x
n

)

{\displaystyle v = (x\_1,\ldots,x\_n)}

 is a null vector if *q*(*v*) = 0.

Two *n*-ary quadratic forms *φ* and *ψ* over *K* are **equivalent** if there exists a nonsingular linear transformation *C* ∈ GL(*n*, *K*) such that

ψ
(
x
# )
φ
(
C
x
)
.

{\displaystyle \psi(x)=\varphi(Cx). }

Let the characteristic of *K* be different from 2. The coefficient matrix *A* of *q* may be replaced by the symmetric matrix (*A* + *A*T)/2 with the same quadratic form, so it may be assumed from the outset that *A* is symmetric. Moreover, a symmetric matrix *A* is uniquely determined by the corresponding quadratic form. Under an equivalence *C*, the symmetric matrix *A* of *φ* and the symmetric matrix *B* of *ψ* are related as follows:

# B

C

T

A
C
.

{\displaystyle B=C^\mathrm{T}AC. }

The **associated bilinear form** of a quadratic form *q* is defined by

b
q

(
x
,
y
# )

1
2

(
q
(
x
y
)
−
q
(
x
)
−
q
(
y
)
# )

x

T

A
# y

y

T

A
x
.

{\displaystyle b\_q(x,y)=\tfrac{1}{2}(q(x+y)-q(x)-q(y)) = x^\mathrm{T}Ay = y^\mathrm{T}Ax. }

Thus, *b**q* is a symmetric bilinear form over *K* with matrix *A*. Conversely, any symmetric bilinear form *b* defines a quadratic form

q
(
x
# )
b
(
x
,
x
)

{\displaystyle q(x)=b(x,x) }

and these two processes are the inverses of one another. As a consequence, over a field of characteristic not equal to 2, the theories of symmetric bilinear forms and of quadratic forms in *n* variables are essentially the same.

### Quadratic spaces

A quadratic form *q* in *n* variables over *K* induces a map from the *n*-dimensional coordinate space *K**n* into *K*:

Q
(
v
# )
q
(
v
)
,

# v
[

v
1

,
…
,

v
n

]

T

∈

K
n

.

{\displaystyle Q(v)=q(v), \quad v=[v\_1,\ldots,v\_n]^\mathrm{T}\in K^n. }

The map *Q* is a homogeneous function of degree 2, which means that it has the property that, for all *a* in *K* and *v* in *V*:

Q
(
a
v
# )

a
2

Q
(
v
)
.

{\displaystyle Q(av) = a^2 Q(v). }

When the characteristic of *K* is not 2, the bilinear map *B* : *V* × *V* → *K* over *K* below is defined:

B
(
v
,
w
# )

1
2

(
Q
(
v
w
)
−
Q
(
v
)
−
Q
(
w
)
)
.

{\displaystyle B(v,w)= \tfrac{1}{2}(Q(v+w)-Q(v)-Q(w)).}

This bilinear form *B* is symmetric, i.e. *B*(*x*, *y*) = *B*(*y*, *x*) for all *x*, *y* in *V*, and it determines *Q*: *Q*(*x*) = *B*(*x*, *x*) for all *x* in *V*.

When the characteristic of *K* is 2, so that 2 is not a unit, it is still possible to use a quadratic form to define a symmetric bilinear form *B*′(*x*, *y*) = *Q*(*x* + *y*) − *Q*(*x*) − *Q*(*y*). However, *Q*(*x*) can no longer be recovered from this *B*′ in the same way, since *B*′(*x*, *x*) = 0 for all *x* (and is thus alternating). Alternately, there always exists a bilinear form *B*″ (not in general either unique or symmetric) such that *B*″(*x*, *x*) = *Q*(*x*).

The pair (*V*, *Q*) consisting of a finite-dimensional vector space *V* over *K* and a quadratic map *Q* from *V* to *K* is called a **quadratic space**, and *B* as defined here is the associated symmetric bilinear form of *Q*. The notion of a quadratic space is a coordinate-free version of the notion of quadratic form. Sometimes, *Q* is also called a quadratic form.

Two *n*-dimensional quadratic spaces (*V*, *Q*) and (*V*′, *Q*′) are **isometric** if there exists an invertible linear transformation *T* : *V* → *V*′ (**isometry**) such that

Q
(
v
# )

Q
′

(
T
v
)
 for all
v
∈
V
.

{\displaystyle Q(v) = Q'(Tv) \text{ for all } v\in V.}

The isometry classes of *n*-dimensional quadratic spaces over *K* correspond to the equivalence classes of *n*-ary quadratic forms over *K*.

### Generalization

Let *R* be a commutative ring, *M* be an *R*-module and *b* : *M* × *M* → *R* be an *R*-bilinear form. A mapping *q* : *M* → *R* : *v* ↦ *b*(*v*, *v*) is the *associated quadratic form* of *b*, and *B* : *M* × *M* → *R* : (*u*, *v*) ↦ *q*(*u* + *v*) − *q*(*u*) − *q*(*v*) is the *polar form* of *q*.

A quadratic form *q* : *M* → *R* may be characterized in the following equivalent ways:

* There exists an *R*-bilinear form *b* : *M* × *M* → *R* such that *q*(*v*) is the associated quadratic form.
* *q*(*av*) = *a*2*q*(*v*) for all *a* ∈ *R* and *v* ∈ *M*, and the polar form of *q* is *R*-bilinear.

### Related concepts

See also: Isotropic quadratic form
Two elements *v* and *w* of *V* are called **orthogonal** if *B*(*v*, *w*) = 0. The **kernel** of a bilinear form *B* consists of the elements that are orthogonal to every element of *V*. *Q* is **non-singular** if the kernel of its associated bilinear form is {0}. If there exists a non-zero *v* in *V* such that *Q*(*v*) = 0, the quadratic form *Q* is **isotropic**, otherwise it is **anisotropic**. This terminology also applies to vectors and subspaces of a quadratic space. If the restriction of *Q* to a subspace *U* of *V* is identically zero, *U* is **totally singular**.

The orthogonal group of a non-singular quadratic form *Q* is the group of the linear automorphisms of *V* that preserve *Q*, i.e. the group of isometries of (*V*, *Q*) into itself.

If a quadratic space (*A*, *Q*) has a product so that *A* is an algebra over a field, and satisfies

∀
x
,
y
∈
A

Q
(
x
y
# )
Q
(
x
)
Q
(
y
)
,

{\displaystyle \forall x, y \isin A \quad Q(x y) = Q(x) Q(y) ,}

 then it is a composition algebra.
## Equivalence of forms

Every quadratic form *q* in *n* variables over a field of characteristic not equal to 2 is equivalent to a **diagonal form**

q
(
x
# )

a
1

x
1
2

a
2

x
2
2

…

a
n

x
n
2

.

{\displaystyle q(x)=a\_1 x\_1^2 + a\_2 x\_2^2+ \ldots +a\_n x\_n^2.}

Such a diagonal form is often denoted by

⟨

a
1

,
…
,

a
n

⟩
.

{\displaystyle \langle a\_1,\dots,a\_n\rangle.}

Classification of all quadratic forms up to equivalence can thus be reduced to the case of diagonal forms.

## Geometric meaning

Using Cartesian coordinates in three dimensions, let

x

=
(
x
,
y
,
z

)
T

{\displaystyle \mathbf{x} = (x,y,z)^\text{T}}

, and let

A

{\displaystyle A}

 be a symmetric 3-by-3 matrix. Then the geometric nature of the solution set of the equation

x

T

A

x

b

T

x

=
1

{\displaystyle \mathbf{x}^\text{T}A\mathbf{x}+\mathbf{b}^\text{T}\mathbf{x}=1}

 depends on the eigenvalues of the matrix

A

{\displaystyle A}

.

If all eigenvalues of

A

{\displaystyle A}

 are non-zero, then the solution set is an ellipsoid or a hyperboloid. If all the eigenvalues are positive, then it is an ellipsoid; if all the eigenvalues are negative, then it is an *imaginary ellipsoid* (we get the equation of an ellipsoid but with imaginary radii); if some eigenvalues are positive and some are negative, then it is a hyperboloid.

If there exist one or more eigenvalues

λ
i

=
0

{\displaystyle \lambda\_i = 0}

, then the shape depends on the corresponding

b
i

{\displaystyle b\_i}

. If the corresponding

b
i

≠
0

{\displaystyle b\_i \neq 0}

, then the solution set is a paraboloid (either elliptic or hyperbolic); if the corresponding

b
i

=
0

{\displaystyle b\_i = 0}

, then the dimension

i

{\displaystyle i}

 degenerates and does not come into play, and the geometric meaning will be determined by other eigenvalues and other components of

b

{\displaystyle \mathbf{b}}

. When the solution set is a paraboloid, whether it is elliptic or hyperbolic is determined by whether all other non-zero eigenvalues are of the same sign: if they are, then it is elliptic; otherwise, it is hyperbolic.

## Integral quadratic forms

Quadratic forms over the ring of integers are called **integral quadratic forms**, whereas the corresponding modules are **quadratic lattices** (sometimes, simply lattices). They play an important role in number theory and topology.

An integral quadratic form has integer coefficients, such as *x*2 + *xy* + *y*2; equivalently, given a lattice Λ in a vector space *V* (over a field with characteristic 0, such as **Q** or **R**), a quadratic form *Q* is integral *with respect to* Λ if and only if it is integer-valued on Λ, meaning *Q*(*x*, *y*) ∈ **Z** if *x*, *y* ∈ Λ.

This is the current use of the term; in the past it was sometimes used differently, as detailed below.

### Historical use

Historically there was some confusion and controversy over whether the notion of **integral quadratic form** should mean:

*twos in*
the quadratic form associated to a symmetric matrix with integer coefficients
*twos out*
a polynomial with integer coefficients (so the associated symmetric matrix may have half-integer coefficients off the diagonal)
This debate was due to the confusion of quadratic forms (represented by polynomials) and symmetric bilinear forms (represented by matrices), and "twos out" is now the accepted convention; "twos in" is instead the theory of integral symmetric bilinear forms (integral symmetric matrices).

In "twos in", binary quadratic forms are of the form

a

x
2

2
b
x
y
c

y
2

{\displaystyle ax^2+2bxy+cy^2}

, represented by the symmetric matrix

(

a

b

b

c

)

{\displaystyle \begin{pmatrix}a & b\\ b&c\end{pmatrix}}

this is the convention Gauss uses in *Disquisitiones Arithmeticae*.

In "twos out", binary quadratic forms are of the form

a

x
2

b
x
y
c

y
2

{\displaystyle ax^2+bxy+cy^2}

, represented by the symmetric matrix

(

a

b

/

2

b

/

2

c

)

.

{\displaystyle \begin{pmatrix}a & b/2\\ b/2&c\end{pmatrix}.}

Several points of view mean that *twos out* has been adopted as the standard convention. Those include:

* better understanding of the 2-adic theory of quadratic forms, the 'local' source of the difficulty;
* the lattice point of view, which was generally adopted by the experts in the arithmetic of quadratic forms during the 1950s;
* the actual needs for integral quadratic form theory in topology for intersection theory;
* the Lie group and algebraic group aspects.

### Universal quadratic forms

An integral quadratic form whose image consists of all the positive integers is sometimes called *universal*. Lagrange's four-square theorem shows that

w
2

x
2

y
2

z
2

{\displaystyle w^2+x^2+y^2+z^2}

 is universal. Ramanujan generalized this to

a

w
2

b

x
2

c

y
2

d

z
2

{\displaystyle aw^2+bx^2+cy^2+dz^2}

 and found 54 multisets {*a*, *b*, *c*, *d*} that can each generate all positive integers, namely,

{1, 1, 1, *d*}, 1 ≤ *d* ≤ 7
{1, 1, 2, *d*}, 2 ≤ *d* ≤ 14
{1, 1, 3, *d*}, 3 ≤ *d* ≤ 6
{1, 2, 2, *d*}, 2 ≤ *d* ≤ 7
{1, 2, 3, *d*}, 3 ≤ *d* ≤ 10
{1, 2, 4, *d*}, 4 ≤ *d* ≤ 14
{1, 2, 5, *d*}, 6 ≤ *d* ≤ 10
There are also forms whose image consists of all but one of the positive integers. For example, {1,2,5,5} has 15 as the exception. Recently, the 15 and 290 theorems have completely characterized universal integral quadratic forms: if all coefficients are integers, then it represents all positive integers if and only if it represents all integers up through 290; if it has an integral matrix, it represents all positive integers if and only if it represents all integers up through 15.

## References

1. ↑ The theory of quadratic forms over a field of characteristic 2 has important differences and many definitions and theorems must be modified.
2. ↑ The bilinear form to which a quadratic form is associated is not restricted to being symmetric, which is of significance when 2 is not a unit in *R*.