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?