Suppose $x \in \mathbb{R}$, and $y \in [a, b]$, where $a, b \in \mathbb{R}$. I want to minimize the difference between $x$ and $y$ but am not sure how to write it in mathematical notation.
For example, if $x = 10$, and $y \in [11, 35]$, then the minimum difference between $x$ and $y$ is 1.
The way that I came up with is: $min\{|x - y|\}$. Is this correct?
Add a specification to your set to identify the possible values of $y$:
$$ \min\{ |x - y|\ |\ y \in [a, b]\}. $$
But as in Kevin's comment above, you may want to replace the minimum by the infimum. In the case you are describing, they are equivalent, but if you want to find the distance from a point to an open interval, say, the minimum distance may be undefined. For example, $\min\{ |10 - y|\ |\ y \in (11, 35)\}$ is undefined, while $\inf\{ |10 - y|\ |\ y \in (11, 35)\} = 1$.