linear extension of algebras homomorphism I'm formalizing this useful algebraic method. In simple words: we have algebras $A,B$ (not necessarily commutative) over a field $F$. we define a function $\varphi:A \rightarrow B$ on a set of generators (of $A$ (as an $F$-module) $v_1,...,v_n$. we manually check that on these generators $\varphi$ obeys: $\varphi (a+b) = \varphi (a) + \varphi(b), \varphi (ab) = \varphi (a) \varphi (b)$ (if the generators are linearly independent, we don't have to check the addition condition). we extend it linearly by definition to an $F$-module homomorphism (this is well defined), and we amazingly also get an $F$-algebras homomorphism:
$\varphi ((\sum a_iv_i)(\sum b_jv_j)) = \varphi (\sum a_ib_jv_iv_j) = \sum \varphi(a_ib_jv_iv_j) = \sum a_ib_j \varphi (v_i) \varphi (v_j) = (\sum a_i \varphi (v_i))(\sum b_j \varphi (v_j))$
since for every $a \in F$ we get $\varphi (a) = a$. 
My questions are: is this really a an F-algebras homomorphism, and is this proof valid in general?  (since its my own formalization I'm not sure), and do you know any book which should contain such useful lemmas, or a graduate/bachelor's math course usually deals with such? haven't seen this on any of the textbooks I've used so far / courses I took.
Thanks,
G.
 A: Basically, what you write is true. However, there are two items that need consideration:
1) There is no guarantee that $\varphi$ is $F$-linear. So it's best to extend $\varphi$ $F$-linearly to $A$ per definition. 
2) If $A,B$ have an identity, one usually requires an algebra homomorphism to preserve the identity. But $F$-linearity and multiplicativity alone are not sufficient to fulfill this requirement. For, let $A=M_2(F), B=M_3(F)$ and $\varphi: A \to B,\; X \mapsto 
\begin{pmatrix}X & \\ & 0\end{pmatrix}$. This map is clearly $F$-linear and multiplicative, but $\varphi(1_A) \neq 1_B$. 
So, one would usually choose, say, $v_1=1_A$ and set $\varphi(1_A)=1_B$. Then, if $\varphi$ is multiplicative on the generators and extended $F$-linear to $A$, it's in fact an $F$-algebra homomorphism. 
Also note that if $\varphi$ is surjective, then $\varphi(1_A)=1_B$ always holds. For, let $\varphi(x_0)=1_B$. Then $$1_B = \varphi(x_0)=\varphi(x_0\cdot 1_A)=\varphi(x_0)\varphi(1_A)=1_B \cdot \varphi(1_A)=\varphi(1_A).$$ 
