[proofplan]
We compare the two closed subsets by comparing their vanishing ideals in the coordinate ring $S=k[x_{r+1},\dots,x_n]$. First, every element of $I_r$ vanishes on $\pi(X)$, which gives $\overline{\pi(X)}\subseteq V(I_r)$. Conversely, if a polynomial in $S$ vanishes on $\pi(X)$, then as a polynomial in $k[x_1,\dots,x_n]$ it vanishes on $X$, so the affine radical ideal correspondence over an [algebraically closed field](/page/Algebraically%20Closed%20Field) places it in $\sqrt I\cap S$. The elementary identity $\sqrt I\cap S=\sqrt{I\cap S}$ then identifies the vanishing ideal of $\overline{\pi(X)}$ with $\sqrt{I_r}$, and hence the [closed set](/page/Closed%20Set) is exactly $V(I_r)$.
[/proofplan]
[step:Show that every eliminated polynomial vanishes on the projected image]
Let $R:=k[x_1,\dots,x_n]$ and let $S:=k[x_{r+1},\dots,x_n]\subseteq R$. When $r=n$, this means $S=k$ and $\mathbb A_k^{n-r}=\mathbb A_k^0$.
Let $f\in I_r=I\cap S$. For every point $a=(a_1,\dots,a_n)\in X$, the equality $f\in I$ gives
\begin{align*}
f(a_1,\dots,a_n)=0.
\end{align*}
Since $f\in S$, the value of $f$ depends only on the last $n-r$ coordinates, so
\begin{align*}
f(\pi(a))=f(a_{r+1},\dots,a_n)=0.
\end{align*}
Thus every $f\in I_r$ vanishes on $\pi(X)$. Since $V(I_r)$ is Zariski closed in $\mathbb A_k^{n-r}$ and contains $\pi(X)$, it contains the closure:
\begin{align*}
\overline{\pi(X)}\subseteq V(I_r).
\end{align*}
[/step]
[step:Identify the vanishing ideal of the projected image]
For a subset $Y\subseteq \mathbb A_k^{n-r}$, define its vanishing ideal in $S$ by $\mathcal I_S(Y):=\{g\in S:g(y)=0 \text{ for every } y\in Y\}$. Because polynomial functions are continuous for the Zariski topology, a polynomial vanishes on $Y$ if and only if it vanishes on $\overline{Y}$. Therefore
\begin{align*}
\mathcal I_S(\overline{\pi(X)})=\mathcal I_S(\pi(X)).
\end{align*}
We now prove
\begin{align*}
\mathcal I_S(\pi(X))=\sqrt I\cap S.
\end{align*}
Let $g\in \mathcal I_S(\pi(X))$. Regard $g$ as an element of $R$ through the inclusion $S\subseteq R$. For every $a\in X$,
\begin{align*}
g(a)=g(\pi(a))=0,
\end{align*}
so $g$ vanishes on $X=V(I)$. Since $k$ is algebraically closed, the affine radical ideal correspondence [citetheorem:9414] gives the equality between the vanishing ideal of $V(I)$ in $R$ and $\sqrt I$. Hence $g\in \sqrt I\cap S$.
Conversely, if $g\in \sqrt I\cap S$, then $g$ belongs to the vanishing ideal of $V(I)=X$ by the same radical ideal correspondence. Thus for every $a\in X$,
\begin{align*}
g(\pi(a))=g(a)=0,
\end{align*}
because $g$ depends only on the coordinates $x_{r+1},\dots,x_n$. Hence $g\in \mathcal I_S(\pi(X))$.
[guided]
The target space $\mathbb A_k^{n-r}$ has coordinate ring $S=k[x_{r+1},\dots,x_n]$, so the correct vanishing ideal to compute is not an ideal of the full ring $R=k[x_1,\dots,x_n]$, but an ideal of $S$. For any subset $Y\subseteq \mathbb A_k^{n-r}$, define $\mathcal I_S(Y):=\{g\in S:g(y)=0 \text{ for every } y\in Y\}$. A polynomial function $g:\mathbb A_k^{n-r}\to k$ is continuous in the Zariski topology, and $\{0\}\subseteq \mathbb A_k^1$ is Zariski closed. Therefore the zero set of $g$ is closed. It follows that $g$ vanishes on $Y$ if and only if it vanishes on the closure $\overline Y$. Applying this with $Y=\pi(X)$ gives
\begin{align*}
\mathcal I_S(\overline{\pi(X)})=\mathcal I_S(\pi(X)).
\end{align*}
We next compute $\mathcal I_S(\pi(X))$. Let $g\in \mathcal I_S(\pi(X))$. The polynomial $g$ is an element of $S$, and the inclusion $S\subseteq R$ lets us also view $g$ as a polynomial in $x_1,\dots,x_n$ which does not involve $x_1,\dots,x_r$. If $a=(a_1,\dots,a_n)\in X$, then $\pi(a)=(a_{r+1},\dots,a_n)\in \pi(X)$, so the definition of $\mathcal I_S(\pi(X))$ gives
\begin{align*}
g(\pi(a))=0.
\end{align*}
Because $g$ depends only on $x_{r+1},\dots,x_n$, this is the same as
\begin{align*}
g(a)=0.
\end{align*}
Thus $g$ vanishes on $X=V(I)$ as an element of the full [polynomial ring](/page/Polynomial%20Ring) $R$.
Now we use the algebraically closed hypothesis. The affine radical ideal correspondence [citetheorem:9414] says that, over an algebraically closed field, the vanishing ideal of $V(I)$ is $\sqrt I$. Since $g$ vanishes on $V(I)$, we obtain $g\in\sqrt I$. We already had $g\in S$, hence
\begin{align*}
g\in \sqrt I\cap S.
\end{align*}
For the reverse inclusion, let $g\in \sqrt I\cap S$. Again by the affine radical ideal correspondence [citetheorem:9414], membership in $\sqrt I$ means that $g$ vanishes on $V(I)=X$. Therefore $g(a)=0$ for every $a\in X$. Since $g\in S$, evaluating $g$ on $a$ is the same as evaluating it on the projected point $\pi(a)$:
\begin{align*}
g(\pi(a))=g(a)=0.
\end{align*}
Thus $g$ vanishes on every point of $\pi(X)$, which means $g\in\mathcal I_S(\pi(X))$.
The two inclusions prove
\begin{align*}
\mathcal I_S(\pi(X))=\sqrt I\cap S.
\end{align*}
[/guided]
[/step]
[step:Commute radical with contraction to the coordinate subring]
We prove the ring-theoretic identity
\begin{align*}
\sqrt I\cap S=\sqrt{I\cap S}.
\end{align*}
If $g\in \sqrt I\cap S$, then $g^m\in I$ for some integer $m\geq 1$. Since $g\in S$, also $g^m\in S$, so
\begin{align*}
g^m\in I\cap S=I_r.
\end{align*}
Hence $g\in \sqrt{I_r}$.
Conversely, if $g\in \sqrt{I_r}$, then $g\in S$ and $g^m\in I_r\subseteq I$ for some integer $m\geq 1$. Hence $g\in \sqrt I\cap S$. Therefore
\begin{align*}
\sqrt I\cap S=\sqrt{I_r}.
\end{align*}
[/step]
[step:Convert equality of vanishing ideals into equality of closed sets]
Combining the previous steps gives
\begin{align*}
\mathcal I_S(\overline{\pi(X)})=\sqrt{I_r}.
\end{align*}
The set $\overline{\pi(X)}$ is Zariski closed in $\mathbb A_k^{n-r}$, and $k$ is algebraically closed. Applying the affine radical ideal correspondence [citetheorem:9414] in the [affine space](/page/Affine%20Space) $\mathbb A_k^{n-r}$ gives
\begin{align*}
\overline{\pi(X)}=V(\mathcal I_S(\overline{\pi(X)})).
\end{align*}
Thus
\begin{align*}
\overline{\pi(X)}=V(\sqrt{I_r}).
\end{align*}
Since a polynomial and any positive power of it have the same zero set condition at every point, an ideal and its radical define the same affine algebraic set:
\begin{align*}
V(\sqrt{I_r})=V(I_r).
\end{align*}
Therefore
\begin{align*}
\overline{\pi(X)}=V(I_r).
\end{align*}
When $r=n$, the same argument applies with $S=k$ and target $\mathbb A_k^0$. In that case $I_n=I\cap k$ is either $0$ or $k$, and the displayed equality says respectively that the image closure is the unique point of $\mathbb A_k^0$ or the empty set, exactly matching whether $V(I)$ is nonempty. This completes the proof.
[/step]