How can lists/vectors in $\mathbb{R}^2$ be thought of as functions?

It's written in my linear algebra textbook that $$\mathbb{R}^S$$ is the set of all possible functions $$f: S \to \mathbb{R}$$, I fail to see how this applies when $$S=2=\lbrace {0,1} \rbrace$$ as it's not clear to me how a vector like $$(72,15)$$ is a function

• I think $2=\{0,1\}$, and then $(72,15)$ represents the function where $f(0)=72$ and $f(1)=15$. – Cheerful Parsnip Jan 31 at 18:31
• My comment should answer your question. Is there anything unclear about it? – Cheerful Parsnip Jan 31 at 18:39
• @CheerfulParsnip If your comment answers the question, you should make it an answer! I’d gladly +1 – Santana Afton Jan 31 at 22:50

You can think of $$\mathbb R^n$$ as lists of numbers but you can also think of it as functions $$f\colon \{1,\ldots,n\}\to \mathbb R$$ where the $$j$$th coordinate can be regarded as $$f(j)$$. Then, if $$|S|=s$$ we have that $$\mathbb R^S\cong \mathbb R^s$$.
• Small edit - changed $\mathbb{R}^2$ to $\mathbb{R}^n$ since you used $n$ afterwards. – Sambo Jan 31 at 23:10