Why do we take the log in GP?

For a posynomial f with values

 f(x) = sum_{k=1}^K c_k x^{a_k},

where c >0, we have

 log f(x) = log left( sum_{k=1}^K e^{a_k^Ty + b_k} right) = mbox{rm lse}(Ay + b),

where b_k := log c_k, k=1,ldots,K, and A is the K times n matrix with rows a_1,ldots,a_K.

We may ask, why take the logarithm of f? The function with values

 g(y) = sum_{k=1}^K e^{a_k^Ty + b_k}

is convex already.

The answer is simply that the function g might take huge values, which might raise numerical problems. Taking its logarithm allows to recover smaller values.

Note that the logarithm is concave, while g is convex. A priori, log g is not convex. It turns out that ‘‘the exponential beats the logarithm’’, in the sense that the latter functions’ concavity is not enough to destroy the convexity of the exponential.