Describing an open interval I centered at c, $I \subseteq (a, b)$ Entire question:
Let (a,b) be an open interval of Real numbers and let $c \in (a,b).$ Describe an open interval I centered at c such that $I \subseteq (a,b)$ 
I didn't quite get where I should've headed, so I thought myself pretty clever when I devised this:
Take a real number i, such that $a < i < b$ and a real number j, such that $a < i < j < b$. Let the real number c: $i < c < j$. 
Let I = (i, j). Now $I \subseteq (a,b)$
But the given solution was quite different: $ r = min(c - a, c - b)$ and $I = (c - r, c + r)$ now I is centered at c and $I \subseteq (a,b)$.
Now my question is, am I just dead-wrong here? What exactly is meant by centered? Exactly midway? I thought I sort of nailed it by defining some helper variables.
 A: As Asaf Karagila pointed out, $r=\min(c-a,b-c)$ would be correct. But I would advise to use
$$r = \min(|a-c|,|b-c|) \tag1$$
where (thanks to absolute values) we don't have to worry about the order of subtraction. The reason to prefer (1) is to prepare to divorce the idea of distance from arithmetics and order. The quantity $d(a,b)=|a-b|$ is all that we need to manipulate with, and its only relevant property is the triangle inequality. 
The meaning of (1) is that the "radius" (half-length) allowed for the inner interval is given by the distance from $c$ to the boundary of the interval: 
$$r = \min_{x\in \partial I} |x-c| \tag2$$
The proof that every point $y$ with $|y-c|<r$ belongs to the interval can use the triangle inequality: 
$$c-|y-c| \le y\le c+|y-c|$$
hence 
$$a \le y\le b$$

Formula (2) generalizes to arbitrary metric spaces, in which we no longer talk about arithmetical operators.  Namely,
$$r = \inf_{x\in \partial A} d(x,c)\tag3$$
gives the radius of an open ball centered at $c$ and contained in $A$ (and the largest such). Of course, in general we might have $r=0$, but if $A$ is open, then $r>0$ for every $x\in A.
