vert={p[1],p[2],p[3]}={{0,0},{2,0},{0,4}};

a=Show[RegionPlot[y≤4-2x,{x,-0.15,2},{y,0,4}],AspectRatio->Automatic];

Show[a,Graphics[{PointSize[Large],Thick,Blue,Point[vert],Text[Style["y = 4 - 2 x",Large],{1.2,1.5}]}]]

f[x_,y_]=x y-x-y+3;

D[f[x,y],x]

D[f[x,y],y]

gradf[x_,y_]=Grad[f[x,y],{x,y}]

Solve[Evaluate[Grad[f[x,y],{x,y}]=={0,0},{x,y}]]

p[4]={1,1}

Simplify[{f[t,0],f[0,t],f[t,4-2t]}]

{Plot[f[t,0],{t,0,2}],Plot[f[0,t],{t,0,4}],Plot[f[t,4-2t],{t,0,2}]}

D[Evaluate[f[t,4-2t]],t]

p[5]={5/4,4-2(5/4)};

f[5/4,3/2]

Transpose[Table[{p[j],f[p[j][[1]],p[j][[2]]],N[f[p[j][[1]],p[j][[2]]]]},{j,1,5}]]//MatrixForm

b=Show[ContourPlot[f[x,y],{x,0,2},{y,0,4},ContourShading->False,Contours->Table[-2+k 0.2,{k,0,25}],ContourLabels->True],Graphics[{PointSize[Large],Blue,Thick,Point[Table[p[j],{j,1,5}]]}]];

Show[a,b]

{1,1}+RotationMatrix[π/4].{u,v};

Simplify[f[%[[1]],%[[2]]]]

{u[x_,y_],v[x_,y_]}=RotationMatrix[-π/4].{x-1,y-1}

eixos=ContourPlot[{u[x,y]==0,v[x,y]==0},{x,0,2.5},{y,0,4.5},ContourStyle->{{Thick,Red,Dashed},{Thick,Red,Dashed}}];

Show[a,b,eixos]

newb=Show[ContourPlot[-2+f[x,y],{x,0,2},{y,0,4},ContourShading->False,Contours->Table[-4+k 0.2,{k,0,25}],ContourLabels->True],Graphics[{PointSize[Large],Blue,Thick,Point[Table[p[j],{j,1,5}]]}]];

Show[a,newb,eixos]

c=ContourPlot[f[x,y],{x,1,1.5},{y,1.2,1.8},ContourShading->False,Contours->Table[2.2-0.03 k,{k,1,4}],ContourLabels->True];

d=ContourPlot[f[x,y]==17/8,{x,1,1.5},{y,1.2,1.8},ContourStyle->{Blue,Thick}];

Show[a,b,c,d,Graphics[{PointSize[Large],Blue,Thick,Point[Table[p[j],{j,1,4}]]}]]

Show[StreamPlot[gradf[x,y],{x,0,2},{y,0,4}],Graphics[{Blue,Thick,Arrow[{{5/4,3/2},{5/4,3/2}+(1/2)gradf[5/4,3/2]}]}]];

Show[%%,%]

graf1=Plot3D[{-1,0,f[x,y]},{x,0,2},{y,0,4},Mesh->False,PlotStyle->{{LightGreen,Opacity[0.2]},{LightGreen,Opacity[0.2]},{LightGreen,Opacity[0.2]}},BoxRatios->Automatic]

graf2=Plot3D[{0,f[x,y]},{x,0,2},{y,0,4},PlotStyle->{{Blue,Opacity[0.4]},{Blue,Opacity[0.4]}},Mesh->False,RegionFunction->Function[{x,y,z},y≤4-2x],BoundaryStyle->{Blue,Thick},BoxRatios->Automatic];

q[j_]:=Join[p[j],{0}];

r[j_]:=Join[p[j],{f[p[j][[1]],p[j][[2]]]}];

Show[graf1,graf2,Graphics3D[{PointSize[Large],Thick,Black,Dashed,Arrow[Table[{q[j],r[j]},{j,1,5}]],Point[Table[q[j],{j,1,5}]],Point[Table[r[j],{j,1,5}]]}]]