Let $X \neq \emptyset$ be a set and $(R,+, \cdot)$ a commutative Ring with $\mathbb{1}$ and $(N,+, \cdot)$ an $R$-Module. Show that $(\text{map}(X,N), +, \cdot)$ is an $R$-Module where for $A= \text{map}(X,N)$ $$+: \begin{cases} A \times A &\longrightarrow A \\ (\varphi, \psi) & \longmapsto \varphi + \psi\end{cases}, \text{ with } (\varphi+\psi)(x):= \varphi(x) + \psi(x), \forall x \in X \\ \cdot : \begin{cases}R \times A & \longrightarrow A \\ (r, \varphi) & \longmapsto r \cdot \varphi \end{cases}, \text{ with } (r \cdot \varphi)(x) := r \cdot (\varphi(x)), \forall x \in X $$
My approach: I managed to show that $(\text{map}(X,N), +)$ is an abelian group. That was not too hard since most important requirements (like associativity and commutativity) followed from the fact that $(N,+)$ is an abelian group.
What remains to be done is to show that the multiplication defined as above is distributive, associative and unitary.
For this step I have no idea how to begin, could someone provide me some hints on how about to go for lets say distributivity?
My attempt: Let $r$ be in $R$ and $\varphi, \psi \in \text{map}(X,N)$ then I only get to the point of applying the definition $$r((\varphi + \psi)(x)):= r ( \varphi(x) + \psi(x)) $$ and I get stuck, I am sure I need to apply criterias of $(R, + , \cdot)$ being a Ring but I don't see how. Also I get confused by where the multiplication and the addition comes from.
Every single module axiom for $map(X,N)$ follows from the corresponding module axiom for $N$.
For example, when we want to show $r(f+g)=rf + rg$ for maps $f,g : X \to N$, we have to show $(r(f+g))(x) = (rf+rg)(x)$ for all $x \in X$. The left hand side is by definition $r (f+g)(x)$, which is by definition $r (f(x)+g(x))$. The right hand side is by definition $(rf)(x) + (rg)(x)$, which is by definition $r f(x) + r g(x)$. But $r (f(x)+g(x))=r f(x) + r g(x)$ holds in $N$ because this is a module.
All the other axioms follow in the same way. Here is a useful and important generalization: If $(N_i)_{i \in I}$ is any family of algebraic structures of the same type (for example modules, but also groups, rings, etc.), then $\prod_{i \in I} N_i$ can be made into an algebraic structure of the same type, using pointwise operations. Every single axiom follows from the one in each $N_i$. In particular, if $N$ is an algebraic structure and $X$ is a map, then $\prod_{x \in X} N = map(X,N)$ becomes an algebraic structure of the same type.