# Is the segment $(a,b)$ of the $x$-axis of $\mathbb{R}^2$ closed? What about straight line $\mathbb{R}$ in $\mathbb{R}^2$?

I have two questions.

1. Is the segment $(a,b)$ of the $x$-axis of $\mathbb{R}^2$ closed?
2. What about straight line $\mathbb{R}$ in $\mathbb{R}^2$. Is it closed?

I understand that none of them is open. Is any neighborhood around a point in interval (a,b) or on straight line is not totally contained it the interval/straight line.

-

The segment $(a,b)$ is not closed as it does not contain the limit points $a$ and $b$.
The line $R$ is closed as its complement is open. For any point not on this line, say $(x,y)$, take the open ball of radius $|y|$ around it. This ball lies entirely outside the line.