How to represent domain, and range?

I have this equation

$$f(x)=\frac{2}{x-3}$$

My thoughts is that I would state the domain like this

$D:x\in\mathbb{R},\ne3$

and the range like this

$R:(0,-\infty) \cup (\infty,0)$

I think I express the domain wrong, but I range I know I got right.

How would I express the range, if I wrote the range wrong?

• You got the domain correct and range wrong. Range will be $\mathbb{R} -\{0\}$. – gambler101 Sep 4 '16 at 15:20
• HINT: Does $f(x)=0$ happen? – Babak Sep 4 '16 at 15:21
• @Badak Thanks got it. – Sigma6RPU Sep 4 '16 at 15:22

You can write the domain as $x\in\mathbb{R}\backslash\{3\}$, which is the more "normal" convention and the range $x\in\mathbb{R}\backslash\{0\}$ or $(-\infty , \infty)\backslash\{0\}$ or even $(-\infty,0)\cup(0,\infty)$.
I would write $\mathrm{dom}\,(f)=\mathbb{R}\setminus\{3\}$ for the domain. For the image notations vary; I would refer to the range as the image and write $\mathrm{im}\,(f)=\mathbb{R}\setminus\{0\}.$ Alternatively, many people prefer notation such as $f(\mathbb{R}\setminus\{3\})$ or $R(f)$ for the range.
Note that the way you have written the range is incorrect only because you haven't written the intervals correctly. What I presume you meant is $$(-\infty,0)\cup(0,\infty),$$ which is correct.