http://www.seattlecentral.edu/qelp/sets/022/022.html

data={{0.73,45.3},{1.14,50.8},{0.60,40.2},{1.59,64.0},{4.34,150.0},{1.98,106.0},{3.12,90.8},{1.80,58.8},{0.65,35.4},{0.56,28.4}}
dataN=Length[data]

y[x_]:=m*x+b
f[m_,b_]:=Sum[(m*data[[i]][[1]]+b-data[[i]][[2]])^2,{i,dataN}]
xp=30
yp=20
xmin=xp-10
xmax=xp+10
ymin=yp-20
ymax=yp+20
Plot3D[f[m,b],{m,xmin,xmax},{b,ymin,ymax}]
ContourPlot[f[m,b],{m,xmin,xmax},{b,ymin,ymax}]