Show that $\hom_{R-\mathsf{Mod}}(R^{\oplus A},R)\cong R^A$ for a ring $R$ and any set $A$ Let $R$ be a ring and $A$ any set. Show that $\hom_{R-\mathsf{Mod}}(R^{\oplus A},R)$ satisfies the universal property for the product of the family $\{R_a\}_{a\in A}$ where for every $a\in A$, $R_a\cong R$.
It is a consequence of this theorem Show that $Hom_R(R^n,M) \cong M^n$ for R-modules, but I'm trying to find an explicit map.
 A: Hint: Each factor of $R$ in $R^{\oplus A}$ has a $1$ and the images of these identity elements under a morphism $R^{\oplus A} \to R$ define an element of $R^A$.
Edit: For example if $|A| = 3$ then we would be trying to prove that $\hom(R^3, R) \simeq R^3$.  Well the three factors of $R$ each have a $1$, in $R^3$ these elements are $a = (1, 0, 0)$, $b = (0, 1, 0)$, and $c = (0, 0, 1)$.  Now the isomorphism is given by
$$\begin{align*}\hom(R^3, R) &\simeq R^3 \\ \phi &\mapsto (\phi(a), \phi(b), \phi(c))\end{align*}$$
Conversely, if $(r_1, r_2, r_3) \in R^3$ then we can define a map $\psi_{(r_1, r_2, r_3)}\colon R^3 \to R$ by $(x, y, z) \mapsto xr_1 + yr_2 + zr_3$ and this defines the inverse to the isomorphism above:
$$\begin{align*}R^3 &\simeq \hom(R^3, R) \\ (r_1, r_2, r_3) &\mapsto \psi_{(r_1, r_2, r_3)}\end{align*}$$
So that's the maps written down explicitly when $|A| = 3$.  It's up to you now to write down the same formulas and check that they work for any $A$.  The only real catch is that once $|A|$ is infinite you'll have to make the distinction between the direct product $R^A$ and the direct sum $R^{\oplus A}$.  For finite $A$ these are the same thing which is why in my example I wrote $R^3$ in both places instead of writing $R^{\oplus3}$ inside the hom.
A: Let's prove that there is a canonical isomorphism $\hom_R(R^{\oplus A},M)\simeq M^A$, where $M$ is a left $R$-module. 
For each $a\in A$ let $p_a:M^A\to M$ and $i_a:R\to R^{\oplus A}$ be respectively the $a$-th canonical projection and co-projection. 
There is a unique map $$\phi:\hom_R(R^{\oplus A},M)\to M^A$$ such that $$p_a(\phi(f)):=(f\circ i_a)(1)$$ for all $f$ and all $a$, and there is a unique map $$\psi:M^A\to\hom_R(R^{\oplus A},M)$$ such that $$(\psi(g)\circ i_a)(1):=p_a(g)$$ for all $g$ and all $a$. Moreover $\phi$ and $\psi$ are inverse bijections.
