Problem: Prove that the set $M$ of monic polynomials with repeated roots is an algebraic subset of $\mathbb{A}^n$. (throughout we work over an algebraically closed field $k$)
Attempt: I'm a bit confused here. Let's say I have a monic polynomial $f(x) = x^n + a_{n-1} x^{n-1} + \ldots a_0.$ This can be seen as a point in $\mathbb{A}^n$, by taking the coefficients $(a_{n-1}, \ldots a_0) \in \mathbb{A}^n$ which uniquely determine the polynomial.
How can I prove the stated claim? I know that to every monic polynomial $f$, I can associate its discriminant $D(f)$, which will tell me if $f$ has repeated roots if $D(f) = 0$.
Help is appreciated.
Can I then just say that $M$ is the zero set of the discriminant of every monic polynomial? In what ring does the discriminant live?
I need to find an ideal $\mathfrak{a}$ in $k[x_1, \ldots, x_n]$, such that $M$ is the zero set of this ideal.
As was talked about in the comments:
The set of monic polynomials with repeated roots is the vanishing set of $\Delta$ where $$ \Delta = \prod_{i < j} (r_i - r_j)^2 = (-1)^{n \choose 2} \det \operatorname{Syl}(p,p')$$
where $r_1,\dots,r_n$ are the roots and $\operatorname{Syl}(p,p')$ is the the Sylvester Matrix of $p$ and $p'$.
The entries of $\operatorname{Syl}(p,p')$ are the coefficients of $p$ and of $p'$ and so the determinant gives you a polynomial in the coefficients of $p$.