Sylvester matrix (source code)

= Sylvester matrix
{c}
{wiki}

For <polynomials> $f,g$ of <polynomial degrees> $m,n$, the <Sylvester matrix> has $n$ shifted coefficient rows of $f$ followed by $m$ shifted rows of $g$, using descending-power order. It is a square <matrix> of size $m+n$. Its <transpose> represents the <linear map> $(A,B)\mapsto Af+Bg$ with $\deg A<n$, $\deg B<m$; its <determinant> is the <resultant>.

For an original parameter example, choose $f(x)=x^2-1$ and $g_t(x)=x-t$. Then
$$
S(f,g_t)=\begin{pmatrix}1&0&-1\\1&-t&0\\0&1&-t\end{pmatrix},\qquad
\operatorname{Res}_x(f,g_t)=t^2-1.
$$
The two lists of <coefficients> become three rows because $g_t$ is multiplied by both $x$ and $1$. Thus \b[the common-root parameter values are $t=-1$ and $t=1$]. At $t=1/2$, the <resultant> is $-3/4$, so the two <polynomials> have no <common root>.

\Image[/resultant-root-test-and-parameter.png]
{title=A <Sylvester matrix> tests when a moving <root of a polynomial> coincides with a fixed one}
{description=Original example $f(x)=x^2-1$, $g_t(x)=x-t$. Left: the vertical dashed line marks the <root of a polynomial> of $g_{1/2}$; it does not make $f$ zero. Right: the same test for all parameters is the <function graph> of the <resultant> $t^2-1$. A crossing between two arbitrary function curves would not suffice: both values must be zero.}

One can verify the certificate without any <determinant> expansion:
$$
f(x)-(x+t)g_t(x)=t^2-1.
$$
For $t\ne\pm1$, division by $t^2-1$ gives a <Bézout's identity for polynomials>. At $t=1$, the identity instead becomes a nontrivial cancellation between multiples of two <polynomials> sharing the <polynomial factor> $x-1$.

The general proof needs only a short <linear algebra> outline. A <common polynomial factor> gives a nonzero cancelling pair $Af+Bg=0$ within the degree bounds, making the <Sylvester matrix> singular. Conversely, if $f,g$ are <coprime polynomials> and $Af=-Bg$, then $f$ divides $B$; the bound $\deg B<m$ forces $B=0$ and then $A=0$. Thus the <linear map> has zero <kernel of a linear map> exactly in the coprime case. Over an <algebraic closure>, a nonconstant <common polynomial factor> is equivalent to a <common root>.

In 1840, <James Joseph Sylvester> described forming the shifted coefficient rows and taking a signed sum of products selected by <permutations>. In modern notation, this is the <Sylvester matrix> and its <determinant>. The construction turns the nonlinear common-<root of a polynomial> question into <linear algebra>. His paper's word \i[derivatives] concerns elimination, rather than the <formal derivative> used below.<The Collected Mathematical Papers of James Joseph Sylvester, Volume I/A method of determining by mere inspection the derivatives from two equations of any degree>[The Collected Mathematical Papers of James Joseph Sylvester, Volume I; Paper 9, A method of determining by mere inspection the derivatives from two equations of any degree; Collected Mathematical Papers, volume I (1904), pp. 54–55, rules 1–4; original Philosophical Magazine XVI (1840), pp. 132–135]{ref}