Question about R-algebra "generated by" Background:
In the context of Atiyah-Macdonald (so all rings are considered commutative and unital) an $R$-algebra, $A$, is defined to be a ring $A$ with a homomorphism $f\colon R \to A$. As mentioned in the text, the point is that the homomorphism induces a compatible $R$-mod structure on the ring $A$. 
First, I believe that this definition actually defines an associative algebra but that is not my point here. I have also seen the alternate definition of an $R$-algebra that does not mention the homomorphism $f$, but simply requires that $A$ have both a ring structure and a compatible $R$-mod structure. That is fine with me. 
Question:
Out of the three objects rings, modules, and algebras, the last is the one that I have the least experience with. Something that is particularly confusing to me is the notion of an algebra being generated by a set of elements. The way this "generating" process is defined is not intuitive to me. The notions of an ideal being generated by a set of elements or a module generated by a set of elements seems to be the intuitive process to me, just analogues of 'span' from linear algebra - taking linear combinations with coefficients from the appropriate place. This is what I naturally think of anytime an algebraic object is said to be generated by a set of elements. However, Atiyah-Macdonald defines the $R$-algebra $A$ to be generated by a set $B$ if every element of $A$ can be expressed as a polynomial in the elements from $B$ and coefficients in $f(R)$ (if the definition not mentioning the homomorphism $f$ is used, define $f(r) = r\cdot 1$, then use $f(R)$ as stated). It seems to mean that, if you wanted a explicit operational description of "algebra generated by", it would be something like:
The $R$-algebra $A$ is generated by $\{x_0\}$ if for all $a \in A$, $$a = \sum_{i=0}^n r_i x_0^n$$ for some $n \in \mathbb{N}$ and $r_i \in f(R)$.
My question is why is the notion of 'generated' for algebras so much different than the notion of that algebra being generated as a module? For example, $k[x]$ requires infinitely many generators as a $k$-mod but requires only one as a $k$-algebra? I suspect that my lack of experience with algebras, and how they are used, is why it is not intuitive to me. The notion for algebras seems to be connected to integral dependence? 
 A: You're thinking about "generating" wrong; it doesn't have anything particularly to do with linear combinations.  A subset $S$ of an algebraic structure $A$ "generates" an element $a\in A$ if you can produce $a$ by starting with the elements of $S$ and repeatedly using the operations of $A$.
In the case that $A$ is an $R$-module, the operations you have are addition and scalar multiplication by any element of $R$.  So for instance, if $s_1,s_2,\dots$ are elements of $S$ and $r_1,r_2,\dots$ are elements of $R$, some elements you can generate from $S$ are: $$s_1+s_2$$
$$r_4(r_1r_2(s_1+r_3s_2)+s_3)$$
$$r_3(s_1+s_2+r_1s_3+r_2s_4)+r_4r_5s_5+s_1$$
At a first glance, these might look a lot more complicated than just linear combinations!  However, since scalar multiplication is associative and distributes over addition, you can always reduce any such combination to a linear combination.  For instance, the second element above is equal to the linear combination $$r_5s_1+r_6s_2+r_4s_3$$ where $r_5=r_4r_1r_2$ and $r_6=r_4r_1r_2r_3$.
In the case that $A$ is an $R$-algebra, you have one additional operation: besides addition and multiplication by elements of $R$, you can also multiply elements of $A$ together.  So some elements which you can generate from $S$ are: $$s_1s_2$$
$$r_1(s_1+s_2)(s_3+r_2s_4)+s_4^3$$
$$(r_1s_1+r_2s_2)^2s_3+s_1$$
This time we can't just reduce everything to linear combinations of the $s_i$, because we might be multiplying multiple $s_i$ together, as in $s_1s_2$.  However, we still can use the ring axioms to reduce everything down to a linear combination of products of the $s_i$.  For instance, the second element above is equal to $$r_1s_1s_3+r_3s_1s_4+r_1s_2s_3+r_3s_2s_4+s_4^3$$ where $r_3=r_1r_2$.  This is a linear combination of the products $s_1s_3, s_1s_4,s_2s_3,s_2s_4,$ and $s_4^3$.  Another name for "linear combination of products" is "polynomial".  Indeed, the expression above is just $f(s_1,s_2,s_3,s_4)$ where $f$ is $$f(x,y,z,w)=r_1xz+r_3xw+r_1yz+r_3yw+w^3,$$ a polynomial in four variables with coefficients in $R$.  So in general, the elements of the algebra generated by $S$ are all elements of $A$ which can be written as polynomials (in multiple variables) with coefficients in $R$ evaluated at elements of $S$.
A: I'll take a couple of examples that will make things clearer – I hpe.
Consider the fields $\mathbf Q$ and $\mathbf Q(i)\subset \mathbf C$. It is finitely generated $\mathbf Q$-algebra, as it is the same as $\mathbf Q[i]$, and we have a surjective $\mathbf Q$-algebras homorphism:
\begin{align}
\mathbf Q[X]&\longrightarrow \mathbf Q[i],\\
X&\longmapsto i.
\end{align}
Its kernel is the minimal polynomial of $i$ over $\mathbf Q$, so $\mathbf Q(i)=\mathbf Q[i]\simeq\mathbf Q[X]/(X^2+1)$. It is finitely generated as a $\mathbf Q$-vector space (of (dimension $2$) since, as you know,  all powers of $i$ are $1,i,-1$ or $-i$.
On the other hand, you may consider the $\mathbf Q$-algebra $\mathbf Q[\pi]$.  It is finitely generated and  you may define a similar surjective homomorphism:
\begin{align}
\mathbf Q[X]&\longrightarrow \mathbf Q[\pi],\\
X&\longmapsto \pi.
\end{align}
This one is  injective, since $\pi$ is not an algebraic number. As a consequence $\mathbf Q[\pi]$ is isomorphic to the polynomial ring $\mathbf Q[X]$, so that, as a $\mathbf Q$-vector space, it is infinite-dimensional.
