| # Standard Forms of GP GP > Posynomials | Standard Forms | Applications Geometric Programs Convex Form CVX Syntax ## Standard Form A geometric program (GP for short) is a problem with generalized posynomial objective and inequality constraints, and (possibly) monomial equality constraints. In standard form, a GP can be written as where are generalized posynomials and are monomials. Assuming for simplicity that the generalized posynomials involved are ordinary posynomials, we can express a GP explicitly, in the so-called standard form: where and are vectors in , and , , are vectors with positive components. In the above, we follow the power law notation. Converting the problem into the standard form when the original formulation involves generalized posynomials entails adding new variables and constraints (see here). Example: Optimization of a water tank. ## Convex Form GPs in standard form are not convex, but a simple transformation allows to put them into an equivalent, convex form. The idea, already seen in the context of posynomial functions, is to take logarithms of the original variables. Again we assume that the posynomials involved are not generalized posynomials, but ordinary ones. Consider a posynomial constraint of the form where the vector has positive components: . We can express this constraints in terms of the new variable , defined as , : where , , is the matrix with rows , and is the log-sum-exp function. Note that if the posynomial was actually a monomial, there would be only one term in the function, and the constraint would reduce to an ordinary affine inequality. Since the log-sum-exp function is convex, the above constraint is actually convex in the new variable . By this argument, the GP can be expressed as a convex problem for appropriate matrices and vectors . Precisely, we set , and to be the matrices with rows , , ; the matrix contains the vectors as rows, . Example: Convex form of the water tank optimization problem. ## CVX Syntax With the above convex representation of a GP, We can directly invoke CVX with the `logsumexp_sdp` function. CVX knows it is convex. The extension ‘‘sdp’’ at the end of the function refers to the fact that the function is actually approximated via a technique based on semidefinite programming (SDP). In CVX there is actually no need to transform the problem into the standard convex format. All you need to do is let CVX know that the problem is a GP. This is done by replacing the command `cvx_begin` with `cvx_begin gp`. This is illustrated here.