# Why functions can be thought as tuples?

I found these two posts but they don’t explain in detail why functions can be thought as tuples. The autor wants to show that $$\mathbb R^n$$ and $$\mathbb R^{\{1,2,...,n\} }$$ are actually the same thing.

Note: if $$S$$ is a set then $$\mathbb R^S$$ is the set of all functions from $$S$$ to $$\mathbb R$$.

Intrepreting tuples as functions

help understanding a paragraph from Linear Algebra Done Right

• Often the term "$n$-tuple of real numbers" is left undefined, because its meaning seems to be intuitively clear. But if you insist on giving a precise definition to this term, it is hard to think of a simpler definition than "a function from $\{1,2, \ldots, n \}$ to $\mathbb R$." Commented Nov 2, 2020 at 22:45
• Hi @littleO it’s seems that the whole idea it’s not precisely clear to me. I don’t understand why a n-tuple of real numbers is a function from positive integers to R. I’ve read set theory’s books about this and define a general Cartesian product this way too but didn’t help at all. So.... I don’t know what I’m missing here. Commented Nov 3, 2020 at 3:20
• Suppose that $x$ is an ordered $n$-tuple of real numbers. We typically write the $i$th component of $x$ as $x_i$. But there's an alternate notation which is to write the $i$th component of $x$ as $x(i)$. With that notation maybe it seems more natural to define an ordered $n$-tuple of real numbers to be a function $x: \{1,\ldots, n\} \to \mathbb R$. Commented Nov 3, 2020 at 3:54

The spaces $$\Bbb R^{\{1,\dots,n\}}$$ and $$\Bbb R^n$$ are isomorphic as vector spaces. In particular, the map $$\Phi:\Bbb R^{\{1,\dots,n\}} \to \Bbb R^n$$ defined by $$\Phi(f) = (f(1),f(2),\dots,f(n))$$ is an isomorphism.
Imagine a function $$f$$ from the set $$\{1,2,..,n\}$$ to the real numbers. To define such a function we must specify one value for each of the inputs $$1,2,..,n$$. Therefore, we get $$f(1), f(2), .., f(n)$$ which we can put in a tuple as $$(f(1), f(2),..,f(n))$$. Therefore, we can map any function to a tuple in $$\mathbb R^n$$.
Given any tuple $$(x_1,.x_n)\in\mathbb R^n$$, we can define the function $$f$$ by $$f(i)=x_i$$
Therefore, we can view any tuple as a function from $$\{1,2,..,n\}$$ to $$\mathbb R$$.
• You cannot convert any function to a tuple. We are specifically talking about functions from the domain set $\{1..n\}$. For example, the point in $\mathbb R^3$ defined by $(2,1,0)$ can be thought of as a function from the set $\{1,2,3\}$ where $f(1)=2$, $f(2)=1$ and $f(3)=0$. Commented Nov 2, 2020 at 20:29