Square law of CMOS: current is a square function of the input voltage
I = K (Vgs - Vth)² <- Here is the square ;-)
Where K is a constant.
If input voltage increases linearly, the current increases by square. For simplicity, we can ignore the threshold voltage and rewrite the equation as:
I = K (Vgs)²
If the input signal Vgs is composed by the sum of two signals, the CMOS performs mixing due to the quadratic law:
Vgs = A + B
I = K (A + B)² <=> I = k (A² + 2•A•B + B²)
Pay attention to the term 2•A•B, this is what "mixes" the input signals. The terms A² and B² are basically trash.
Mixing occurs whenever the equation is non-linear. For CMOS transistors the equation is a square function. For a diode is an exponential. Nevertheless, both are non-linear and both perform mixing. The equation for every non-linear device is given by:
out = K1(A+B)+K2(A+B)²+K3(A+B)³ + ...
As you can see every non-linear equation includes a square law term, including the diode.