what is the definition of $=$? what is the definition of $=$?

Above is the question that I would like to be answered, below are some of my thoughts.



I've been thinking about what it means to say 

$A = B$

I came to this from thinking about why it makes no sense to say something like

$5 = \begin{pmatrix}1, 2, 3\end{pmatrix}$ 

My answer to myself was that $=$ is context dependent, it is a relation on a certain set and so only makes sense when the elements on either side of the $=$ are in the said set.

Now, say we are in $\mathbb{N}$, then how do we define $=$? 
My initial thought was to say that $A = B$  if, given any proposition regarding A, $P(A)$, with truth value $\alpha$, the truth value for $P(B)$ will always be $\alpha$. 

However, what happens now if we take $P(\star) $ as $ \star = B$? Do we then need a definition for $=$ in order for $P(\star)$ to make sense? Is this an issue?
In logic, equality is not something we define, it's a primitive notion.  If $A=B$ then $A$ has property $P$ if and only if $B$ has property $P$&mdash;this is probably the most important thing to know about equality and although it doesn't define equality, it is assumptions like this that shape our understanding of what equality "is", just like the axioms of set theory shape our understanding of what it means to say $A \in B$ even though membership is a primitive notion that is not defined in terms of other things.

The converse statement "if for every property $P$, $A$ has property $P$ if and only if $B$ has property $P$, then $A=B$" is not true in general. (Unless you allow the property $P$ to have a parameter&mdash;then as you point out it's trivially true because $P(x)$ can say $x =B$.)  It's true in structures like the natural numbers, where every object is definable, but other structures may have indiscernible elements that cannot be distinguished by any logical property.
Just in terms of math I would say the equality sign of A=B means that A and B have the same displacement from a fixed point of reference (and of course displacement here is a vector quantity).