# Linear algebra (Osnabrück 2024-2025)/Part II/Lecture 43

    Polynomials in several variables and their zero sets
As an application of the diagonalizability of symmetric matrices (and of principal axis transformation), we discuss how to transform simple polynomial equations in several variables of low degree to a very simple form. For this, we introduce briefly polynomials in several variables.

## Definition

For a set of variables $X_{1},\ldots ,X_{n}$ and an $n$-tuple $(\nu _{1},\ldots ,\nu _{n})\in \mathbb {N} ^{n}$,
$X_{1}^{\nu _{1}}\cdots X_{n}^{\nu _{n}}$
$X_{i}$
The degree of a monomial is the sum of the exponents, that is, $\nu _{1}+\nu _{2}+\cdots +\nu _{n}$.

## Definition

A polynomial $F$ in the variables $X_{1},\ldots ,X_{n}$ over a field $K$ is a finite linear combination of monomials
    $F=\sum _{\nu }c_{\nu }X^{\nu }\,,$
where
$c_{\nu }\in K$
The degree of a polynomial is the maximum of the degrees of the monomials involved (meaning those monomials that occur with a coefficient different from $0$). A polynomial $F=F(X_{1},\ldots ,X_{n})$ in $n$ variables over $K$ defines a function by inserting (substituting each variable by certain values)
    $K^{n}\longrightarrow K,(x_{1},\ldots ,x_{n})\longmapsto F(x_{1},\ldots ,x_{n}).$
These are important functions in higher-dimensional analysis. The variable $X_{i}$, interpreted in this way, is simply the $i$-th projection, and the addition and the multiplication of polynomials corresponds to the addition and the multiplication of functions, where the values in $K$ are added or multiplied.

## Definition

For a field $K$ and a set of variables $X_{1},\ldots ,X_{n}$, the polynomial ring
    $K[X_{1},\ldots ,X_{n}]$
consists of all polynomials $F(X_{1},\ldots ,X_{n})$ in these variables. This set is made into a commutative ring by componentwise addition and by the multiplication that extends the rule
    $X_{1}^{r_{1}}\cdots X_{n}^{r_{n}}\cdot X_{1}^{s_{1}}\cdots X_{n}^{s_{n}}:=X_{1}^{r_{1}+s_{1}}\cdots X_{n}^{r_{n}+s_{n}}\,$

## Definition

Let $K$ be a field, and let $F\in K[X_{1},\ldots ,X_{n}]$ denote a polynomial in $n$ Variables. The set
    ${\left\{P\in K^{n}\mid F(P)=0\right\}}$
is called the vanishing set (or zero set)
$F$
Thus, the vanishing set of $F$ is just the fiber of the function
    $F\colon K^{n}\longrightarrow K$
given by $F$. For $n=1$, this is just a finite collection of points, the zeroes of $F$, (in case $F=0$, it is $K$); however, for $n\geq 2$, these vanishing sets are interesting and complicated geometric objects. The study of these objects is called algebraic geometry. In case of $n=2$, we talk about algebraic curves.
For arbitrary $n$, a polynomial of degree $\leq 1$ has the form
    $F=a_{1}X_{1}+\cdots +a_{n}X_{n}+b\,,$
and the corresponding vanishing set is just the solution set of the inhomogeneous linear equation
    $a_{1}x_{1}+\cdots +a_{n}x_{n}=-b\,,$
that is, it is an affine-linear space.
    Real quadrics
The polynomials of degree two and their zero-sets can be understood completely with methods from linear algebra.

## Definition

A quadratic polynomial $F\in K[X_{1},\ldots ,X_{n}]$ over a field $K$ is a polynomial of degree $2$; that is, an expression of the form
    $F=\sum _{i\leq j}a_{ij}X_{i}X_{j}+\sum _{i=1}^{n}b_{i}X_{i}+c\,,$
where
$a_{ij},b_{i},c\in K$

## Example

For a quadratic polynomial $aX^{2}+bX+c$ in one variable $X$, with $a,b,c\in K$ and $a\neq 0$, the zeroes can be found by completing the square. That is, we write (suppose that the characteristic of the fields is not $2$)
    $aX^{2}+bX+c=a{\left(X^{2}+{\frac {b}{a}}X+{\frac {c}{a}}\right)}=a{\left({\left(X+{\frac {b}{2a}}\right)}^{2}-{\frac {b^{2}}{4a^{2}}}+{\frac {c}{a}}\right)}\,.$
This equals $0$ if and only if
    $X=\pm {\sqrt {{\frac {b^{2}}{4a^{2}}}-{\frac {c}{a}}}}-{\frac {b}{2a}}\,,$
and if the square root
    ${\sqrt {{\frac {b^{2}}{4a^{2}}}-{\frac {c}{a}}}}={\frac {1}{2a}}{\sqrt {b^{2}-4ac}}\,$
exists in the field. Depending on this, there are no, one or two solutions.
We develop a relation between quadratic polynomials and bilinear forms.

## Definition

For a bilinear form $\left\langle -,-\right\rangle$ on a $K$-vector space $V$, the mapping
    $V\longrightarrow K,v\longmapsto \left\langle v,v\right\rangle$
is called the
Given a basis $v_{1},\ldots ,v_{n}$, a bilinear form is described by its Gram matrix
    $G={\left(g_{ij}\right)}_{ij}\,;$
the corresponding quadratic form $V\rightarrow K$ is described by the quadratic polynomial
    $\left(X_{1},\,\ldots ,\,X_{n}\right)G{\begin{pmatrix}X_{1}\\\vdots \\X_{n}\end{pmatrix}}=\sum _{1\leq i,j\leq n}g_{ij}X_{i}X_{j}=\sum _{i}g_{ii}X_{i}^{2}+\sum _{i<j}{\left(g_{ij}+g_{ji}\right)}X_{i}X_{j}\,.$
($X_{i}$ is the $i$-th projection, the corresponding dual basis). In the symmetric case, this is
    $\sum _{i}g_{ii}X_{i}^{2}+\sum _{i<j}2g_{ij}X_{i}X_{j}.$
For every pure-quadratic polynomial in $n$ variables, we can form in this way a symmetric Gram matrix. The theory of real-symmetric bilinear forms makes it possible to get rid, by a suitable coordinate transformation (a base change) of the mixed terms.

## Example

We make a list of real quadratic polynomials in the two variables $X$ and $Y$, together with their corresponding vanishing sets; we restrict to coefficients from $0,1,-1$. If only one variable $X$ occurs, then we have essentially the following three possibilities.
In these cases, the vanishing set is simply the product set of a zero-dimensional vanishing set (finitely many points) and of a line.
Now we consider polynomials where both variables occur.
The polynomial $XY-1$ does not appear directly in this list, because, in the variables $X=U+V$ and $Y=U-V$, we can write
    $U^{2}-V^{2}=1\,.$
In this form it is in the lists. The following theorem tells us that, up to scaling, the list is complete.

## Theorem

Every real quadratic polynomial
    $F=\sum _{i\leq j}a_{ij}X_{i}X_{j}+\sum _{i=1}^{n}b_{i}X_{i}+c\,$
orthonormal basis (allowing translations), the form ($k\geq n$)
    $F=\sum _{1\leq i\leq k}r_{i}U_{i}^{2}+s\,,$
or the form ($k\leq n-1$)
    $F=\sum _{1\leq i\leq k}r_{i}U_{i}^{2}+sU_{k+1}\,.$

### Proof

We consider the square matrix
    $M={\left(\alpha _{ij}\right)}_{1\leq i,j\leq n}\,,$
where
    $\alpha _{ij}={\begin{cases}a_{ij}{\text{ for }}i=j\,,\\{\frac {a_{ij}}{2}}{\text{ for }}i<j\,,\\{\frac {a_{ji}}{2}}{\text{ for }}i>j\,.\end{cases}}\,$
With this, the pure-quadratic term of the polynomial has the form
    $\left(X_{1},\,\ldots ,\,X_{n}\right)M{\begin{pmatrix}X_{1}\\\vdots \\X_{n}\end{pmatrix}}.$
This equation holds upon inserting any element from $K$ for $X_{i}$, and also as an equation in $K[X_{1},\ldots ,X_{n}]$. By definition, this matrix $M$ is symmetric. Because of Theorem 42.12 , there exists a orthonormal basis $v_{1},\ldots ,v_{n}$ of $\mathbb {R} ^{n}$ such that the new Gram matrix
    ${B^{\text{tr}}}MB$
(describing the form with respect to the new basis, $B$ denotes the base change matrix) has diagonal form. Let $V_{1},\ldots ,V_{n}$ be the new variables with respect to the new orthonormal system; that is, the $V_{i}$ describe, considered as functions, the linear forms to this new basis, that is, the dual basis. In the new variables, there are no mixed quadratic terms any more; the polynomial has now the form
    $F=\sum _{1\leq i\leq k}e_{i}V_{i}^{2}+\sum _{j=1}^{n}f_{j}V_{j}+g\,,$
with a certain $k$ between $1$ and $n$, and $e_{i}\neq 0$. The summands
    $e_{i}V_{i}^{2}+f_{i}V_{i}$
can be brought, by completing the square and using new variables $U_{i}=V_{i}+h_{i}$, to the form
    $e_{i}U_{i}^{2}+g_{i}.$
Besides the pure-quadratic term, either a constant or a linear polynomial remains. In the second case, we denote this linear form by $U_{k+1}$.
$\Box$
The representations occurring in this theorem are called the standard form of the quadratic form. In a standard form, we only have purely-quadratic terms and at most one variable in first degree. The theorem tells us that every quadratic form can be brought, using suitable orthonormal coordinates, into such a standard form. Regarding the vanishing set, such a coordinate transformation means that we apply an affine-linear isometry.

## Remark

A quadratic form in standard form
    $\sum _{1\leq i\leq k}r_{i}U_{i}^{2}+s\,\,{\text{ or }}\,\,\sum _{1\leq i\leq k}r_{i}U_{i}^{2}+sU_{k+1}$
in the sense of Theorem 43.9
can be simplified further, if we allow distortions. In the new coordinates
    $Z_{i}={\sqrt {\vert {r_{i}}\vert }}U_{i}\,$
or
    $U_{i}={\frac {1}{\sqrt {\vert {r_{i}}\vert }}}Z_{i}\,$
for $i=1,\ldots ,k$, the quadratic form has a representation of the form
    $\sum _{1\leq i\leq k}\pm Z_{i}^{2}+s\,\,{\text{ or }}\,\,\sum _{1\leq i\leq k}\pm Z_{i}^{2}+sZ_{k+1},$
the coefficients are $1$ or $-1$. This is called the normed standard form of the quadratic form. By swapping of the variables, we may achieve that the first variables have the coefficient $1$, and the later variables have coefficient $-1$. In doing these transformations, the vanishing sets are distorted. For example, an ellipse might become a circle, or a parabola might be compressed. Since the vanishing set does not change by multiplying the form with $-1$, we may also assume that the number variables with coefficient $1$ is at least the number of variables with coefficient $-1$.

## Example

We consider the quadratic polynomial
    $F=3X^{2}-4XY+5Y^{2}+6X+2Y-7\,.$
We have to diagonalize the matrix
    $M={\begin{pmatrix}3&-2\\-2&5\end{pmatrix}}\,.$
The characteristic polynomial is
    $(X-3)(X-5)-4=X^{2}-8X+11=(X-4)^{2}-5\,.$
Therefore, the eigenvalues are
    $x_{1}={\sqrt {5}}+4{\text{ and }}x_{2}=-{\sqrt {5}}+4.$
Eigenvectors are
    ${\begin{pmatrix}-2\\{\sqrt {5}}+1\end{pmatrix}}\,\,{\text{ and }}\,\,{\begin{pmatrix}2\\{\sqrt {5}}-1\end{pmatrix}}.$
Hence,
    ${\frac {1}{\sqrt {10+2{\sqrt {5}}}}}{\begin{pmatrix}-2\\{\sqrt {5}}+1\end{pmatrix}}\,\,{\text{ and }}\,\,{\frac {1}{\sqrt {10-2{\sqrt {5}}}}}{\begin{pmatrix}2\\{\sqrt {5}}-1\end{pmatrix}}.$
is an orthonormal basis consisting of eigenvectors.

## Example

We make a list of real quadratic polynomials in the three variables $X,Y$ and $Z$, together with their corresponding vanishing sets, where we restrict the coefficients to $0,1,-1$. Moreover, we consider only such polynomials where all variables occur and the vanishing set is not empty.

## Example

We consider the quadratic form
    ${\frac {3}{2}}x^{2}+2y^{2}+2xy-2yz.$
The corresponding symmetric matrix is
    ${\begin{pmatrix}{\frac {3}{2}}&1&0\\1&2&-1\\0&-1&0\end{pmatrix}}.$
We want to find an orthonormal basis of $\mathbb {R} ^{3}$ such that, with respect to the new basis, the form is described by a diagonal matrix. For this, we have to determine the eigenvalues (principal values) of the matrix. The characteristic polynomial of the matrix is
    ${\begin{aligned}\det {\begin{pmatrix}X-{\frac {3}{2}}&-1&0\\-1&X-2&1\\0&1&X\end{pmatrix}}&={\left(X-{\frac {3}{2}}\right)}{\left(X^{2}-2X-1\right)}-X\\&=X^{3}-{\frac {7}{2}}X^{2}+X+{\frac {3}{2}}\\&=(X-1){\left(X^{2}-{\frac {5}{2}}X-{\frac {3}{2}}\right)}\\&=(X-1)(X-3){\left(X+{\frac {1}{2}}\right)};\end{aligned}}$
hence, the eigenvalues are
    $1,3,-{\frac {1}{2}}.$
The corresponding principal axes can be determined in the following way.
For $x=1$, the kernel of the matrix
    ${\begin{pmatrix}-{\frac {1}{2}}&-1&0\\-1&-1&1\\0&1&1\end{pmatrix}}$
equals ${\begin{pmatrix}2\\-1\\1\end{pmatrix}}$, a normed generator is
    ${\begin{pmatrix}{\frac {2}{\sqrt {6}}}\\-{\frac {1}{\sqrt {6}}}\\{\frac {1}{\sqrt {6}}}\end{pmatrix}}.$
For $x=3$, the kernel of the matrix
    ${\begin{pmatrix}{\frac {3}{2}}&-1&0\\-1&1&1\\0&1&3\end{pmatrix}}$
equals ${\begin{pmatrix}2\\3\\-1\end{pmatrix}}$, a normed generator is
    ${\begin{pmatrix}{\frac {2}{\sqrt {14}}}\\{\frac {3}{\sqrt {14}}}\\-{\frac {1}{\sqrt {14}}}\end{pmatrix}}.$
For $x=-{\frac {1}{2}}$, the kernel of the matrix
    ${\begin{pmatrix}-2&-1&0\\-1&-{\frac {5}{2}}&1\\0&1&-{\frac {1}{2}}\end{pmatrix}}$
equalsh ${\begin{pmatrix}-{\frac {1}{2}}\\1\\2\end{pmatrix}}$, a normed generator is
    ${\begin{pmatrix}-{\frac {1}{4{\sqrt {21}}}}\\{\frac {1}{2{\sqrt {21}}}}\\{\frac {1}{\sqrt {21}}}\end{pmatrix}}.$
We denote these eigenvectors by $u_{1},u_{2},u_{3}$, they form an orthonormal basis. In the new coordinates $y_{1},y_{2},y_{3}$, given by the new orthonormal basis, the quadratic form is written as
    $y_{1}^{2}+3y_{2}^{2}-{\frac {1}{2}}y_{3}^{2}.$
This is clear already just by looking at the eigenvalues; for this, the computation of the eigenvectors not necessary.
Between the two bases, we have the relation
    ${\begin{pmatrix}u_{1}\\u_{2}\\u_{3}\end{pmatrix}}={\begin{pmatrix}{\frac {2}{\sqrt {6}}}&-{\frac {1}{\sqrt {6}}}&{\frac {1}{\sqrt {6}}}\\{\frac {2}{\sqrt {14}}}&{\frac {3}{\sqrt {14}}}&-{\frac {1}{\sqrt {14}}}\\-{\frac {1}{4{\sqrt {21}}}}&{\frac {1}{2{\sqrt {21}}}}&{\frac {1}{\sqrt {21}}}\end{pmatrix}}{\begin{pmatrix}e_{1}\\e_{2}\\e_{3}\end{pmatrix}}\,.$
Due to Lemma 14.14 , we have the relation
    ${\begin{pmatrix}x_{1}\\x_{2}\\x_{3}\end{pmatrix}}={\begin{pmatrix}{\frac {2}{\sqrt {6}}}&{\frac {2}{\sqrt {14}}}&-{\frac {1}{4{\sqrt {21}}}}\\-{\frac {1}{\sqrt {6}}}&{\frac {3}{\sqrt {14}}}&{\frac {1}{2{\sqrt {21}}}}\\{\frac {1}{\sqrt {6}}}&-{\frac {1}{\sqrt {14}}}&{\frac {1}{\sqrt {21}}}\end{pmatrix}}{\begin{pmatrix}y_{1}\\y_{2}\\y_{3}\end{pmatrix}}={\begin{pmatrix}{\frac {2}{\sqrt {6}}}y_{1}+{\frac {2}{\sqrt {14}}}y_{2}-{\frac {1}{4{\sqrt {21}}}}y_{3}\\-{\frac {1}{\sqrt {6}}}y_{1}+{\frac {3}{\sqrt {14}}}y_{2}+{\frac {1}{2{\sqrt {21}}}}y_{3}\\{\frac {1}{\sqrt {6}}}y_{1}-{\frac {1}{\sqrt {14}}}y_{2}+{\frac {1}{\sqrt {21}}}y_{3}\end{pmatrix}}\,$
between the coordinates $x_{1},x_{2},x_{3}$ (the dual bases of the standard basis; these coordinates were denote $x,y,z$ in the beginning) and the coordinates $y_{1},y_{2},y_{3}$ of the new orthogonal basis.