Quadratic Forms
A quadratic form on a vector space V over a field F (of characteristic different from 2) is a function Q:V\to F satisfying the following conditions:
- Q(ax)=a^2Q(x)
- B(x,y) = \frac{1}{2}(Q(x+y)-Q(x)-Q(y)) is a (symmetric) bilinear form on V.
For example, the functions Q((a,b)))=a^2+b^2 and Q((a,b))=a^2-b^2 are quadratic forms on F^{2}. The homogeneity is clear. For the bilinearity, in the first case we have \begin{align} Q((a_1,b_1)+(a_2,b_2))-Q((a_1,b_1))-Q((a_2,b_2))&=(a_1+a_2)^2+(b_1+b_2)^2-a_1^2-b_1^2-a_2^2-b_1^2 \\ &= 2(a_1a_2+b_1b_2) \end{align} so the bilinear form is the dot product. In the second case the same type of calculation gives the bilinear form a_1a_2-b_1b_2 corresponding to the matrix \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}
The definition of a quadratic form makes sense in any characteristic, and for vector spaces of any dimension. But we will restrict ourselves, as usual, to finite dimensional vector spaces over \R or \C.
Now suppose that we choose a basis \{e_1,\ldots, e_{n}\} for a finite-dimensional V and let Q be a quadratic form on V. Then, using the properties of quadratic forms and induction, we can compute that \begin{aligned} Q(\sum_{i=1}^{n} x_{i}e_{i}) &= \sum_{i=1}^{n} Q(x_{i}e_{i}) + \sum_{i\not=j} B(x_{i}e_{i},x_{j}e_{j}) \\ &= \sum_{i=1}^{n} x_{i}^2Q(e_{i}) + 2\sum_{i<j} x_{i}x_{j}B(e_{i},e_{j}) \end{aligned} where B is the bilinear form associated to Q. If we let a_{i}=Q(e_{i}) and a_{ij}=B(e_{i},e_{j}) then we see that Q(\sum x_{i}e_{i})=\sum_{i=1}^{n} a_{i}x_{i}^2 + 2\sum_{i<j} a_{ij}x_{i}x_{j} is a homogeneous quadratic polynomial in the coordinates x_{i}.
Conversely, suppose that P(x_1,\ldots,x_n) is a homogeneous quadratic polynomial. Then Q is a quadratic function of the x_{i} and we can define a quadratic form on F^{n} by setting Q(\sum a_{i}e_{i})=P(a_1,\ldots, a_n). The associated bilinear form B corresponds to the symmetric matrix whose diagonal entries b_{ii} are the coefficients of x_{i}^2 and whose off diagonal entries b_{ij}, with i\not=j, satisfy b_{ij}=b_{ji} = c_{ij}/2 where c_{ij} is the coefficient of the monomial x_{i}x_{j} in P.
For example, if P(x_1,x_2)=Rx_1^2+Sx_1x_2+Tx_2^2 then the corresponding matrix is \begin{pmatrix} R & S/2 \\ S/2 & T \end{pmatrix}.
In general, we can go “back and forth” between quadratic forms and bilinear forms – given Q, we have B(x,y) = \frac{1}{2}(Q(x+y)-Q(x)-Q(y)) and given B we have Q(v) = B(v,v).
In particular, Q and Q' are equivalent if and only if there associated bilinear forms are equivalent. To see this notice that if there is a linear map so that Q(Av)=Q'(v) for all v, then B(Av,Av)=B’(v,v)$ for all v. Since a bilinear form is determined by its diagonal values, this implies B and B' are equivalent.
Now, given a quadratic form, we can take any matrix M representing its associated bilinear form and consider its determinant. The matrix M depends on the choice of basis, and a change of basis replaces M by C^{\top}MC for some invertible matrix C. The collection of all determinants of such matrices is therefore well defined up to multiplication by a square in the field F.
We call this determinant the discriminant of the form Q; technically it is only defined up to multiplication by a square in F.
For example, if Q is the binary quadratic form Rx^2+Sxy+Ty^2, the discriminant of this form is RT-S^2/4.
Two forms with distinct discriminants are not equivalent; but as we will see, the converse is false – the discriminant is not a sufficient invariant for distinguishing quadratic forms.
Proposition: Given a quadratic form on an n-dimensional vector space over \R or \C (or, indeed, any field of characteristic other than two), there is a basis such that Q(\sum x_{i}e_{i}) = \sum a_{i}x_{i}^2 so that Q is diagonal.
Proof: This follows since the same is true for the associated bilinear form.
Notice that if Q is diagonal like this then its discriminant is a_{1}a_{2}\cdots a_{n}.
If U and W are orthogonal subspaces with V=U\perp W, and Q is a quadratic form on V, then we can find orthogonal bases for U and W and combine them to form an orthogonal basis for V, relative to the bilinear form associated to Q. In this combined basis Q is diagonal, and Q=Q_{U}+Q_{W} is the sum of diagonal forms. From this we see that the discriminant of Q is the product of the distcriminants of Q_{U} and Q_{W}.
Proposition: A nonzero element a\in F can occur as a coefficient of a diagonal representation of Q if and only if there is a vector v with Q(v)=a.
Proof: One way is clear: if a occurs as a coefficient, then it is a value of the form. Conversely, if Q(v) is not zero, we can build an orthogonal basis for V starting with v, and the first coefficient of the diagonal representation of V in this basis will be Q(v,v).
Consider for the moment the quadratic forms x^2+5y^2 and 2x^2+10y^2 over the rational numbers. They have discriminants -20 and -80 which are equivalent mod squares. However, 1 is a value of the first form. Finding a rational solution to 2x^2+10y^2=1 is the same as finding an integer solution to 2x^2+10y^2=z^2. However, mod 5 this would mean that 2\equiv z^2/x^2\pmod{5} which is not possible. Hence these two quadratic forms over the rationals are inequivalent despite having the same discriminant.
Work of Hasse shows that the classification of quadratic forms over \Q is (more or less) equivalent to the law of quadratic reciprocity.
The situation over \R and \C is simpler.
Proposition: Every nondegenerate quadratic form Q on \C^{n} is equivalent to x_1^2+\cdots+x_n^2.
Proof: Diagonalize Q and use the fact that every coefficient is a square in \C.
Proposition: Every nondegenerate quadratic form Q over \R is of the form x_1^2+\cdots x_p^2-x_{p+1}^2-\cdots-x_{n}^2 This form is said to have signature p,q (where q=n-p is the number of negative terms). The numbers p and q are unique.
Proof: Suppose we had two such representations with signatures p,q and p',q'. This means we have bases e_{1},\ldots, e_{n} so that Q has signature p,q, and f_1,\ldots, f_n so that Q has signature p',q'. Consider the span U of e_1,\ldots, e_{p} and W of f_{p'+1},\ldots, f_{n}. If v\in U\cap W, then Q(v)\ge 0 and Q(v)\le 0 so Q(v)=0. This means v=0 so \dim{U}+\dim{W}\le n. This means p+q'\le n so p\le p'. Running the argument the other way round shows p'\le p, so p=p'.