Can someone check my understanding of open and closed sets. I am trying to check my understanding of open and closed sets. My professor gavels the following idea about open sets. I will have an example afterwards to check my understanding fully as an FYI.
Open ball, open sets: continuity

*

*The open ball (a basic open set) with a center x and radius $r>0$ is given by $B(x,r)=\{y\in\mathbb{R}^{n}|d(x,y)<r\}$
$s\subset \mathbb{R}^{n}$ open if $\forall x\in s$, $\exists r> 0$ such that $B(x,r)\subseteq s$


*(ex) $s=(0,1)\subseteq \mathbb{R}^1$
$r=\min \{x, 1-x\}, B(x,r)$$=(x-r,x+r)\subset s$ $\therefore$ $S=(0,1)$ is open.
Question(s):

*

*looking at the formula for the open ball, is the $d(x,y)$ referring to Euclidean distance?


*is it correct to say that as long as distance between x and y is smaller than the radius that I have an open set?


*related to the example given by my professor in class, what exactly is the $r=\min\{x,1-x\}$? How did they choose that to prove the openness of the set?


*finally, why is the function for $B(x,r)$ set as $(x-r, x+r)$? I am assuming it has something to do with $r=min\{x,1-x\}$ but I am not sure.
Thanks In advance for offering your assistance.
 A: To address your questions in order:

*

*In the contexts you're discussing here, yes, $d$ refers to the Euclidean distance. But, in principle, these definitions will work in any metric space - which means that $d$ more properly should be called "whichever means of measuring distance we're using right now".


*This question doesn't make sense as written. $x$ and $y$ are variables, referring to arbitrary points within a set; "the radius" is a property of a ball $B(x,r)$, but not all sets are balls, so when considering a set whose openness is unknown it doesn't make sense to ask about the radius. What would be correct to say is "a set $S$ is open if, for any $x$ in $S$, there is a radius $r$ so that every $y$ within a distance $r$ of $x$ falls within $S$".


*$r = \min\{x,1 - x\}$ says "$r$ is either $x$ or $1 - x$, whichever is smaller". They chose this because it's the largest radius that works. Think about it with specific values, say $x = 0.75$. The left-most edge of the interval $(0,1)$ is $0.75$ away from $0.75$, and the right-most edge is $0.25$ away. That means, to have it be that "every $y$ within a distance $r$ of $x$ falls within" $(0,1)$, $r$ has to be no more that $0.25$ (otherwise, there would be points larger than $1$ which were too close to $0.75$).


*The proof is not setting $B(x,r)$ to $(x - r,x + r)$, it's observing that, by definition, $B(x,r) = (x - r,x + r)$ in this context. The definition of $B(x,r)$ you give at the beginning essentially says "$B(x,r)$ is the set of all points that are a distance less than $r$ from $x$". The left-most point which is a distance of $r$ from $x$ is $x - r$; the right-most point which is a distance of $r$ from $x$ is $x + r$. Everywhere in-between is close enough.
I always find that, while examples of definitions are helpful, non- examples are often more helpful. So consider the set $[0,1]$, which is not open. Here's why it isn't open: let $x = 1$, and pick any $r > 0$ you like. The point $1 + \frac{r}{2}$ is not in $[0,1]$, but it is within a distance $r$ of $1$. That means that $B(1,r)$ is not contained in $[0,1]$. But, in order for $[0,1]$ to be open, it would have to contain $B(1,r)$ for some nonnegative value of $r$, by definition! So $[0,1]$ is not open.
A: *

*Yes

*This statement doesn't really make sense. $B(x,r)$ has an $x$ in it. The $y$ in the definition is bound (it's the sort of variable you integrate over $\mathrm{d}x$ and has no existence outside the integral).

*

*What does work is "the open ball consists of all points such that the distance between it and the centre is less than $r$".

*Open balls are, as the basis of the topology, the "most fundamental" sets that are considered to be open by definition.



*$r=\min\{x,1-x\}$ happens to ensure that $y\pm r\in[0,1]$ as is required to make the proof work ($B(x,r)\subset(0,1)$). You'll see a lot of specially designed choices of $\epsilon, \frac{\epsilon}{2}$, etc in analysis.

*In one real dimension, $B(x,r)=\{y\in\mathbb{R}\mid \left|x-y\right|<r\}=(x-r,x+r)$ trivially.

