I'm reading J.S. Milne's notes on algebraic groups (http://www.jmilne.org/math/CourseNotes/iAG200.pdf). Here $k$ is a field, and an algebraic scheme over $k$ is a locally ringed space $(X, \mathcal O_X)$, where $\mathcal O_X$ is a sheaf of finitely generated $k$-algebras, and $X$ has a finite cover of open affines, where here the underlying space of affine $k$-scheme is the space of maximal ideals of a finitely generated $k$-algebra.
If $R$ is a f.g. $k$-algebra, define the "$R$-points" $X(R)$ to be the set of morphisms from $\textrm{Max }R$ to $X$. If $X$ is an affine $k$-scheme corresponding to a f.g. $k$-algebra $A$, then $X(R)$ can be identified with the set of $k$-algebra homomorphisms $A \rightarrow R$.
Now, take $X$ to be the affine $k$-scheme $\textrm{SL}_n$, which is by definition the space of maximal ideals of $A:= k[X_{11}, X_{12}, ... , X_{nn}]/(\textrm{Det}-1)$.
By the contravariant Yoneda lemma, the mapping $X \mapsto X(-)$ gives an equivalence between the category of algebraic $k$-schemes and a full subcategory of the category of functors from (finitely generated $k$-algebras) to (sets).
Milne then writes (page 19) "From this perspective, $\textrm{SL}_n$ is the algebraic group whose $R$-points are the $n$ by $n$ matrices with coefficients in $R$ with determinant $1$."
Why is this? Even if I pick $R = k$, I don't see why $\textrm{SL}_n(k)$, by definition the set of $k$-algebra homomorphisms from $A$ to $k$, would coincide with matrices with coefficients in $k$ with determinant $1$. Certainly if $k$ is algebraically closed this would be the case.