What are some examples of discontinuous functions from $\mathbb{R}^2$ to $\mathbb{R}^2$ If I have a function $f: \mathbb{R}^2 \rightarrow \mathbb{R}^2$, where $\mathbb{R}^2$ is equipped with the euclidean topology, in both cases, what are some examples of discontinuous functions?
 A: If $F : \mathbb{R}^2 \to \mathbb{R}^2$ is continuous, then each of its component functions $F_1, F_2 : \mathbb{R}^2 \to \mathbb{R}$ are continuous as well. So for any discontinuous function $f : \mathbb{R}^2 \to \mathbb{R}$, you can construct a discontinuous function $F : \mathbb{R}^2 \to \mathbb{R}^2$ by setting $F_1$ or $F_2$ to be $f$ and choosing the other to be whatever you like.
An interesting example of a function $f: \mathbb{R}^2 \to \mathbb{R}$ which is discontinuous is 
$$f(x, y) = \begin{cases}
y\left(\frac{1}{x}-1\right) &\ \text{if}\ 0 \leq y < x \leq 1\\
x\left(\frac{1}{y}-1\right) &\ \text{if}\ 0 \leq x < y \leq 1\\
1-x &\ \text{if}\ 0 < x = y\\
0 &\ \text{otherwise.}
\end{cases}$$
This function has the property that it is continuous in both variables (i.e. if you fix $x$ or $y$, the resulting function $\mathbb{R} \to \mathbb{R}$ is continuous), but it is not continuous as a map $f : \mathbb{R}^2 \to \mathbb{R}$.
A: There are a number of nice topological theorems that can help with this. Simple examples:


*

*The continuous image of any compact set is compact. Thus any function that takes a closed disk (including its boundary) to an open disk (not including its boundary) is discontinuous.

*The continuous image of a connected set is connected. Thus any function that takes one disk to two disks that don't touch is discontinuous.
There are other sorts of things that are very nicely discontinuous. Say, for example:
$$f(x,y)=\begin{cases}
(x,y)&\text{if $x-y$ is rational}\\
(y,x)&\text{if $x-y$ is irrational}
\end{cases}$$
