$$E(m, b) = \sum{y_i^2} + \sum{m^2x_i^2} +
\sum{b^2} - \sum{2mx_iy_i} - \sum{2by_i} + \sum{2bmx_i}$$