When should I use $=$ and $\equiv$?

In what context should I use $=$ and $\equiv$?

What is the precise difference?

Thanks!

(I wasn't sure what to tag this with, any suggestions?)


The $\equiv$ symbol originally meant "is identically equal to", and as that name implies it is used with identities. It is actually stating that the equality holds for all instantiations of the free variables. For example $\sin\left(\theta+\frac{\pi}{2}\right)=\cos{\theta}$ is true for any value of $\theta$, therefore $\sin\left(\theta+\frac{\pi}{2}\right)\equiv\cos{\theta}$.

People often got that confused with "equal by definition" or "defined to be". There are separate symbols for those meanings, including $\triangleq$ and ≝ (Unicode 0x225d). The $\equiv$ symbol has been used for this purpose so often that this is now sometimes considered a correct usage.

The $\equiv$ symbol was also repurposed to mean a congruence relationship like several of the other answers have discussed.


Use $=$ when you precisely mean that the two expressions refer to the same thing. For example, $2=1+1$ is the definition of 2, so the two sides really are the same thing. However, in advanced mathematics, people sometimes blur the use of $=$ to include isomorphic objects, e.g. $\mathbb{Z}$ and $\pi_1(\mathbb{S}^1)$, which in my opinion is terrible.

There are a few situations in which people use $\equiv$. Generally, $\equiv$ is one common notation for an equivalence relation, most often when the equivalence relation is on a ring $R$, and $a\equiv b$ when $a-b\in I$ for some ideal $I$. We then say "$a\equiv b\bmod I$". The other scenario I can think of is when we want to say that a function takes a certain value everywhere in a set, e.g. if the function $f(x)$ equals 1 for every $x\in [0,1]$, but might do something else for other inputs, I can write "$f\equiv 1$ on $[0,1]$".


It seems that $a \equiv b$ means that $a$ is equivalent to $b$ with respect to some equivalence relation $R$.


Sometimes $\equiv$ is used to mean "defined to be" although I think := is more common for that.


Consider Fermat's little theorem: $\rm\ a^p\ \equiv\ a\ \ (mod\ p)\ $ for all $\rm\ a,\ p\in \mathbb Z\:,\:\ p\:$ prime. This congruence can also be written as an equality in the ring $\rm\:\mathbb Z/p\:,\: $ e.g. $\:$ as $\rm\ \bar a^{\:p}\ =\ \bar a\ $ in $\rm\:\mathbb Z/p\:,\:$ where $\rm\:\bar a\:$ denotes the equivalence class $\rm\ a + p\ \mathbb Z\ $ of all integers congruent to $\rm\:a\:$ modulo $\rm\:p\:.\:$ Further, abusing notation, one often drops the overbar from the notation. This has the important consequence that equations in congruence rings look precisely the same as equations for integers, so that we can reuse our well-practiced intuition manipulating integer equations (valid since congruences are equivalence relations enjoying the same properties as integers equations - they can be added, multiplied, etc).

Thus, while technically, there is an important distinction between a congruence and an equality - one which is important to keep in mind when first learning about congruences - in practice this distinction is often profitably blurred so that the analogy between equalities and congruences can be exploited to the hilt. For some examples see some of my prior posts where I explicitly emphasize such points.