pseudaInv[A_]:=Inverse[Transpose[A].A].Transpose[A];

(A1 = {{2,-1},{-5,-2},{3,3}})//MatrixForm

pseudaInv[A1]//MatrixForm

Pts = {{-1,5},{2,6},{7,7},{-3,9},{4,-1},{8,8},{0,-3},{3,4},{2,-3},{π,E}};

PlotPts = ListPlot[Pts,PlotMarkers->{"+",Medium},Axes->True,AxesOrigin->{0,0}, PlotRange->{{-10,10},{-10,10}}]

BMat = Drop[Pts,{},{1}]

XVals = Drop[Pts,{},{2}]

XVals^2

(Temp1 = Join[XVals^2,XVals,2])//MatrixForm

(AMat = Table[{Temp1[[i,1]],Temp1[[i,2]],1},{i,1,Length[XVals]}])//MatrixForm

(Soln = N[pseudaInv[AMat]].BMat)//MatrixForm

ParabolaPlot = Plot[0.24630135968409703`*x^2-1.1564104840435963`*x+2.2938374064372127`,{x,-5,10}, PlotStyle->{Gray,Thick}]

Show[ParabolaPlot,PlotPts,PlotRange->{{-10,10},{-10,10}}]

XVals

YVals = Drop[Pts,{},{1}]

BMat2 = XVals

(AMat2 = Table[{YVals[[i,1]]^2,YVals[[i,1]],1},{i,1,Length[YVals]}])//MatrixForm

(Soln2 = N[pseudaInv[AMat2].BMat2])//MatrixForm

LopsidedParabolaPlot = ContourPlot[-0.04438722149839091`*y^2+0.3232048166340985`*y+2.712075064563237` == x,{x,-10,10},{y,-10,10}, ContourStyle->{Directive[Green,Medium]}]

Show[{ParabolaPlot,PlotPts,LopsidedParabolaPlot},PlotRange->{{-10,10},{-10,10}}]

Norm[AMat.Soln-BMat]

Norm[AMat2.Soln2-BMat2]

(AMat3 = Table[{XVals[[i,1]]^4,XVals[[i,1]]^3,XVals[[i,1]]^2,XVals[[i,1]],1},{i,1,Length[YVals]}])//MatrixForm

(Soln3 = N[pseudaInv[AMat3].BMat])//MatrixForm

QuarticPlot = Plot[0.004073732811398983`*x^4-0.06428961044781381`*x^3 + 0.4562465339536012`*x^2-0.7039344711816418`*x+1.0077646885073146`,{x,-5,10}, PlotStyle->{Purple,Thick}]

Show[{QuarticPlot,ParabolaPlot,PlotPts,LopsidedParabolaPlot},PlotRange->{{-10,10},{-10,10}}]

Norm[AMat3.Soln3-BMat]