I have to do this exercise:
Let X and Y be topological spaces and equip $X \times Y$ with the product topology. Define $\pi_X: X \times Y \to X$ by $\pi_X((x,y))=x$, and $\pi_Y:X \times Y\to Y$ by $\pi_Y((x,y))=y$
I have shown that doe every open set $U\subseteq X \times Y$ $\pi_X(U)$ is open in X, and $\pi_Y(U)$ is open in Y, but now I have to show that the opposite does not hold with a counterexample. i.e I have to show that for a subset $Z\subseteq X \times Y$ it will hold that $\pi_X(Z)$ is open in X, and $\pi_Y(Z)$ is open in Y, but Z will not be open in $X \times Y$ with respect to the product topology.
I have found an example for this, where I let $X =\mathbb{R}$, and $Y=\mathbb{R}$, and I let $Z=\{(x,y)|\frac{1}{2}\leq \|(x,y)\|<1\}$. Intuitively I can see that $\pi_X(Z)=(-1,1)$, and $\pi_Y(Z)=(-1,1)$, but I have to show it, because then I will have that $\pi_X(Z)$ and $\pi_Y(Z)$ is open, and I am a little confused on how to do that, and furthermore I can intuitively see that Z is not open in $X\times Y$ wrt. the product topology, but I am a little confused about how to do that.
Notation. To avoid confusion, $(b,c)$ will denote an open real interval and $<b,c>$ will denote an ordered pair.
The "canonical" base (basis) for the product topology on $\Bbb R^2$ is $$B=\{I\times J: I,J\in T_{\Bbb R}\}$$ where $T_{\Bbb R}$ is the topology on $\Bbb R.$
Consider any $<x,y>\in V$ where $V$ is open in $\Bbb R^2$. We have $<x,y>\in I\times J\subset V$ for some $I\times J\in B.$ Now since the set of bounded open real intervals is a base for $T_{\Bbb R},$ there exist positive $r,r'$ with $(x-r, x+r)\subset I$ and $(y-r',y+r')\subset J.$ So $$<x,y>\in (x-r,x+r)\times (y-r',y+r')\subset I\times J\subset V.$$
In your example, $<1/2,0>\in Z.$ Consider any open $V$ such that $<1/2,0>\in V$. We have $(1/2-r,1/2+r)\times (-r',r')\subset V$ for some positive $r,r'.$ But now if $s=\min (1/4, r/2,r'/2)$ then $<1/2-s,0>\in V$ but $\|<1/2-s,0>\|=1/2-s<1/2.$ So $<1/2-s,0>$ is in $V,$ but not in $Z,$ so $\neg (V\subset Z).$ Therefore $Z$ is not open.
Remark. We can also do the above paragraph by contradiction: Suppose $Z$ is open. Then in the above paragraph, put $V=Z.$ We get $<1/2-s,0>\in V\setminus Z=Z\setminus Z,$ which is absurd.
Note. In general if $T_x,T_Y$ are topologies on $X,Y$ respectively, and if $B_X, B_Y$ are bases for $T_x,T_Y$ respectively, then $\{b\times b': b\in B_X\land b'\in B_Y\}$ is a base for $X\times Y.$ In particular, if $C$ is the set of bounded open real intervals then $\{b\times b':b,b'\in C\}$ is a base for $\Bbb R^2$.... It is often convenient to work with bases rather than with the entire topologies.