# Should real functions be described as $f: \mathbb{R} \rightarrow \mathbb{R}$ or $f: \mathbb{R} \rightarrow \mathbb{R}^2$?

I've been trying to teach myself topology, and I'm having a bit of trouble grasping the abstract concepts of the field. One question that's been poking at my understanding regarding topological mappings is as follows:

Take an arbitrary mapping $f$ (e.g. $f(x) = x^2$, the parabola in $\mathbb{R}^2$). Now, of course this mapping takes an argument from $\mathbb{R}$, and returns an output also in $\mathbb{R}$. We typically represent this by the ordered pair $(x,f(x))$. This ordered pair is an element of $\mathbb{R} \times \mathbb{R}$ or just $\mathbb{R}^2$. Now should $f$ be described as $$f: \mathbb{R} \rightarrow \mathbb{R} \quad \mbox{or} \quad f: \mathbb{R} \rightarrow \mathbb{R}^2 ~?$$ My hypothesis is that it depends on if we want to analyze just the output of $f$ or the ordered pair. I apologize in advanced for the trivial nature of the question.

In general, when we write $f: A \to B$, we mean $f \subseteq A \times B$, with the condition that if $(x,a), (x,b) \in f$, then $a = b$. Since the second entry in the ordered pair is uniquely determined by $x$, we call this element $f(x)$. This condition is just saying that $f$ is well-defined.
We often think of $f$ as some machine that takes an element from the domain, and spits something of the codomain. But, having the caracterization of $f$ I said above, $f$ would be the same thing as its graph: $$\mathrm{gr}(f) = \{(x, f(x)) \in A \times B \ : \ x \in A \}$$
For practical purposes, we think of these thing separately, so I would go with $f: \Bbb R \to \Bbb R$, and $\mathrm{gr}(f) \subset \Bbb R^2$.
I would say $f:\mathbb{R}\rightarrow \mathbb{R}$.
You could consider the related function $g:\mathbb{R}\rightarrow\mathbb{R}^2$ that is defined as $\{(x,(x,f(x))\mid x\in\mathbb{R}\}$
The ordered pair is not $f$ it is the graph of $f$. So $f: \mathbb{R} \to \mathbb{R}$ and $G: \mathbb{R} \to \mathbb{R}^2$ where $G$ is the graphing function.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9777776598930359, "perplexity": 70.69722480117612}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-35/segments/1566027316194.18/warc/CC-MAIN-20190821194752-20190821220752-00147.warc.gz"}