In this entry, unless otherwise specified, $R$ is a commutative ring with multiplicative identity  $1$ and $M=R[X_{1},\ldots,X_{n}]$ is a polynomial ring  over $R$ in $n$ indeterminates.

## Definition

A homogeneous polynomial   of degree 2 in $M$ is called a quadratic form  (over $R$) in $n$ indeterminates. In general, a quadratic form (without specifying $n$) over a ring $R$ is a quadratic form in some polynomial ring over $R$.

For example, in $\mathbb{Z}[X,Y]$, $X^{2}-5XY$ is a quadratic form, while $Y^{3}+2XY$ and $X^{2}+Y^{2}+1$ are not.

In general, a quadratic form $Q$ in $n$-indeterminates looks like

 $Q=a_{11}X_{1}^{2}+a_{12}X_{1}X_{2}+\cdots+a_{n,n-1}X_{n}X_{n-1}+a_{nn}X_{n}^{2% }=\sum_{1\leq i,j\leq n}a_{ij}X_{i}X_{j}$

where $a_{ij}\in R$.

Letting $\mathbf{X}=(X_{1},\ldots,X_{n})^{\mathrm{T}}$, and $\mathbf{A}=\{a_{ij}\}$ the $n\times n$ matrix, then we can rewrite $Q$ as

 $Q={\mathbf{X}}^{\mathrm{T}}\mathbf{A}\mathbf{X}.$

For example, the quadratic form $X^{2}-5XY$ can be rewritten as

 $X^{2}-5XY=\begin{pmatrix}X&Y\end{pmatrix}\begin{pmatrix}1&-2\\ -3&0\end{pmatrix}\begin{pmatrix}X\\ Y\end{pmatrix}.$

Now suppose the characteristic  of $R$, $\operatorname{char}(R)\neq 2$. In fact, suppose that $2$ is invertible    in $R$ (its inverse        denoted by $\frac{1}{2}$). Since $X_{i}X_{j}=X_{j}X_{i}$, define $b_{ij}=\frac{1}{2}(a_{ij}+a_{ji})$. Then $b_{ii}=a_{ii}$ and $b_{ij}=b_{ji}$. Furthermore, if $\mathbf{B}=\{b_{ij}\}$, then $\mathbf{B}$ is a symmetric matrix  and

 $Q={\mathbf{X}}^{\mathrm{T}}\mathbf{B}\mathbf{X}.$

Again, in the example of $X^{2}-5XY$, over $\mathbb{Q}$ it can be written as

 $X^{2}-5XY=\begin{pmatrix}X&Y\end{pmatrix}\begin{pmatrix}1&-\frac{5}{2}\\ -\frac{5}{2}&0\end{pmatrix}\begin{pmatrix}X\\ Y\end{pmatrix}.$

However, it is not possible to represent $X^{2}-5XY$ over $\mathbb{Z}$ by a symmetric matrix.

It is not hard to see that, given a quadratic form $Q$ in $n$ indeterminates, setting one of its indeterminates to $0$ gives us another quadratic form, in $(n-1)$ indeterminates. This is an informal way of saying the following:

embed $R$ into $N=R[X_{1},\ldots,X_{n-1}]$. Let $\phi:M\to N$ be the (unique) evaluation homomorphism of the embedding    , with $\phi(X_{i})=X_{i}$ for $i and $\phi(X_{n})=0$. Then for any quadratic form $Q\in M$, $\phi(Q)$ is a quadratic form in $N$.

In particular, if we take $N=R$, and $\mathbf{s}=(s_{1},\ldots,s_{n})$ with $s_{i}\in R$. Then the evaluation homomorphism $\phi$ at $\mathbf{s}$ for any quadratic form $Q\in M$ is called the evaluation of $Q$ at $\mathbf{s}$, and we write it $\phi_{\mathbf{s}}(Q)$, or simply $Q(\mathbf{s})$ (since $\phi$ is uniquely determined by $\mathbf{s}$). In this way, a quadratic form $Q$ can be realized as a quadratic map, as follows:

Let $Q\in M$ be a qudratic form. Take the direct sum    of $n$ copies of $R$ and call this $V$. Define a map $q:V\to R$ by $q(v)=Q(v)$. Then $q$ is a quadratic map.

Conversely, if $2$ is invertible in $R$ (so that $\operatorname{char}(R)\neq 2$ is clear), then given a quadratic map $q:M\to R$, one can find a corresponding quadratic form $Q\in M$ such that $q(v)=Q(v)$, by setting

 $a_{ij}=\frac{1}{2}\big{(}q(e_{i}+e_{j})-q(e_{i})-q(e_{j})\big{)},$

where $e_{i}$ and $e_{j}$ are coordinate vectors whose coordinates are all $0$ except at positions $i$ and $j$ respectively, where the coordinates are $1$. Then $Q$ defined by ${\mathbf{X}}^{\mathrm{T}}\mathbf{A}\mathbf{X}$, where $\mathbf{A}=\{a_{ij}\}$ is the desired quadratic form.

From the above discussion, we shall identify a quadratic form as a quadratic map.

Two quadratic forms $Q_{1}$ and $Q_{2}$ are said to be if there is an invertible matrix $M$ such that $Q_{1}(v)=Q_{2}(Mv)$, for all $v\in R^{n}$. The definition of equivalent quadratic forms is well-defined and it is not hard to see that this equivalence is an equivalence relation  .

In fact, if $\mathbf{A}_{1}$ and $\mathbf{A}_{2}$ are matrices corresponding to (see the definition section   ) the two equivalent quadratic forms $Q_{1}$ and $Q_{2}$ above, then $\mathbf{A}_{1}=M^{\mathrm{T}}\mathbf{A}_{2}M$.

For example, the quadratic form $X^{2}-Y^{2}$ is equivalent     to $XY$ over any ring $R$ where $2$ is invertible, with $M=\begin{pmatrix}1&-1\\ 1&1\end{pmatrix}$.

In the case where $R=\mathbb{R}$ is the field of real numbers (or any formally real field), we say that a quadratic form is positive definite  , negative definite, or positive semidefinite  according to whether its corresponding matrix is positive definite, negative definite, or positive semidefinite. The definiteness of a quadratic form is preserved under the equivalence relation on quadratic forms.

If $Q_{1}$ and $Q_{2}$ are two quadratic forms in $m$ and $n$ indeterminates. We can define a quadratic form $Q$ in $m+n$ indeterminates in terms of $Q_{1}$ and $Q_{2}$, called the sum of $Q_{1}$ and $Q_{2}$, as follows:

write $Q_{1}={\mathbf{X}}^{\mathrm{T}}\mathbf{A}\mathbf{X}$ and $Q_{2}={\mathbf{Y}}^{\mathrm{T}}\mathbf{B}\mathbf{Y}$, with $\mathbf{X}=(X_{1},\ldots,X_{m})^{\mathrm{T}}$ and $\mathbf{Y}=(Y_{1},\ldots,Y_{n})^{\mathrm{T}}$. Then

 $Q:={\mathbf{Z}}^{\mathrm{T}}(\mathbf{A}\oplus\mathbf{B})\mathbf{Z},$

where $\mathbf{Z}=(\mathbf{X},\mathbf{Y})=(X_{1},\ldots,X_{m},Y_{1},\ldots,Y_{n})^{% \mathrm{T}}$, and $\mathbf{A}\oplus\mathbf{B}$ is the direct sum of matrices $\mathbf{A}$ and $\mathbf{B}$.

Expressed in terms of $Q_{1}$ and $Q_{2}$, we write $Q=Q_{1}\oplus Q_{2}$. For example, if $Q_{1}=5X_{1}^{2}+6X_{2}^{2}$ and $Q_{2}=10X_{1}X_{2}$, then

 $Q_{1}\oplus Q_{2}=5X_{1}^{2}+6X_{2}^{2}+10X_{3}X_{4},$

not $5X_{1}^{2}+6X_{2}^{2}+10X_{1}X_{2}(=Q_{1}+Q_{2})$.

## References

• 1 T. Y. Lam, Introduction to Quadratic Forms over Fields, American Mathematical Society (2004)