I am required to prove that the set $L = \{(x,y)\in\mathbf{R}^2:y=mx+c\}$ where $m,c\in\mathbf{R}$ is closed in $\mathbf{R}^2$.
I have tried to show that $\mathbf{R}\backslash L = \bigcup_{(a,b)\in\mathbf{R}\backslash L}D_{(a,b)}$ where $D_{(a,b)}$ is a disk having a radius dependent on the proximity of $(a,b)$ to $L$, but as you can see here https://www.desmos.com/calculator/dldadrhrdl the task proving a bit cumbersome. What is the best way to go about proving this?
Perhaps that the shortest way consists in noticing that $L=f^{-1}\bigl(\{c\}\bigr)$, where $f(x,y)=y-mx$. Since $f$ is continuous and $L$ is closed, $L$ is then closed.
You can also easily prove that that set $M=\{(x,0)\,|\,x\in\mathbb{R}\}$ is closed. Now, consider the map$$\begin{array}{rccc}\varphi\colon&\mathbb{R}^2&\longrightarrow&\mathbb{R}^2\\&(x,y)&\mapsto&(x,y+mx+c).\end{array}$$It is clearly a homeomorphism (unless $m=0$) and $L=\varphi(M)$. Since $M$ is closed, $L$ is closed too.
Still another possibility consists in proving that $\mathbb{R}^2\setminus L$ is open. If $(x,y)\in\mathbb{R}^2\setminus L$, the distance from $(x,y)$ to $L$ is equal to $\frac{\lvert y-mx-c\rvert }{\sqrt{m^2+1}}$. Therefore, the open ball centered at $(x,y)$ with radius $\frac{\lvert y-mx-c\rvert }{\sqrt{m^2+1}}$ is contained in $\mathbb{R}^2\setminus L$.