TITLE: Difference between $\mathbb{Q}[X]/(X-1) \otimes_\mathbb{Q} \mathbb{Q}[X]/(X+1)$ and $\mathbb{Q}[X]/(X-1)\otimes_{\mathbb{Q}[X]}\mathbb{Q}[X]/(X+1)$?
QUESTION [6 upvotes]: The original problem actually wants me to find which one is a zero module. But first, what is the difference between $\mathbb{Q}[X]/(X-1) \otimes_\mathbb{Q} \mathbb{Q}[X]/(X+1)$ and $\mathbb{Q}[X]/(X-1)\otimes_{\mathbb{Q}[X]}\mathbb{Q}[X]/(X+1)$? I am new to the concept of "tensor product" and I am having trouble understanding this. 
According to the definition, we regard $\mathbb{Q}[X]/(X-1)$ as a module over $\mathbb{Q}$ in the first one, and regard it as a module over $\mathbb{Q}[X]$ in the second one. But how does that make a difference?
More specifically, since $\gcd(X-1,X+1)=1$ in $\mathbb{Q}[X]$, so $\mathbb{Q}[X]/(X-1)\otimes_{\mathbb{Q}[X]}\mathbb{Q}[X]/(X+1)$ is a zero module, because there exist $f,g\in\mathbb{Q}[X]$ such that $(X-1)f + (X+1)g = 1$. As a result, for any $r\otimes s=1\cdot (r\otimes s)=\left((X-1)f + (X+1)g\right)\cdot(r\otimes s)=(X-1)(fr\otimes s)+(X+1)(gr\otimes s) = 0$
But I don't know how to deal with the other one.

REPLY [10 votes]: What you're missing is that the ring you're tensoring over affects the scalars you can slide from left to right in the tensor product.
$\def\Q{\mathbb{Q}}$
In fact, the first of your tensor products is $\mathbb{Q}$ and the second is zero. We'll show the second one first (your proof also works and is the better proof because it generalizes, but I want to give a different proof that emphasizes the "sliding"). Let $f$ be arbitrary in $\mathbb{Q}[x]/(x-1)$. Then $xf = f$. For $g$ arbitrary in $\mathbb{Q}[x]/(x+1)$, one has $xg = -g$.
So given $f \otimes g \in \Q[x]/(x-1) \otimes_{\Q[x]} \Q[x]/(x+1)$, we have $f \otimes g = (xf) \otimes g = f \otimes (xg) = -(f\otimes g)$ so $f \otimes g = 0$; since every element of the tensor product is a sum of "simple tensors" (those of the form $f \otimes g$), the tensor product is zero.
For the other example, there is a $\Q$-module isomorphism $\mathbb{Q}[x]/(x+1) = \mathbb{Q}$ given by evaluating a polynomial at $-1$, and similarly for the other module, so the tensor product is $\Q \otimes_\Q \Q$ which is naturally isomorphic to $\mathbb{Q}$.
Soapbox: you'll get lots of lectures about how the best way to think about a tensor product is in terms of its universal property, which is true, but the practical way of thinking about it as "sums of symbols $a \otimes b$ where you can slide an r from the left to the right" is also very important and is easier to learn at first. Note that a lot of beginners forget the "sums" there, which is important.