This paper is concerned with algebraic relaxations, based on the concept of sum of squares decomposition, that give sufficient conditions for convexity of polynomials and can be checked efficiently with semidefinite programming. We propose three natural sum of squares relaxations for polynomial convexity based on respectively, the definition of convexity, the first order characterization of convexity, and the second order characterization of convexity. The main contribution of the paper is to show that all three formulations are equivalent; (though the condition based on the second order characterization leads to semidefinite programs that can be solved much more efficiently). This equivalence result serves as a direct algebraic analogue of a classical result in convex analysis. We also discuss recent related work in the control literature that introduces different sum of squares relaxations for polynomial convexity. We show that the relaxations proposed in our paper will always do at least as well the ones introduced in that work, with significantly less computational effort. Finally, we show that contrary to a claim made in the same related work, if an even degree polynomial is homogeneous, then it is quasiconvex if and only if it is convex. An example is given.