How two elements relate in this poset? I have encountered a relation that I couldn't really get my head around it and understand what it does.
The relation is on the set of partial functions from a set S to a set T:
$f \le g \Leftrightarrow \operatorname{dom}(f) \subseteq \operatorname{dom}(g)$, and $s \in \operatorname{dom}(f)$ implies that $fs=gs$
I'm not sure but I think this relates the same partial function 
and what are the maximal and minimal elements of this poset? Is it the same function?
Thank you 
 A: Recall that a partial function $f: S\nrightarrow T$ is a function such that $\operatorname{dom}(f)\subseteq S$, whereas typical functions take $S$ to be domain. Onto your poset:
Let $A$ be your set of partial functions of the above form, and define a partial ordering on $A$ in the following way. 

For any two partial functions $f,g\in A$ such that 
  
  
*
  
*$\operatorname{dom}(f) \subseteq \operatorname{dom}(g)$, and
  
*For all $s\in\operatorname{dom}(f)$, $f(s) = g(s)$
  
  
  we say that $f\le g$. 

You can think of functions related in this way as subfunctions, where if $f\le g$, then $f$ is the same function as $g$, but you're just mapping fewer elements from $S$ over to $T$. Therefore, a minimal element of $A$ would be a function that maps the fewest elements -- namely, the function that maps nothing! Note that this is also the least element in your poset.
The maximal elements are similar, but not exactly analagous. Note that a partial function may not be a function if its domain were extend to all of $S$ (e.g. the function $f:\mathbb{R}\to\mathbb{R}$ defined by $x\mapsto\frac{1}{x}$). Therefore, the maximal elements are partial functions $f:\operatorname{dom}(f)\to T$ such that for any $s\in S$, $f:(\operatorname{dom}(f)\cup\{s\})\to T$ fails to be a function. 
Edit: As @CiaPan's excellent answer points out, there are no largest elements in the case when $S$ and $T$ have more than a single element.
A: I would say $f\le g$ if $g$ is an extension of $f$ (the domain of $g$ contains the whole domain of $f$ and they are equal on that common part of domains). Then a maximal element is each function which has no extensions and a minimal function is each function which is not an extension of another one.
So  each function defined on the whole $S$ is maximal, and each function defined on a single point of $S$ is minimal.
Edit
I'm not quite sure if the empty function $\{\}\to\{\}$ should be considered as a partial function from arbitrary $S$ to any $T$. If so (as @JazzyMatrix assumes in the answer), then of course that will be the least, and obviously the only minimal, element of the poset.
The special cases are:


*

*$S$ is empty – depending on the decision on including the empty function, there is either none or there is exactly one function to any $T$, namely the empty function, which is therefore the least and the greatest element in the poset.

*$S$ is non-empty and $T$ is a singleton (has one element) – each function represents exactly one subset of $S$ (namely its own domain), hence the poset reflects the partial ordering of $P(S)$ by set inclusion. The least element is the empty function (representing the empty subset of $S$), if we include the empty function, or else each function on a single-point domain is a minimal element of the poset. The maximal element is the function $S\to T$.


*

*$S$ and $T$ are singletons – there is only one non-empty function and (possibly) the empty function, so we have either a single-item poset or two-items well-ordered set.


*$S$ is non-empty and $T$ has more than one element – the general case which I described before, but it should be modified now by adding (or not) the empty function, being the least element of the poset.

