For a proper cone $\K\subset\mathbb{R}^n$ and its dual cone $\K^*$ the complementary slackness condition $\vx^T\vs=0$ defines an $n$-dimensional manifold $C(\K)$ in the space $\left\{(\vx,\vs)|\vx\in\K,\vs\in\K^*\right\}$. When $\K$ is a symmetric cone, this fact translates to a set of $n$ linearly independent bilinear identities (optimality conditions) satisfied by every $(\vx,\vs) \in C(\K)$. This proves to be very useful when optimizing over such cones, therefore it is natural to look for similar optimality conditions for non-symmetric cones. In this paper we define the \emph{bilinearity rank} of a cone, which is the number of linearly independent bilinear identities valid for the cone, and describe a linear algebraic technique to bound this quantity. We examine several well-known cones, in particular the cone of positive polynomials $\Po_{2n+1}$ and its dual, the closure of the moment cone $\M_{2n+1}$, and compute their bilinearity ranks. We show that there are exactly four linearly independent bilinear identities which hold for all $(\vx,\vs)\in C(\Po_{2n+1})$, regardless of the dimension of the cones. For nonnegative polynomials over an interval or half-line there are only two linearly independent bilinear identities. These results are extended to trigonometric and exponential polynomials.