Dimension of C(X,R) Let X be an infinite metric space. 
Can we say that the dimension of C(X,R) the space of continuous real valued functions on X is infinite?
For spaces like Z,N it's true. But I can't even visualize the space for let's say something like Q.
 A: Yes. 
Let $X$ be a metric space and fix, for every $n\in \Bbb N$, subspaces $X_n$ of $X$ containing $n$ distinct points. Since $X_n$ is discrete we have that any function $X_n\to\Bbb R$ is continuous, and it's not hard to see that a basis of $C(X_n,\Bbb R)$ is given by the delta functions $\delta\colon X_n\to\Bbb R$ defined by $$\delta_i(y)=\begin{cases}1 & y=x_i\\
0&\text{otherwise}\end{cases},$$ so in particular $\dim C(X_n,\Bbb R)=n$.
Note that $X_n$ is also closed, being a finite union of closed singletons, so by Tietze's extension theorem every function in $C(X_n,\Bbb R)$ can be extended to a function in $C(X,\Bbb R)$, in other words the restriction map $C(X,\Bbb R)\to C(X_n,\Bbb R)$ is surjective, but it is also linear, so $\dim C(X,\Bbb R)\geq \dim C(X_n,\Bbb R)=n$ and since $n$ was arbitrary we conclude that the dimension of $C(X,\Bbb R)$ must be infinite.
A: Fix $n$. We will show that for every $n$, there are  $n$ linearly independent functions in $C(X,\mathbb R)$. Indeed, fix $n\ge 2$ and let $y_1,\dots,y_n$ be distinct in $X$. Set 
$$f_j(x) =\prod_{i\ne j} d(x,y_i)$$. 
Then $f_j(y_i)=0$ for $i\ne j$ and $f_j(y_j)>0$. 
Suppose the linear combination $\sum_{j=1}^n c_j f_j \equiv 0.$ For any $j_0\in \{1,\dots,n\},$
$$0= c_{j_0}\underset{>0}{f_j(y_{j_0})} + \sum_{j\ne j_0}  c_j \underset{=0}{f_j(y_{j_0})} .$$
Therefore  $c_{j_0}=0$. Since $j_0$ is arbitrary, $c_{j}=0$ for all $j$, showing that  $f_1,\dots,f_n$ are linearly independent.
