Formally, if one expands <math>(x-r_1) (x-r_2) \cdots (x-r_n),</math> the terms are precisely <math>(-1)^{n-k}r_1^{b_1}\cdots r_n^{b_n} x^k,</math> where <math>b_i</math> is either 0 or 1, accordingly as whether <math>r_i</math> is included in the product or not, and ''k'' is the number of <math>r_i</math> that are excluded, so the total number of factors in the product is ''n'' (counting <math>x^k</math> with multiplicity ''k'') – as there are ''n'' binary choices (include <math>r_i</math> or ''x''), there are <math>2^n</math> terms – geometrically, these can be understood as the vertices of a hypercube. Grouping these terms by degree yields the elementary symmetric polynomials in <math>r_i</math> – for ''x<sup>k</sup>,'' all distinct ''k''-fold products of <math>r_i.</math>