Tensor algebra of Dg-algebra Suppose that $k$ is commutative ring and $A=(A,d)$ is Dg-algebra over k. How can one define Dg-algebra structure on $T(A)$ where $T(-)$ is tensor algebra? Secondly how is defined tensor product in category of Dg-algebras?
 A: The differential $d$ of $T(A)$ is given by the Leibniz rule, which happens to coincide with how to define the differential for the tensor product of two chain complexes. Namely, we define
$$
d(a \otimes b)
=
da \otimes b
+
(-1)^{|a|}a \otimes db.
$$
If you want the tensor product to yield a dg-algebra structure, you'll then find that
$$
d(a_1 \otimes a_2 \otimes \ldots \otimes a_n)
=
\sum_{1 \leq i \leq n} (-1)^{|a_1| + \ldots |a_{i-1}|} a_1 \otimes \ldots a_{i-1} \otimes da_i \otimes a_{i+1}\otimes \ldots a_n.
$$
Likewise, the tensor product of dg-algebras $A \otimes B$ is given the differential above, with multiplication given by
$$
(a_1 \otimes b_1) \cdot (a_2 \otimes b_2)
:=
(-1)^{|b_1| |a_2|}a_1 a_2 \otimes b_1 b_2.
$$
The general rule is that each time you "move" two symbols past each other (such as $d$ and $a_1$, or $a_2$ and $b_1$), you multiply by the sign $(-1)$, raised to the power of the products of their degrees. ($d$ is a degree 1 operator.) This is called the Koszul sign rule.
