My impression has been that $\mathbb{Z_n}$ is the set $\{0,1,…,n-1\}$ under binary operation addition modulo $n$. However I'm also coming across this notion that $\mathbb{Z_n}$ is actually a set of equivalence classes of equivalence relation $x\sim y \iff x \equiv y$ mod $n$ and the addition here is actually addition of equivalence classes rather than simply addition of integers modulo $n$. Is this correct? So would it be correct to say $\mathbb{Z_n} = \{n,n+1,…,2n-1\}$? if we are considering these elements as being equivalence classes?
What exactly is $\mathbb{Z_n}$
equivalence-relationsgroup-theorymodular arithmetic
Related Solutions
Well, both are correct. If $a,b$ are integers, the addition mod $n$ is defined as $$[a]+[b] = [a+b]$$ where $[a+b]$ is the congruence or residue class mod $n$. So if $a+b$ is not a remainder mod $n$, a number from $0$ to $n-1$, then divide $a+b$ by $n$ with remainder: $a+b =qn+r$, where $0\leq r<n$, and so $$[a+b]=[r].$$
There are two basic facts to use:
(1) Each integer $a$ lies in the same residue class as its remainder $r$ mod $n$, i.e., if $a=qn+r$ with $0\leq r<n$, then $[a]=[r]$.
(2) For distinct remainders $r,r'$ mod $n$, the residue classes are distinct, i.e., $[r]\ne[r']$.
The benefit of the equivalence class point of view is its vast generality and its abstract simplicity (one person's "this gets buried in other stuff" is another person's "abstract simplicity").
Since you have an abstract-algebra tag, perhaps you have learned some group theory, including normal subgroups and quotient groups.
In your post, think of $G=\mathbb Z$ as a group under the operation of addition and $n\mathbb Z = \{nk \mid k \in \mathbb Z\}$ as a normal subgroup. The "equivalence classes" are defined by the relation $a \sim b$ if and only if $b-a \in n\mathbb Z$.
This definition generalizes to any group and normal subgroup.
That is, let $G$ be a group, with group operation denoted $g \cdot h$ and inverse operation denoted $g^{-1}$ (notice, I have switched to multiplicative notation, but this is just a notational change). Let $N < G$ be a normal subgroup. We can define an equivalence relation: $g \sim h$ if and only if $g^{-1} h \in N$. Letting $[g]$ be the equivalence class of $g \in G$, we can then define a group operation $[g] \cdot [h] = [g \cdot h]$. There's plenty of details to check: that the relation $g \sim h$ does, indeed, satisfy the axioms of equivalence relations (true whether or not the subgroup $N$ is normal); next that the operation $[g] \cdot [h] = [g \cdot h]$ is well-defined (this is where normality of $N$ is needed); and then one must work to verify the group axioms for this new operation.
The resulting group is called the "quotient of $G$ modulo $N$" and is sometimes denoted $G/N$. So the example of a quotient in your post is often denoted more formally as $\mathbb Z / n \mathbb Z$.
The outcome is that one obtains a very general and spectacularly powerful tool in group theory.
Let me also comment on your question of whether it is important to distinguish between the two definitions.
I would say "not really".
Given any equivalence relation $\sim$ on any set $X$, one common operation is to "choose representatives", i.e. choose one element in each equivalence class. This gives a subset of $X$ that is in one-to-one correspondence with the set of equivalence classes. In the case of a group and a normal subgroup, once a set of representatives has been chosen, one can then use transport of structure to put a unique group operation on the chosen set of representatives that makes the one-to-one correspondence into a group isomorphism. That's exactly what's going on in your question.
Sometimes there seems to be an "obvious" or a "natural" choice of representatives, and for your example the subset $\{0,1,2,...,n-1\}$ seems like the most obvious choice, although you will see that sometimes people choose $\{1,2,...,n-1,n\}$. For $\mathbb Z_3$ I think that $\{-1,0,+1\}$ is also a nice choice.
Best Answer
To put it shortly: yes.
What isn't important is what $\mathbb{Z}_n$ "is" as a set. Rather, what's important is that all these different formulations of $\mathbb{Z}_n$ (equivalence classes of integers, select integers with a certain operation, a different set of integers with a certain operation) all give rise to an algebraic structure (groups, rings, fields, depending on what you're working with) which are all isomorphic.
Though, if you're saying that $\mathbb{Z}_n$ is equivalence classes, then the accepted notation would probably look more like $\mathbb{Z}_n = \{[n]_n, [n + 1]_n, \dots\}$, or perhaps even $\mathbb{Z}_n = \{n + n\mathbb{Z}, (n + 1) + n\mathbb{Z}, \dots\}$, depending on your background and your personal aesthetic concerns. $n$, after all, is an integer, not an equivalence class of integers.
As Qiaochu Yian says in his comment, the equivalence class definition is usually preferred, as this makes certain proofs much easier.