TITLE: Is there a continuous $f(x,y)$ which is not of the form $f(x,y) = g_1(x) h_1(y) + \dots + g_n(x) h_n(y)$
QUESTION [22 upvotes]: For a continuous function $f : [0,1]^2 \to \mathbb{R}$, let us say $f$ is a sum of products (SOP) if there exist an integer $n > 0$ and continuous functions $g_1, \dots, g_n, h_1, \dots, h_n : [0,1] \to \mathbb{R}$ such that $$f(x,y) = g_1(x) h_1(y) + \dots + g_n(x) h_n(y)$$
for all $x,y \in [0,1]$.
How can I show there exists a continuous $f$ which is not an SOP?
I think this should be easy, but for some reason I don't see how to proceed.  
Note that the Stone-Weierstrass theorem says that every continuous function on $[0,1]^2$ is a uniform limit of SOPs.  I want to see that you can't drop the limit.
Is the same true if we replace $[0,1]$ by an arbitrary infinite compact Hausdorff space?

REPLY [2 votes]: We have a writing $f(x,y) =\sum_{i=1}^n g_i(x) h_i(y)$, equivalently
$$f(\cdot, y) = \sum_{i=1}^n h_i(y) g_i(\cdot)$$
means that the system of function   $(f(\cdot, y))_y$ is  contained in the span of n functions $g_i(\cdot)$, $i=1, \ldots, n$, equivalently,
this system of functions $(f(\cdot, y))_y$ has rank at most $n$ ( remember: functions are "vectors" ).
But for a general function $f(x,y)$ ( analytic, not a polynomial) the system $(f(\cdot, y))_y$ is infinite dimensional ($e^{x y}$ (@Daniel Fischer: answer), $\frac{1}{x+y}$, $\sqrt{x+y}$, $\frac{1}{1-x y}$ $\&$ c.)
It's worth looking at $f(x,y)$ as an infinite matrix indexed by $x$, $y$. There exists such a writing if and only if the matrix has rank $\le n$, that is, if and only if every minor
$$\det (f(x_i, y_j))_{i,j=1, n+1}=0$$