## If a quadratic form is positive definite on a convex set, is it convex on that set?

### Remember to vote up questions/answers you find interesting or helpful (requires 15 reputation points)

Consider a real symmetric matrix $A\in\mathbb{R}^{n \times n}$. The associated quadratic form $x^T A x$ is a convex function on all of $\mathbb{R}^n$ iff $A$ is positive semidefinite, i.e., if $x^T A x \geq 0$ for all $x \in \mathbb{R}^n$.

Now suppose we have a convex subset $\Phi$ of $\mathbb{R}^n$ such that $x \in \Phi$ implies $x^T A x \geq 0$. Is $x^T A x$ a convex function on $\Phi$ (even if $A$ is not positive definite)? Of course, the answer in general is "no," but we can still ask about the most inclusive conditions under which convexity holds for a given $A$ and $\Phi$. In particular I'm interested in the question:

Suppose we have a quadratic form $Q:\mathbb{R}^{n \times n} \rightarrow \mathbb{R}$. What is the weakest condition on $Q$ that guarantees it will be convex when restricted to the set of positive semidefinite matrices?

-

$Q$ must be positive semidefinite on the set of all symmetric matrices. By the way, if you really need help with a mathematical question going beyond routine homeworks and think that it is too "specific" or "trivial" for MO, try College Playground on AoPS. We welcome there almost everything with mathematical content (no pure philosophy, please!) Just use your common sense when choosing the subforum and stick to some other easy to guess rules. You may not get as qualified answer there as on MO but you won't be told that your question is of no interest either. – fedja Dec 31 2009 at 5:06
Ok, thanks for the help! :) – fuzzytron Dec 31 2009 at 16:19

## 2 Answers

$x^2-y^2$ is positive on $[2,3]\times [-1,1]$ but not convex there. This creates problems for any convex sets not containing the origin. You are, probably, after something else not so obviously false. Why don't you just tell us what it is?

Edit: Even then it is false: just take $B_{11}B_{22}$. By the way, for a pure quadratic form, convexity on an open set and convexity on the entire space are the same thing.

-
Thanks -- I've added some details. – fuzzytron Dec 31 2009 at 3:04
And so did I :) – fedja Dec 31 2009 at 3:24
>>By the way, for a pure quadratic form, convexity on an open set and convexity on the entire space are the same thing. Thanks for pointing that out. Unfortunately, the cone of positive semidefinite matrices is not an open subset, so that doesn't give us an easy answer. – fuzzytron Dec 31 2009 at 4:50
This answer also covers Edit 2 of the question, since the set of positive definite matrices is open. – Harald Hanche-Olsen Dec 31 2009 at 5:07

1
Just an elaboration on fedja's answer. Let $\Phi\subset{\mathbb R}^n$ be any convex (nonempty) set. Then there is unique subspace $V\subset{\mathbb R}^n$ such that $\Phi$ contains an open subset of the coset $V+x$ for some $x\in{\mathbb R}^n$ ($V$ is spanned by the set $\Phi-x$ for any fixed vector $x$). In your example, $\Phi$ consists of positive semi-definite matrices, and $V$ consists of all symmetric matrices. Now if $Q$ is any quadratic form, it is convex on $\Phi$ if and only if it is convex (positive semi-definite) on $V$. This gives an explicit criterion. – t3suji Dec 31 2009 at 5:14
show 1 more comment

### You can accept an answer to one of your own questions by clicking the check mark next to it. This awards 15 reputation points to the person who answered and 2 reputation points to you.

The answer to the edited question is no. Let $Q\colon\Phi\to\mathbb{R}$ be the quadratic form $Q(B)=B_{11}B_{22}$. Clearly $Q\gt0$ on the set $\Phi$ of positive definite matrices. Equally clearly, this function is concave on the subset `$\{B\in\Phi\colon B_{11}+B_{22}=1\}$`.

-

Oops, only on coming back here did I realize that I had duplicated the result of the second paragraph of fedja's answer. Sorry about that. (Or did fedja's edit happen while I was typing in my answer?) – Harald Hanche-Olsen Dec 31 2009 at 5:10
{"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": 38, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "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": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9327435493469238, "perplexity_flag": "head"}