How to define all the points inside of some polygon as the domain of the function? Let's say that we have some polygon defined by the following vertices:
$$
A(1, 1) \\
B(2, 1) \\
C(5, 3) \\
D(2, 2) \\
E(3, 1) \\
$$
This polygon contains an infinite number of points denoted by their coordinates $p_x$ and $p_y$.
Let's say that I want to have some simple function, such as the one that would sum the coordinates for every point:
$$
f(p_x, p_y) = p_x + p_y
$$
I don't understand how can I denote the domain of this function, since I want it to only take as input the values of $p_x$ and $p_y$ which are located within the polygon described above.
$$
p_x, p_y \in ?
$$
 A: In order to explicitly find the domain, you can find the equation for each line of the polygon, for example for line $ABE$:
$$y=1$$
For line $AD$:
$$\text{Slope}=\frac{2-1}{2-1}=1 \implies y-1=1(x-1) \implies y=x$$
Finding the rest of the equations would give the domain:
$$D=\{(x, y)\in\mathbb{R^2} | y>1,\space y<x \dots \}$$
I recommend plotting the polygon for a better understanding of the inequalities.
A: (Building upon @HappyDay answer)
You asked for a way to denote the interior of a convex polygon, including the polygon itself. (You did not mention convexity in your question, but this was probably implicit).
This is the typical setting of linear optimization, e.g. linear programming on Wikipedia: as the constraints are all linear inequations, the resulting domain is the intersection of half spaces, which makes a convex polytope (generalization of a polygon to $n$ dimensions).
Then there is a typical notation which is used everywhere in linear optimization:
$A x \le b$
where $x$ is a point (or vector, if you prefer) in $\mathbb{R}^n$, $b$ is a $p$-dimensional vector, and $A$ is a matrix with $p$ rows and $n$ columns, to express $p$ linear inequations.
The $\le$ operator on vectors is defined coordinate-wise, i.e. $x \le y$ means $\forall i \in \{1,\dots,p\}, x_i \le y_i$.
If no inequation is a consequence of the other ones, this defines a polytope with $p$ facets; otherwise the polytope has less facets.
We all like simple notations for what we use everyday, so this notation was devised by operational research people and obviously it would be impossible to simplify it any further :-).
In your case, i.e. in the plane $\mathbb{R}^2$, this would be expressed as
$A x \le b$
with $x$ being a point in the plane, $b$ a $p$ dimensional vector, and $A$ a matrix with $p$ rows $\times 2$ columns, to represent a $p$ edges polygon.
The resulting $p$ equations for the polygon's $p$ edges are:
$a_{i,1} x_1 + a_{i,2} x_2 = b_i$, for $i \in \{1,\dots,p\}$.
A: Sometimes you don't need to express everything in formulas: you can simply write "$f: S \to \mathbb{R}$, where $S$ is the pentagon $ABCDE$ (including its interior)." This is perfectly clear for your readers, possibly more than a hard-to-parse alternative.
