(Equality Relation) There is one familiar relation between a set and itself that we consider every set $S$ mentioned in this text to possess: namely, the equality relation $=$ defined on a set $S$ by
$=$ is the subset $\{(x, x) \mid x \in S\}$ of $S \times S$.
Thus for any $x\in S$, we have $x = x$, but if $x$ and $y$ are different elements of $S$, then $(x,y) \not \in =$ and we write $x \ne y$.
The paragraph above is from the book of algebra by Fraleigh.
I'm really confused here. If you look at the phrase "but if $x$ and $y$ are different elements of $S$," it seems that there is already a equality relationship in the set $S$.
By the way, can we define $=$ again?
Is $=$ the symbol that I used to use here?
You could think of "$x,y$ different elements" as meaning $(x,y) \not \in =$.
We define the relation $=$ on $S$, and this gives two further (implicit) definitions:
from which we get the answer to your question.
As far as "can I define $=$ again", sure, but you want it to be defined in such a way that encapsulates the given definition. There can be multiple distinct but equivalent definitions of an entity in math.
And yes, $=$ is the desired symbol -- this is how we formally codify what it means for two things to be equal.