Naive set theory question on "=" So I picked up a couple of good undergraduate-level books over the weekend and have been working through them...
In Algebra: Chapter 0, the author of the text writes:

The prototype of the well-behaved relation is '=', which corresponds to 'the diagonal'
  $$\{ (a, b) \in S \times S \, | \, a = b \} = \{(a, a) \, | \, a \in S \} \subseteq S \times S $$

The problem I'm having is that the way I'm interpreting this expression makes it seem uninteresting, almost tautological, which I'm thinking can't be correct.  What I think this expression is saying is this:  Suppose I give you elements $a$ and $b$ in the set $S$ to compare for equality.  To do that, write $a = b$ as the ordered pair $(a,b)$, which is the same element as $(a, a)$, which by a previous definition we are told is true iff $\{b\} = \{a\}$. 
But when I try to bring this to a concrete level, by letting $S$ be the set of all polynomials with integer coefficients, say, I become confused.  Since $(0, 6x + (-6)x)$ is not the same ordered pair as $(0, 0)$, aren't we left to conclude that $(6x + (-6)x) \neq 0$?  That doesn't seem right. The only thing I can see this definition being useful for is writing tautologies like $A = A$. 
And then I wondered: What does it mean to write an expression like $x^2 = 2x$?  Am I correct in saying that the "$=$" there is not the same "$=$" as in the definition given above?  How would one write the definition of this new "$=$" in set-theoretic terms, with universal quantifiers?
 A: Consider $S=\{1,2,3\}$. The diagonal is $\{ (1,1), (2,2), (3,3) \}$. There is nothing trivial or tautological about it.
BTW, $(0, 6x + (-6)x)$ is the same ordered pair as $(0, 0)$ because $6x + (-6)x=0$ as polynomials. You need to recall the definition of equality of polynomials.
A: Writing a term, like $(-6)+6$, usually means that the term should be evaluated. $(-6)+6=0$ makes sense because of evaluating $(-6)+6$. If we compare written terms as strings, then terms on the left and right sides of equality will be always identical, which is uninteresting, as you pointed out.
As for polynomials, a term describing a polynomial is evaluated (simplified) to the canonical form. There are several, e.g. a partial function $f$ from natural numbers to $R$ (the set of coefficients in polynomials) which is everywhere $\neq 0$. $f(n)$ is a coefficient at n-th degree of the variable of the polynomial.
If we do not have an evaluation function but have an equivalence relation, we can construct an evaluation function as a quotient map.
A: The difference between the two is that on the left you start with a more general set(the set of all ordered pairs) and then reduce it to the one you want with an equivalence relation; while on the right you directly construct the set you want. 
Your polynomial example isn't a counterexample because you're confusing set equality with polynomial equality. If the object $(0,6x + (-6)x)$ is considered different than $(0,0)$, then, yes, $(6x + (-6)x)$ is considered a different object than $0$.
To give another example, if you look at the integers modulo $7$, the number $0$ is equivalent to the number $7$ but as objects in the base system they are not equal.
A: First of all the way you approach the definition is wrong and obfuscating which leads to your second question. Also, your confusion regarding the polynomials stems from a common problem a lot of people have when they start dealing with (a bit more) abstract mathematics: They mix up the object with the representation of the object.
What your definition says is this: Imagine I give you two objects $a,b\in S$ to compare for equality. These two objects are equal if and only if they are one and the same. Typically, the set theoretic approach to a binary relation on a set $S$, is an $R\subset S\times S$. This means that the equality relation is $E=\{(a,a)\in S\times S : a\in S\}$, which means that $a=b$ if and only if $(a,b)\in E$ which is true exactly when $a$ and $b$ are one and the same (or more concisely -which I purposely avoided- exactly when $a=b$). This may sound pointless and uninteresting and tautological. Actually Wittgenstein in "Tractatus Logico-philosophicus" points out this apparent pointlessness of "$=$". But such a concept is fruitful mathematically because the mathematical interest in the elements of $S$ lies in their properties: We want to know about the form, the structure of a mathematical universe and our only means of describing it is through a mathematical language. Saying $3=3$ is uninteresting but saying that for every $x,y$ we have $(x+y)^2=x^2+y^2+2xy$ tells you something and the fact that given any number $n\geq 3$ you can never find positive natural numbers $a,b,c$ such that $a^n+b^n=c^n$ is not trivial at all.
Now regarding your confusion, as others have pointed out you are mixing the expressions of polynomials with polynomials. $6x-6x$ is a description of a polynomial and so is $0$. But these two descriptions talk about the same polynomial. This is essentially the information conveyed by writing $0=6x-6x$ (see the usefulness of the equality relation here). Using objects that are -in some sense- different to indicate the same thing is something we do all the time, even outside of mathematics. Without this we wouldn't be able to communicate, since words as physical objects are different from one another, even though they may spell the same thing. Every time you see letters on a paper, you ignore their physical nature (their consisting of atoms that you have most probably never encountered before, and definitely not in that form) and only care about what they symbolise.
Finally, regarding you second question: Formally, no, it is the same definition. In a formal environment the standard definition of the meaning of the symbol "$=$" is always the diagonal. An expression such as $x^2=2x$ doesn't have any meaning whatsoever because $x$ is a free variable. We assign a truth value (true or false) in sentences which are defined as formulas that contain no free variable. Intuitively, ask yourself the following: First of all what is this $x$? Secondly, a relation is defined as a subset of the Cartesian product of a set. What is this set? For "$=$" to be a relation in the formula $x^2=2x$ would mean that $x^2$ and $2x$ are elements of a set. So your question isn't well defined. What we mean when we say that some $a\in\mathbb{R}$ (for example) satisfy $x^2=2x$ is that $a^2=2a$, or that the $a^2$ is the same number with $2a$, which is exactly the definition of the equality I (and the book you are studying) presented. 
Edit: When you write a mathematical sentence like "$2+3=5$" or "$(\forall x)((2x)^2=4x^2)$" you have to keep in mind that these are strings of symbols. As Calvin points out these strings don't have a specific meaning. Meaning is something we equip on a language. Tarski's definition of truth intuitively is pretty much what we do when we teach very young children the meaning of words. We show them the objects and say "This is a CAR". Through repetition, children learn to equip the concept of an automobile to the sound "car". 
Tarski said roughly the same: Assume that we have a set $S$, a function $f:S\times S\to S$, a relation $E\subset S\times S$ and some elements $a,b,c\in S$. Now I come up with a language that has symbols "$+$", "$=$" and "$0$", "$1$", "$2$". Then we can assign to each symbol  an actual objects, for example we will say that "$+$" will represent $f$, "$=$" will represent $E$ and each of "$0$", "$1$", "$2$" will represent $a,b,c$ respectively. Now we can say that the sentence "$2+1=3$" is true in the world $(S,f,E,a,b,c)$ exactly when $(f(b,a),c)\in E$. In practice we try to use the same symbols for similar functions and relations and this is why we reserve the symbol "$=$" for the diagonal relation.
A: I'd think about the answer to your question "What does it mean to write an expression like $x^2 = 2x$?" in terms of formal systems:
http://en.wikipedia.org/wiki/Formal_system
If you're given the additional "axiom" $x^2 = 2x$, you can then reason about this expression using the other axioms and rules of inference in the system.
When asked to "find $x$", you're being asked to derive a theorem stating that $x$ is equal to some other quantity.
If you're interested in reading more about formal languages; I'd recommend Kleene's "Introduction to Metamathematics", which is a classic.
A: The only point he is making is that "=" is the most fundamental of equivalence relations. In this case "=" means "is exactly the same as". In the most technical sense, "=" is useless. Two different segments of length 2 are not equal since I just said that they were different. The fractions $\frac{2}{4}$ and $\frac{1}{2}$ are not equal since they are obviously not the same thing. We could get around this by saying $\overline{AB} \equiv \overline{CD}$ and $\frac{2}{4} \equiv \frac{1}{2}$ Where equivalence is properly defined.
Similary, $6x + (-6x) = 0$ is incorrect and $6x + (-6x) \equiv 0$ is correct when defined properly. Because paying attention to details like this could quickly overwhelm mathematicians in a sea of frivolous notation, they are ignored. 
We get away with this until we encounter $x^2 = 2x$ where the equal sign means something entirely different. They use the equal sign in both cases not because they mean the same thing but because you should be able to figure out their meaning from their context. It would be madness to have a separate notation for every single mathematical concept.
