Consider these two polynomials:
$$f=x^2y+3xy-1$$ $$g=6x^2+y^2-4$$
I need to compute their resultant, denoted in my textbook as $h=Res(f,g,x)$.
Here's where I need help: setting up the Sylvester Matrix. I could be missing something obvious, but from the definitions I've read online, I kept getting a matrix like so:
$X =\begin{bmatrix} 1 & 0 & 0 & 6 & 0 & 0\\3 & 1 & 0 & 1 & 6 & 0\\-1 & 3 & 1 & -4 & 1 & 6\\0 & -1 & 3 & 0 & -4 & 1\\0 & 0 & -1 & 0 & 0 & -4\\\end{bmatrix}$
My understanding is that $X$ should be a square matrix- what am I missing?
Thanks in advance.
UPDATE:
Is this more like it?
$X =\begin{bmatrix} y & 0 & 6 \\-1 & y & 0 \\0 & -1 & y^2-4 \\\end{bmatrix}$
Write your polynomials as $$ yx^2+ (3xy)-1 $$ and $$ -6x^2+ (y^2-4) $$
As polynomials in $x$, these have degree two, so your matrix should be a $4 \times 4$ matrix. $$ \begin{pmatrix} y & 3y & -1 & 0 \\ 0 & y & 3y & -1 \\ -6 & 0 & y^2-4 & 0 \\ 0 & -6 & 0 & y^2-4 \end{pmatrix} $$
Taking the determinant gives $$ y^{6}-62 y^{4}-12 y^{3}+232 y^{2}+48 y+36 $$
This can also be computed in Macaulay2 by the commands: