What Yoneda tells us about algebraic geometry I am currently learning about relative algebraic geometry, and I'm just trying to walk myself through some of the foundations and motivating examples before moving on to the proper stuff (symmetric monoidal categories et al.), starting with the category $\mathsf{Comm}_k$ of commutative $k$-algebras.
Below is my attempt at explaining the setup.


*

*Define $\mathsf{Aff}_k=\mathsf{Comm}_k^{\textrm{op}}$, the category of affine schemes over $k$;

*Define $\mathsf{Sp}_k=\mathsf{PShv}(\mathsf{Aff}_k)=\mathsf{Fun}(\mathsf{Aff}_k^{\textrm{op}},\mathsf{Set})$, the category of $k$-spaces;

*Yoneda's lemma tells us that,for $A\in\mathsf{Aff}_k^{\textrm{op}}$ and $F\in\mathsf{Sp}_k$,


*

*$\mathrm{Hom}_{\mathsf{Sp}_k}(Y_A,F)\cong F(A)$, where the isomorphism is given by the canonical restriction;

*the functor $Y_A$ is fully faithful;


*Define $\mathrm{Spec}=Y\colon\mathsf{Aff}_k\to\mathsf{Sp}_k$, the spectrum functor, as the Yoneda functor;

*Note that $\mathsf{Aff}_k$ is equivalent to the essential image of the Yoneda embedding (since $\mathrm{Spec}$ is fully faithful (by the above) and essentially surjective onto its essential image).


First of all, it'd be nice to know if all of the above is free of mistakes and the correct sort of approach, and if so (or even if not, I guess), here are my questions:


*

*For the first fact that Yoneda's lemma tells us in the above, what exactly does the 'canonical restriction' look like in this scenario?

*What does the first fact actually tell us about this whole setup? I've used the second fact, which is sort of a corollary of Yoneda's lemma, from what I can tell, but don't see what the first fact tells us.

*Why do we care about the last bit, that $\mathsf{Aff}_k$ is equivalent to the essential image of the Yoneda embedding? I know that some places define $\mathsf{Aff}_k$ to be this essential image, and others don't...

*If we work with a finitely-generated $k$-algebra $A$ then we can write 
$$A=\frac{k[x_1,\ldots,x_n]}{(f_1,\ldots,f_m)}$$
and then we have the bijection of sets (if the category is small? see below)
$$\mathrm{Hom}(A,B)\longleftrightarrow\{y\in B^n\mid f_1(y)=\ldots=f_m(y)=0\}$$
since a morphism is given by choosing a place to send the $x_i$, but since zero must be preserved, these images must satisfy the $f_i$.
But are we working with small categories, and should we just be working with finitely-generated commutative $k$-algebras, or is this nice fact just a useful way of looking at the 'nice' objects of $\mathsf{Comm}_k$?


I know there are a lot of questions, so if you only answer one, please make it 2 or 3 (but I think they are all reasonably linked).
 A: The Yoneda lemma tells you that specifying an affine scheme $X$ is the same thing as specifying its "functor of points," namely the functor $X(-) : \text{CRing} \to \text{Set}$ it represents. For this observation to have real weight you should know examples of affine schemes which are most easily described by describing their functors of points. 
For example, there is a functor $GL_n(-) : \text{CRing} \to \text{Grp}$ sending a commutative ring $R$ to the group $GL_n(R)$ of invertible $n \times n$ matrices over $R$, and sending a morphism $R \to S$ of commutative rings to the obvious group homomorphism $GL_n(R) \to GL_n(S)$. The underlying set-valued functor of this group-valued functor is representable by an affine scheme (exercise), and the fact that it lifts to a group-valued functor means that this affine scheme is a group scheme, or equivalently that it is $\text{Spec}$ of a commutative Hopf algebra. But I don't have to write down this Hopf algebra to write down its functor of points. 
At the level of morphisms, there is a natural transformation $\det : GL_n(-) \to GL_1(-)$ which, by the Yoneda lemma, comes from some morphism of Hopf algebras in the other direction. But again I don't have to write down this morphism of Hopf algebras to write down the effect it has on functors of points. 
