TITLE: Analogy between quotient groups and quotient topology
QUESTION [7 upvotes]: I am trying to see "analogy" between the two concepts in the title, although I am familiar with independent definitions of them. 
(1) Let $G$ be a group, $N$ a normal subgroup. Define an equivalence relation on $G$ by $g_1\sim g_2$ if $g_1g_2^{-1}\in N$. Let $[g_1]$ denote equivalence class of $g$, and $G/N$ the set of equivalence classes. Then we have a canonical map $\varphi\colon G\rightarrow G/N$, where domain is group, and codomain is "set" right now. 
Then the quotient structure on $G/N$ is a "group structure" such that the map $\varphi$ becomes a homomorphism. Such a structure is unique. We call $G/N$ quotient group. 
(2) Let $X$ be a topological space, $\sim$ an equivalence relation on $X$, and $[x]$ denote equivalence class. Let $X/{\sim}$ denote the set of equivalence classes. Then there is canonical map $\varphi\colon X\rightarrow X/{\sim}$, where domain is topological space and codomain is just set right now. 
The quotient topology on $X/{\sim}$ is a topology such that the map $\varphi$ is continuous. 
But, I was feeling that there could be more than one topological structures on $X/\sim$ which make the canonical map continuous. For example, take nice example of quotient topology on one hand, and structure of indiscrete topology on $X/{\sim}$ on the other hand.   
Question: What is exact definition of quotient topology which makes it unique in some sense? (compare with quotient structure in (1))

REPLY [6 votes]: Both these quotients have the following universal property:
Let $X$ be a group (topological space). In the case of groups, you can associate a equivalence relation to every normal subgroup, which is $x\sim y $ if they belong to the same coset. Then $G/N$ is just $G/\sim $ as a set.
So now we just view the common problem of going mod an equivalence relation. The quotient structure on $X/\sim $ is one that makes the quotient map $p: X\to X/\sim $ have the universal property that given a map (continous or group homomorphism respectively) $g:X\to Y$  with $f(x)=f(y)$ for all $x\sim y$ then there exists a unique $\bar{g}:X/\sim \to Y$ such that $g=p\circ\bar{g}$.
You can try and workout that in the case of groups, this universal property makes sure that the quotient group structure on $G/N$ is the only one where $G\to G/\sim$ is a group homomorphism. But for groups we can't go mod arbitrary equivalence relations only those arising from normal subgroups.
On the other hand for topological spaces, there can be other topological space structures on $X/\sim $ which make $X\to X/\sim$ continuous, but only the quotient map has the universal property.