I am working on the second part of Exercise 5.16 of Atiyah-MacDonald, which involves proving that over an algebraically closed (and thus infinite) field $k$, given an affine algebraic variety $X\in k^n$ with coordinate ring $A=k[x_1,\dots,x_n]/I(X)$, there is a linear subspace $L$ of $k^n$ and a linear map $k^n\to L$ that takes $X$ onto $L$ (i.e., the restriction to $X$ is still surjective). I am quite confused, and probably am missing some crucial insight/understanding, so this question might not make much sense.
In any case, my approach is as follows: Noether normalization gives algebraically independent elements $y_1,\dots,y_r$ such that $k[y_1,\dots,y_r]\subset A$ is an integral extension. There is a correspondence between points $\gamma=(\gamma_1,\dots,\gamma_r)$ of $k^r$ and homomorphisms $p_\gamma:k[y_1,\dots,y_r]\to k$ given by evaluation at $\gamma$. Now Exercise 5.2 (see below) says we can extend $p_\gamma$ to a homomorphism $f:A\to k$. Moreover, both $\ker p_\gamma$ and $\ker f$ are maximal (since they are kernels of maps onto fields), and $\ker f\cap k[y_1,\dots,y_r]=\ker p_\gamma$.
(Exercise 5.2 says that given an integral extension $A\subset B$, any homomorphism from $A$ into an algebraically closed field $k$ can be extended to a homomorphism $B\to k$.)
Supposedly this is enough for the proof, but I have no idea why. Where is the linear map $k^n\to L$ that takes $X$ onto $L$, and how do we know that it's linear? And how does the above prove that this linear map $X\to L$ is surjective?
My best guess is that we somehow think of $\mathrm{Spec}(k[y_1,\dots,y_r])$ as $k^r$ and $\mathrm{Spec}(A)$ as $X$, and then the induced map $\mathrm{Spec}(A)\to\mathrm{Spec}(k[y_1,\dots,y_r])$ that arises from the inclusion $k[y_1,\dots,y_r]\to A$ is the linear map we want, but I have no clue how to see that this must be "linear"—or even if that idea makes sense for maps between spectra, since they aren't $k$-vector spaces—or how it can be considered a linear map $k^n\to L$, since it is defined only on $X$. And I also have some qualms about thinking of $\mathrm{Spec}(k[y_1,\dots,y_r])$ as $k^r$ since I thought this requires the Nullstellensatz (to guarantee that the maximal ideals in the spectrum are precisely the points in $k^r$), yet we're supposed to use the result of this exercise to prove this statement of the Nullstellensatz.
(I have seen this question and this one, and neither one has helped clarify things for me.)