Following the definition of $\text{GL}_n:\mathbf{Alg}_k\rightarrow\mathbf{Set}:R\mapsto \text{GL}_n(R)$ found here: functor from $\mathbf{Alg}$ to $\mathbf{Set}$
I would like to show that it is a representable functor.
EDIT: wrong!
For ease of notation, $F:=\text{GL}_n$ and $G:= \text{Hom}(k,-)$
Where $\text{Hom}(k,-):\mathbf{Alg}_k\rightarrow\mathbf{Set}:R\mapsto \text{Hom}(k,R):f\mapsto (\sigma\mapsto f\circ \sigma)$
I'll define the natural transformation as:
$$\alpha_R:\text{GL}_n(R)\rightarrow \text{Hom}(k,R):(a_{i,j})\mapsto (k\mapsto \sum a_{i,j}k)$$
this defines a natural transformation. But how natural is it? I.e. are there any more intuitive ways of doing this?
EDIT: answer (from answer below and adapted to my notations)
For ease of notation, $F:=\text{GL}_n$ and $G:= \text{Hom}(A_n,-)$
where $$A_n=k[X_{11},\ldots,X_{nn},Y]/\left<1-Y\det(X_{ij})\right>.$$
Where $\text{Hom}(A_n,-):\mathbf{Alg}_k\rightarrow\mathbf{Set}:R\mapsto \text{Hom}(A_n,R):f\mapsto (\sigma\mapsto f\circ \sigma)$
I'll define the natural transformation as:
$$\alpha_R:\text{GL}_n(R)\rightarrow \text{Hom}(A_n,R)\\(a_{i,j})\mapsto (P(X_{11},\ldots,X_{nn},Y)+ (1-Y\det(X_{ij}))\mapsto P(a_{1,1},\ldots,a_{n,n},\text{det}(a_{i,j})))$$
Yes, $\text{GL}_n$ is an affine group scheme. It is represented by the $k$-algebra $$A_n=k[X_{11},X_{12},\ldots,X_{21},\ldots,X_{nn},Y]/\left<1-Y\det(X_{ij})\right>.$$ An algebra homomorphism $\phi:A_n\to R$ is given by choosing the images of $X_{ij}$ and $Y$, which must go to the inverse of $\det(\phi(X_{ij}))$ which ensures that $(\phi(X_{ij}))\in\text{GL}_n(R)$.
Waterhouse's book is a good introduction to affine group schemes.