Smallest variety containing $\mathbb{Z}$ I've been told that the answer is all abelian groups, but I don't see how.  
I know that the class of all nilpotent groups of degree 1 is a group variety and that a group being nilpotent of degree 1 is equivalent to that group being abelian so the class of all abeliani groups is indeed a variety.  I also know that the integers are a group when considered with addition as the operation and that a class of algebraic structures of the same signature is a variety if and only if it is closed under the taking of homomorphic images, subalgebras and (direct) products, but I'm not quite sure how to use this here or if this is even the way to go about this.  
I think that the main structure of this proof should be to show that $\mathbb{Z}$ is contained inside the variety of all abelian groups and then show that its the smallest one that could possibly contain $\mathbb{Z}$.  I know that in the class of abelian groups, the language is $(+, 0, \frac{1}{})$ and the identities are 
$$(x+y)+z = x + (y+z),$$ 
$$x+y = y+x,$$ 
$$x + 0=x,$$ 
$$x+(-x) = 0,$$ 
all of which obviously hold on $\mathbb{Z}$.  Is that enough to say that the class of abelian groups contains $\mathbb{Z}$?  
How would I show nothing smaller could contain $\mathbb{Z}$?
 A: It seems you use the definition if variety given by " a class of algebras defined by a certain set of equations".
In that case, one can prove the HSP theorem (which some authors use as a definition of variety) : let $V$ be a variety containing $\mathbb{Z}$. 
This variety is stable under products (that's the P in HSP) so it contains all the $\mathbb{Z}^X$, $X$ a set. 
But now $\mathbb{Z}^{(X)}$ (the sequences of $\mathbb{Z}^X$ that have all coordinates $0$ except perhaps for a finite number of them) is a subalgebra of $\mathbb{Z}^X$ so is in $V$ (that's the S in HSP).  
That's now the interesting part : if $G$ is an abelian group, then $G$ is a homomorphic image of $\mathbb{Z}^{(G)}$ (that's a standard exercise in group theory), hence $G$ is in $V$ (that's the H in HSP).
This shows that all abelian groups are in $V$
But you also proved that all algebras in $V$ were abelian groups, so $V$ is precisely the variety of abelian groups !
Note that I've used the fact that the free abelian groups (the $\mathbb{Z}^{(X)}$ for $X$ a set) were in $V$, which came from the fact that the free abelian group on one generator ($\mathbb{Z}$) was in $V$. 
As soon as you can show that a variety contains the free algebras of $V$, then you can conclude in exactly the same way I did.  
A: I'll give an answer that does not depend on the HSP theorem.
Let $\mathsf{V}(\mathbb{Z})$ be the smallest variety containing the group $\mathbb{Z}$. Let $\mathcal{A}$ be the variety of all abelian groups. It should be clear that $\mathsf{V}(\mathbb{Z})\subseteq\mathcal{A}$ since $\mathbb{Z}$ is an abelian group. To show the other inclusion, we assume by way of contradiction that $\mathbb{Z}$ satisfies an equation that is not satisfied by all abelian groups. Let's call that equation $s\approx t$. 


*

*If $s\approx t$ is satisfied, then so is $s-t\approx 0$.

*The equation $s-t\approx 0$ is of the form $m_1x_1+\dots+m_kx_k\approx 0$ for some integers $m_1,\dots,m_k$.

*If $m_1x_1+\dots+m_kx_k\approx 0$ is satisfied, then so are the equations $m_1x\approx0$, $m_2x\approx0$, $\dots$, $m_kx\approx 0$.

*If the equations $m_1x_1\approx0$, $\dots$, $m_kx\approx 0$ are satisfied, then so is $nx\approx0$ where $n=\gcd(m_1,\dots,m_k)$.
But $\mathbb{Z}$ does not satisfy $nx\approx0$ for any integer $n$; a contradiction! 
The details still need to be filled in. If you can't figure them out yourself, then I recommend consulting Cliff Bergman's ''Universal algebra: fundamentals and selected topics.''
