# Questions about continuous functions.

Recently when working with my thesis, I've got 2 questions.

1. Let $S_n$ be the set $\{x=(x_1,x_2,\cdots,x_n)\in\mathbb{R}^n\mid x_1+x_2+\cdots+x_n=1~\mbox{and}~0\leq x_i~\mbox{for}~ i=1,2,\cdots,n\}$. Is $S_n$ compact or convex, or closed? Or does it possess any topological property?

2. Let $s$ be a point of the product $S_{n_1}\times S_{n_2}\times\cdots S_{n_k}$, where $S_{n_i}$ is the subset of Euclidean space $\mathbb{R}^{n_i}$ satisfying the description above.

$~~~~~~~~$Let $f$ and $g$ be two continuous functions(linear) from $S_{n_1}\times S_{n_2}\times\cdots S_{n_k}$ to $\mathbb{R}$, and define $\phi:S_{n_1}\times S_{n_2}\times\cdots S_{n_k}\rightarrow\mathbb{R}$ by $\phi(s)=\max\{0,f(s)-g(s)\}$. Then is $\phi$ continuous? Why?

Can anyone help me with these questions?

(Sorry to bring these questions with long long descriptions. :'( )

Added: For the last part, I think my real question is why the function, max, is continuous. Any suggestion? And thanks for other answers and advices. :)

-
The objects $S_n$ are the standard n-Simplices. See en.wikipedia.org/wiki/Simplex#The_standard_simplex for example. The properties you mention can be proven elementary. –  canaaerus Feb 9 at 9:05

Yes, $S_n$ is compact, convex and closed : all three. Your map is continuous also, since $\sf max$ is continuous.

To see why $S_n$ is closed, write it as a finite intersection (in fact, $n+1$) of closed sets.

$S_n$ is compact because it is both closed and bounded.

$S_n$ is convex because it is defined by convex conditions.

-

Each of your $S_n$ sets is the intersection of the convex and closed positive orthant $\{x \geq 0 \}$ with a level set $\{f=1\}$ of the convex function $f(x) = |x_1+ \dots +x_n|$. Its convexity follows from an application of the triangle inequality: $$\left|\sum \lambda x_i + (1-\lambda)y_i\right| = \left|\lambda \sum x_i + (1-\lambda)\sum y_i\right|\leq \lambda \left|\sum x_i\right| + (1-\lambda) \left|\sum y_i\right|.$$ As level sets of convex functions are also convex and closed, $S_n$ is convex and closed.

They are also compact. To see it you only need to notice that the value of each coordinate of any point in $S_n$ is bounded below by $0$ and above by $1$. Since a closed and bounded set in $\mathbb R^n$ is compact, $S_n$ is compact.

Finally, considering that $f-g$ and $\max\{0,\cdot\}$ are continuous functions, the function $\phi$ defined in your question is a composition of continuous functions, and therefore continuous.

-