Geometric mean

Given a nonnegative $LaTeX: x \in \mathbb{R}^n$ and a weight vector, $LaTeX: a$ in the simplex, $LaTeX: S_n$, the geometric mean is the value:
$LaTeX: x(1)^a(1) * x(2)^a(2) * ... * x(n)^a(n).$
For example, for $LaTeX: a=(1/2, 1/2)$, the geometric mean of $LaTeX: x = (1, 9)$ is $LaTeX: 1*3=3$. A fundamental inequality that provides a foundation for geometric programming is that the geometric mean is never greater than the arithmetic mean:
$LaTeX: \Pi_j x(j)^a(j) \le \textstyle\sum_j a(j)x(j).$
for all nonnegative $LaTeX: x \in \mathbb{R}^n$ and $LaTeX: a \in S_n$. Further, equality holds only if $LaTeX: x(j)$ is constant for all $LaTeX: j$.