Show that polynomials $P(x,y)=p(x)q(y)$ are dense in $C([0,1]^2,\mathbb{R})$ (i.e. the set of continous functions in two variables).

My attempt:

Based on inspiration from Multivariate Weierstrass theorem?

$M=[0,1]\times[0,1]$, $A=\{p:[0,1]\times[0,1] \rightarrow \mathbb{R}, \text{p are polynomials}\}$

Since $M$ is a compact metric space and $A\subset C([0,1]^2,\mathbb{R})$ is a function algebra that separates points and that vanishes nowehere, then by Stone-Weirestrass, $A$ is dense in $C([0,1]^2,\mathbb{R})$.

That A is closed under addition, multiplication, and scalar multiplication is clear. To show that it separates points, take $(r_1,r_2),(s_1,s_2) \in M $ not equal. Then $P(x,y)=xy$ separates points. The $P(x,y)=1$ vanishes nowhere.

I think that this is a correct proof of the statement.

However, I also think that there is a way of using only the Weirestrass approximation theorem since the special structure of the polynomials are $P(x,y)=p(x)q(y)$. Following Rudin, how would you in that case choose the polynomials that in one variable looks like $Q_n(x)=c_n(1-x^2)^n$,?

  • $\begingroup$ Well, $xy$ may not separate some points i may pick... $\endgroup$
    – dan_fulea
    Aug 9, 2021 at 13:50
  • $\begingroup$ @dan_fulea I guess (1,2) and (2,1) would both give P(x,y)=2, right? $\endgroup$ Aug 9, 2021 at 13:52
  • 1
    $\begingroup$ Your $A$ is dense, by S-W, fine. But $A$ is not the same as the set of polynomials of the form $p(x)q(y)$! For example $x+y\ne p(x)q(y)$. And in fact the set of all polynomials of that form is not dense... $\endgroup$ Aug 9, 2021 at 13:53
  • $\begingroup$ There is not so simple to follow Rudin, since Rudin has written a lot... Which particular construction is meant? Please state a clear question with a clear setting, best without a long introduction, if this introduction has no meaning for the question.... How to choose $Q_n$ so that what happens... ?! $\endgroup$
    – dan_fulea
    Aug 9, 2021 at 13:53
  • $\begingroup$ @dan_fulea In Baby Rudin, when he proofs Stone-Weierstrass, he chooses polynomials $Q_n$ as above and then convolve them with the continous function f to find a polynomial $P_n(x)$ that is later shown to approximate the original function f $\endgroup$ Aug 9, 2021 at 13:58

1 Answer 1


For convenience let $\prod$ (for "product") denote the set of all polynomials of the form $p(x)q(y)$. In fact $\prod$ is not dense in $C([0,1]^2)$. Your algebra $A$ is dense, by the S-W theorem, but $\prod$ is a proper subset.

Details: First, note that if $P\in\prod$ then $$P(0,0)P(1,1)=P(0,1)P(1,0).$$So if $P_n\in\prod$ and $P_n\to f$ then $f(0,0)f(1,1)=f(0,1)f(1,0)$; hence $f(x,y)\ne x+y$.

  • $\begingroup$ Great. Then this is a proof that the professor must have missed a "not dense" the question. I have one (probably basic) question about this example. Where did $P(0,0)=0$ come from and doesn't that assume that at least one of $p(x)$ and $q(y)$ have no constant, right? So how does the final conclusion that it is not dense follow from this? My knowledge on this area is pretty shaky right now $\endgroup$ Aug 9, 2021 at 15:38
  • $\begingroup$ and the only way I have seen to show that something is not dense, is to show that an element (in this case a continous founction) is not a limit point of $P(x,y)$. As previous stated, one such example I guess would be $x+y$ which is not in $P(x,y)$ $\endgroup$ Aug 9, 2021 at 15:50
  • $\begingroup$ @user5744148 I came up with a perhaps simpler argument... $\endgroup$ Aug 9, 2021 at 15:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .