How many homomorphisms are there of $\Bbb Z \times \Bbb Z\times \Bbb Z$ into $\Bbb Z$? I've tried looking around for an explanation to this problem, but I've been having trouble finding a clear solution that specifically focuses on this question:
How many homomorphisms are there of $\Bbb Z \times \Bbb Z\times \Bbb Z$ into $\Bbb Z$?
I'm studying abstract algebra and we have just begun discussing rings. Thank you in advance for your help. I would appreciate it if you could give me step by step help for this problem. This is not for homework- I just need to figure out how to do this problem to prepare for my exam. Thanks!
Edit: Here is a post that addressed the question, but did not answer it fully: Describe all ring homomorphisms
 A: Assuming the question is about ring homomorphisms, there are $3$. Here is how to see this very explicitly. 
Write $e_1 = (1, 0, 0), e_2 = (0, 1, 0), e_3 = (0, 0, 1)$. These three elements form a complete set of orthogonal idempotents. This means that they satisfy $e_i e_j = \delta_{ij} e_j$ and $\sum e_i = 1$, or more explicitly
$$e_i^2 = e_i, e_i e_j = 0 \text{ if } i \neq j, e_1 + e_2 + e_3 = 1.$$
The significance of these conditions for us is that they must be preserved by ring homomorphisms. Hence if $f : \mathbb{Z}^3 \to \mathbb{Z}$ is a ring homomorphism, $f(e_i)$ is a complete set of orthogonal idempotents in $\mathbb{Z}$. It's clear that $f$ is determined by the $f(e_i)$.
But $\mathbb{Z}$ only has two idempotents, namely $0$ and $1$. The condition that $\sum f(e_i) = 1$ means exactly one of the $f(e_i)$ is equal to $1$, and then orthogonality is automatic. Hence there are $3$ homomorphisms corresponding to whether $f(e_1), f(e_2)$, or $f(e_3)$ is $1$; these are the $3$ projection maps $\mathbb{Z}^3 \to \mathbb{Z}$.
More generally, homomorphisms $\mathbb{Z}^n \to \mathbb{Z}^m$ correspond to functions $m \to n$. 
The algebraic significance of complete sets of orthogonal idempotents in a commutative ring $R$ is that they correspond to decompositions of $R$ as a finite product $\prod_i R e_i$ of rings. The geometric significance is that they correspond to decompositions of $\text{Spec } R$ into a finite disjoint union $\coprod_i \text{Spec } R e_i$ of affine schemes. Here $\text{Spec } \mathbb{Z}^n$ decomposes into $n$ copies of $\text{Spec } \mathbb{Z}$. 
A: (I'm assuming that the question is about module homomorphisms, not ring homomorphisms.)
Adam is right. In more detail:

Definition/Proposition.
Suppose we're given
  
  
*
  
*a commutative ring with unity, call it $R$,
  
*an $R$-module, call it $X$,
  
*a finite set $S$.
  
  
  Then there's a natural bijective correspondence between:
  
  
*
  
*homomorphisms $X \leftarrow R^S$ and 
  
*functions $X \leftarrow S.$
  
  
  given as follows:
Firstly, assign to each $s \in S$ a vector $e_s \in R^S$ writing by $e_s(s') = [s=s']$, where $[]$ is the Iverson bracket.
$(\Rightarrow)$ Given a homomorphism $h : X \leftarrow R^S$, we get a function $F(h) : X \leftarrow S$ defined as follows: $$F(h)(s) = h(e_s).$$
$(\Leftarrow)$ Given a function $f : X \leftarrow S$, we get a homomorphism $H(f) : X\leftarrow R^S$ by writing: $$H(f)(a) = \sum_{s \in S} a(s)f(s)$$
(The above sum makes sense because $S$ is finite.)

To prove this:
Step 0. Check that $H(f)$ really is a homomorphism.
Step 1. Check that these processes are inverse to each other. That is:
$$H(F(h)) = h, \qquad F(H(f)) = f$$
Step 2. (Optional). If you know some category theory, you can also go ahead and try to prove that $H$ and $F$ are natural transformations.
