Question: I have the following definition: 

Let ($X$,$\mathcal{T}$) and ($X'$, $\mathcal{T'}$) be topological spaces. A surjection $q: X \longrightarrow X'$ is a quotient mapping if $$U'\in \mathcal{T'} \Longleftrightarrow q^{-1}\left( U'\right) \in \mathcal{T} \quad \text{i.e. if } \mathcal{T'}=\{ U' \subset X' : q^{-1}\left( U' \right) \in \mathcal{T} \}$$

and the properties:

1. $q$ is a bijective quotient mapping $\Leftrightarrow$ $q$ is a homeomorphism
2. In general, $q$ quotient $\not \Rightarrow q$ open. 
If $U \in \mathcal{T}, q(U)\subset X'$ is open if $q^{-1}\left( q\left( U \right) \right) \in \mathcal{T}$ but not in general.

I could not find an example of quotient mapping for which $q^{-1}\left( q\left( U \right) \right)$ is not open. I would understand the idea better if you could show me one.

Answer: 
Let $X$ be a Hausdorff space, and let $a,b$ be a pair of distinct points. Stipulate that $\{b\}$ is not open. Define $f:X\to X\setminus\{b\}$ by $f(z)=z$ if $z\ne b$ and $f(b)=a$. There is a unique topology we may assign the codomain such that $f$ is a quotient map, let's endow that topology on $X\setminus\{b\}$. 

Then, pick disjoint neighborhoods $U\ni a,V\ni b$, and note that $f^{-1}(f(U))=U\cup\{b\}$. This set is not open; for, if it were open, then there would be a neighborhood of $b$--call it $W$--contained in $U\cup\{b\}$. So, $\{b\}=(W\cap V)\cap(U\cup\{b\})$ is open, a contradiction.
Consider a space with three points $a,b,c$ and open sets
$\varnothing, \{a\},\{a,b\},\{a,b,c\}$. The projection that identifies $a$ and $c$ is not open (or closed, for that matter.)