convex set, convex function

I have the following constraints:

$$\sum_{1\leq i,j\leq n,\ i\neq j} x_ix_j\geq 0.25$$

$0\leq x_i \leq 1$ for $i=1, \ldots, n$

Is this set convex?

I think so, but $0.25-\sum_{1\leq i,j\leq n} x_ix_j$ is a convex function? or not? Note that I have $x_i$ are all nonnegative.

Can someone give me a reference on these questions. Standard textbook often talks about a function $R^n \rightarrow R$.

Many thanks.

Updated: following some feedbacks after the first post, I realized that I forgot to put $i\neq j$. I meant constraints like $xy\geq 0.2$ and $0\leq x \leq 1$ and $0\leq y\leq 1$.

-
Isn't your constraint equal to $\big(\sum_{1\le i\le n} x_i\big)^2 \ge 0.25$? – Rahul Apr 16 '12 at 22:10
Following @RahulNarain's comment, in the context of the other constraints on $x_i$, the first constraint is equivalent to $(x_1+...+x_n) \geq 0.5$, so yes the set is convex. – copper.hat Apr 16 '12 at 23:40

Consider the set $\mathcal{A} = \{\mathbf{x}:0.25 -\mathbf{x}^T \mathbf{Q} \mathbf{x} \leq 0; \mathbf{x} \in \mathbb{R}^n\}$, where $\mathbf{Q}$ is a matrix with $0$s on the diagonal and $1$s everywhere else. $-\mathbf{Q}$ has $n-1$ eigenvalues equal to $1$ and one eigenvalue equal to $-(n-1)$. Hence, it is not non-negative definite, making $\mathcal{A}$ non-convex. A simple diagram in $\mathbb{R}^2$ illustrates this. $\mathcal{A}$ would consist of the region bounded by the rectangular hyperbola $x_1x_2 = 0.25$ excluding the origin. This set is clearly non-convex due to the presence of two disconnected lobes.
However, I think that its intersection with the set $\mathcal{B} = \{\mathbf{x}:x_i \in [0,1] \forall i\}$ is convex. I would summon the picture in $\mathbb{R}^2$ to help my case. Intersection of $\mathcal{A}$ with $\mathcal{B}$ restricts the set to a subset of only one shaded lobe of $\mathcal{A}$, which is a convex set. Hence, we have the intersection of two convex sets, and end up with a convex set.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9783753156661987, "perplexity": 187.5039832194164}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-26/segments/1466783399106.96/warc/CC-MAIN-20160624154959-00113-ip-10-164-35-72.ec2.internal.warc.gz"}