points =Table[{x+(Random[]-.5),x^2/3-x/2-1+12(Random[]-.5)(Random[]-.5)},{x,-3.5,3.5,.05}];

Manipulate[Show[Graphics[{If[distances,Gray,White],Line[{#,{#[[1]],a#[[1]]^2+b#[[1]]+c}}]&/@points,Red,Thick,Line[Table[{x,a x^2+b x+c},{x,-5,5,.1}]],Blue,PointSize[.015],Point/@points}],Axes->True,PlotRange->{{-5,5},{-4,6}}],{a,-3,3},{b,-3,3},{c,-3,3},{distances,{False,True}}]

LeastSquareGraphics[points_,distances_,ip_] := Module[ {x,y,A,a,b,c,inter},
{x,y}=Transpose[points];
A=Apply[Plus,{{x^4,x^3,x^2},{x^3,x^2,x},{x^2,x,0x+1}},{2}];
{a,b,c}=LinearSolve[A,{y.(x^2),y.x,Plus@@y}];
Clear[A,x,y];
inter=InterpolatingPolynomial[points,x];
Graphics[{If[distances,Black,White],Line[{#,{#[[1]],a#[[1]]^2+b#[[1]]+c}}]&/@points,Thick,
Red,Line[Table[{x,a x^2+b x+c},{x,-5,5,.1}]],
Blue,If[ip,Line[Table[{x,inter},{x,-5,5,.1}]],{}]},Axes->True,PlotRange->{{-5,5},{-4,6}}]
];

Manipulate[LeastSquareGraphics[points,distances,interpolation],{{points,Table[{x,3(Random[]-.5)},{x,-4,4,.75}]},Locator},{distances,{False,True}},{interpolation,{False,True}}]