explicitly represent a representable functor Assume you were given a functor $$F : k\text{-}\mathbf{alg}\to\mathbf{set},$$
with the additional information that it is representable. Is there then a procedure to find an object $A$ that represents $F$? (In other words, an object $A$ such that there is a natural isomorphism $h^A \simeq F$.) 
For instance, we could think of the functor $G_m : R \mapsto R^\times$, where $R$ is a $k$-algebra and $R^\times$ is the set of invertible elements in $R$. Then the object $A = k[t,t^{-1}]$ will do, but this already requires a moment of thought. Is there an infallible way to find this?
 A: Zhen Lin's Postscript already answers the general question: If $F$ is isomorphic to a functor of the form $R \mapsto \{a \in R^I : f_j(a)=0 \forall j\}$, where $I$ is a set and $f_j \in k[\{X_i\}_{i \in I}$ are polynomials, then $F$ is represented by $k[\{X_i\}_{i \in I}]/(f_j)$. For example, the functor $R \mapsto \{(a,b,c) \in R^3 : 1+ab=c^2, c \in R^*\}$ is isomorphic to $\{(a,b,c,d) \in R^4 : 1+ab=c^2,cd=1\}$ and therefore represented by $k[x_1,x_2,x_3,x_4]/(1+x_1 x_2-x_3^2,1-x_3 x_4)$.
Let me apply this to a specific situation where you probably don't see a representing object immediately. I hope that this illustrates how one can find a representing object quite systematically. 
Let $G$ be a group and fix some $n \in \mathbb{N}$. If $R$ is a $k$-algebra, let $F_G(R)$ be the set of $n$-dimensional representations of $G$ over $R$, i.e. homomorphisms $G \to \mathrm{GL}_n(R)$. The action on morphisms is clear, thus we get a functor $F_G : \mathsf{Alg}(k) \to \mathsf{Set}$. I claim that $F_G$ is representable by some $k$-algebra $R_k(G)$. Of course this is clear by the usual Adjoint Functor Theorem quoted by Zhen Lin. But how does $R_k(G)$ look like?
For $G=\mathbb{Z}$ we have $F_{\mathbb{Z}}(R)=\mathrm{GL}_n(R)$, which is clearly represented by $R_k(\mathbb{Z})=k[\{X_{ij}\}_{1 \leq i,j \leq n},\mathrm{det}(X_{ij})^{-1}]$ (using the universal properties of polynomial algebras and localization).
If $G=G_1 \sqcup G_2$ is a coproduct of two groups, then $F_{G}=F_{G_1} \times F_{G_2}$, thus $R_k(G)=R_k(G_1) \sqcup R_k(G_2)$ as $k$-algebras, where $\sqcup=\otimes_k$ here. The same works for infinitely many groups. So we have found $R_k(G)$ for free groups $G$.
If $G_1 \rightrightarrows G_2 \to G$ is a coequalizer, then $F_G \to F_{G_1} \rightrightarrows F_{G_2}$ is an equalizer, hence $R_{G_1} \rightrightarrows R_{G_2} \to R_G$ is a coequalizer. Since every group $G$ is some coequalizer as above with $G_1,G_2$ free, we have constructed $R_k(G)$.
Note that although the construction of $R_k(G)$ depends on a free presentation of $G$ and is therefore terribly uncanonical, the definition via the universal property $\hom_{\mathsf{Alg}(k)}(R_k(G),R) \cong \hom_{\mathsf{Grp}}(G,\mathrm{GL}_n(R))$ means that $R_k(G)$ is canonically determined.
Here is an example: Let $n=1$ and $G=\mathbb{Z}/5$. We have $R_k(\mathbb{Z})=k[x,x^{-1}]$. Since $\mathbb{Z} \rightrightarrows \mathbb{Z} \to \mathbb{Z}/5$ is a coequalizer, where the two maps are multiplication with $0$ resp. $5$, it follows that (one possible construction for) $R_k(\mathbb{Z}/5)$ is the coequalizer of $k[x,x^{-1}] \rightrightarrows k[x,x^{-1}]$, where the maps send $x \mapsto x^0=1$ resp. $x^5$, i.e. $k[x]/(x^5-1)$.
Actually this example is a special case of a quite general notion of tensor product studied by Freyd in his paper Algebra-valued functors in general and tensor products in particular. If $C,D,E$ are algebraic categories, then right adjoints $C \to D$ and $D \to E$ compose to a right adjoint $C \to E$. But right adjoints $C \to D$ are represented by Co-$C$-algebras in $D$. Thus, if we also have a Co-$D$-algebra in $E$, we may "tensor" them over $D$ to get a Co-$C$-algebra in $E$. It may be described via generators and relations. In the example above, $F_G$ is the composition of the representable functors $\mathrm{GL}_n : \mathsf{Alg}(k) \to \mathsf{Grp}$ and $\hom(G,-):\mathsf{Grp} \to \mathsf{Set}$, hence represented by $A \otimes_{\mathsf{Grp}} G$ where $A$ represents $\mathrm{GL}_n$. Of course, Freyd's tensor products can be applied to lots of other examples.
A: There are formal results of various kinds. For example, a functor $G : \textbf{Alg}_k \to \textbf{Set}$ is representable if and only if it has a left adjoint $F : \textbf{Set} \to \textbf{Alg}_k$, and the representing object is the $k$-algebra $F 1$. This is because $\textbf{Alg}_k$ is copowered (i.e. tensored) over $\textbf{Set}$.
Here is a slightly better result. Let $\mathcal{C}$ be any locally presentable category (such as $\textbf{Alg}_k$).
Theorem. Let $G : \mathcal{C} \to \textbf{Set}$ be a functor. The following are equivalent:


*

*$G$ is representable.

*$G$ preserves all (small) limits and there exists a regular cardinal $\kappa$ such that $G$ preserves all $\kappa$-filtered colimits.

*$G$ has a left adjoint.
Proof. 1 ⇒ 2. Suppose $G$ is represented by $A$. Since $\mathcal{C}$ is a locally presentable category, there exists a regular cardinal $\kappa$ such that $A$ is a $\kappa$-presentable object in $\mathcal{C}$; but then $\mathcal{C}(A, -)$ must preserve all limits and all $\kappa$-filtered colimits.
2 ⇒ 3. Apply the accessible adjoint functor theorem.
3 ⇒ 1. Let $F : \textbf{Set} \to \mathcal{C}$ be a left adjoint of $G$. Since $1$ represents $\textrm{id} : \textbf{Set} \to \textbf{Set}$, we have the natural bijections
$$G B \cong \textbf{Set}(1, G B) \cong \mathcal{C}(F 1, B)$$
and thus $G \cong \mathcal{C}(F 1, -)$. 　◼
More explicitly, by examining the proof of the accessible adjoint functor theorem, one can extract the following description of $F 1$. First, let $\mathcal{K}$ be the full subcategory of $\kappa$-presentable objects in $\mathcal{C}$, and let $\mathcal{H}$ be the full subcategory of the comma category $(1 \downarrow G)$ spanned by those objects of the form $(B, b)$, where $B$ is in $\mathcal{K}$ and $b \in G B$. Since $1$ is a $\kappa$-presentable object in $\textbf{Set}$, and $G$ preserves $\kappa$-filtered colimits, $\mathcal{H}$ must be a weakly initial family in $(1 \downarrow G)$. However, $\mathcal{H}$ is essentially small, and $G$ preserves small limits, so $(1 \downarrow G)$ has small limits, and thus the limit of the inclusion $\mathcal{H} \hookrightarrow (1 \downarrow G)$ exists. Freyd's initial object theorem says that this is an initial object for $(1 \downarrow G)$, and hence is the representing object $F 1$.
In some sense, however, this is also a purely formal result, since the representing object $F 1$ is itself $\kappa$-presentable and thus is amongst the objects in $\mathcal{H}$...

Postscript. If you have an explicit description of the functor to represent then there is a little bit more that can be said. For example, if $G B = \{ (b_1, \ldots, b_n) \in B^n : \phi [b_1, \ldots, b_n] \}$, where $\phi$ is a (possibly infinite) conjunction of (quantifier-free) equations in $n$ variables, then $G$ is represented by the free algebra on $n$ generators $a_1, \ldots, a_n$ satisfying the condition $\phi [a_1, \ldots, a_n]$. Of course, this is none other than the universal property of $F 1$, where $F$ is a left adjoint of $G$. Your example of $\mathbb{G}_m$ is an instance of this: take $n = 2$ and $\phi(x_1, x_2)$ to be the equation $x_1 x_2 = 1$.
Note that this means is that any moduli functor that can be represented by an affine scheme must be isomorphic to a functor of a very restricted form: each datum for an algebra $B$ can be reduced to a sequence (of fixed but possibly infinite length) of elements of $B$ satisfying a (possibly infinite) conjunction of equations! That is one of the reasons why we have to look at non-affine schemes and more general kinds of algebraic “spaces” to solve moduli problems.
