Alex Rivera | Logout

What is the difference between equality and equivalence?

Asked 2008-11-23T00:09:33.607
41

I've read a few instances in reading mathematics and computer science that use the equivalence symbol ≡, (basically an '=' with three lines) and it always makes sense to me to read this as if it were equality. What is the difference between these two concepts?

Edit
Report

2 Answers

19

I take your question to be about math notation rather than programming. The triple equal sign you refer to can be written ≡ in HTML or \equiv in LaTeX.

a ≡ b most commonly means "a is defined to be b" or "let a be equal to b".

So 2+2=4 but φ ≡ (1+sqrt(5))/2.

Here's a handy equivalence table:

Mathematicians      Computer scientists
--------------      -------------------
      =                      ==
      ≡                      =

(The other answers about equivalence relations are correct too but I don't think those are as common. There's also a ≡ b (mod m) which is pronounced "a is congruent to b, mod m" and in programmer parlance would be expressed as mod(a,m) == mod(b,m). In other words, a and b are equal after mod'ing by m.)

answered 2008-12-02T05:39:26.060
2

Equality really is a special kind of equivalence relation, in fact. Consider what it means to say:

0.9999999999999999... = 1

That suggests that equality is just an equivalence relation on "string numbers" (which are defined more formally as functions from Z -> {0,...,9}). And we can see from this case, the equivalence classes are not even singletons.

answered 2008-11-23T01:41:27.103

Your Answer