Hello Madis,
you can achieve this in the following way:
Define the function:
In[1]:= f[x_, y_] := 2 x + y
Define the domain:
In[2]:= cond1 = y >= 0 && x - y >= -1 && x + y <= 1;
Using reduce, you can simplify the domain condition:
In[3]:= cond2 = Reduce[cond1, {x, y}]
(* Out[3]= (x == -1 && y == 0) || (-1 < x <= 0 &&
0 <= y <= 1 + x) || (0 < x < 1 && 0 <= y <= 1 - x) || (x == 1 &&
y == 0) *)
The domain condition can be turned into a region using ImplicitRegion:
In[4]:= reg1 =
ImplicitRegion[
cond2, {{x, -\[Infinity], \[Infinity]}, {y, -\[Infinity], \
\[Infinity]}}];
The region looks like this:
In[6]:= RegionPlot[reg1]
Next you plot the function over this region using Plot3D:
In[7]:= Plot3D[f[x, y], {x, y} \[Element] reg1,
AxesLabel -> {"x", "y", "f[x,y]"}]