## Question regard checking convexity by “restriction to any line that intersects the function domain”

Hello all,

I have a question (probably stupid one) about the fact that " A function is convex if and only if it is convex when restricted to any line that intersects its domain".

In Stephen Boyd and Lieven Vandenberghe book ("Convex Optimization") they present the following example:

"For the function $f(X) = \log\text{det}f(X)$ we can verify concavity by considering an arbitrary line, given by $X = Z+tV$ where $Z,V$ are symmetric matrices. We define $g(t) = f(Z+tV)$ and restrict $g$ to the interval of values of $t$ for which $Z+tV\succ0$." Now, without loss of generality, they assume that $t=0$ is inside this interval, i.e. $Z\succ0$. Which is fine!

Using some algebraic manipulation, and the second order condition for concavity, they show that $g$ is concave.

My question : Is it true to assume without loss of generality that $V\succ0$ instead of $Z\succ0$ ? After all, if we do assume that, we allways can find matrices $V$ such that $Z+tV\succ0$. Also, why we can't assume that both $Z\succ0$ and $V\succ0$. Maybe I miss something regard the "restricted to any line that intersects its domain"..

Thank you!

-

Think of $V$ as a tangent vector at $Z.$ you can see that, since the set of psd matrices is an open subset of the set of all symmetric matrices, there is absolutely no restriction on $V.$ On the other hand, the result (concavity of log det ) only holds in the psd cone, so $Z$ better be an element of the cone.
 Hmm I think I understand what you saying.. The truth is that my original problem was to show that the product of two positive and convex functions (specific one) is also convex. It's known that the condition for this to happen is that both function must be nonincreasing or nondecreasing. This property is true for functions on $\mathbb{R}$. Instead of deriving a condition for function on $\mathbb{R}^n$, I took the restriction of them to some line. One of the functions is $f(X) = \exp(\text{trace}(AX))$ where A is symmetric and $X\succ 0$. So, we take $X = V+tZ$ and if I can assume that – Josh Sep 2 at 14:46 $Z≻0$ then f will be non-decreasing as function of t. Does it hurts the generality? – Josh Sep 3 at 10:44 I managed where is my mistake.. Thank you! – Josh Sep 3 at 10:46