Notes:
The final line follows because we take the derivative of C(M) and set it to zero.