Is the function $f(x) = \frac{x-2}{x(x-2)}$ continuous? 
Is the function
  $$f(x)=\frac{x-2}{x(x-2)}$$
  continuous?

I'm in high school and calculus is something that is not yet very comfortable to me. I read that we call this function continuous in its domain. 
What does it exactly mean, because...
The points $0, 2$ are clearly not in its domain, so the definition of continuous function seems a bit weird $\lim_{x \to a^+}f(x) = \lim_{x \to a^-}f(x) = f(a) $ but for points $0,2,$ $\;f(a)$ is not valid as they are not in the domain, so how are we checking the continuity there. Also by this definition,  any function of form $\frac{anything}{0}$ is continuous then...
Also it seems a bit counter intuitive as at $0,\;$ $\lim_{x \to 0^+}f(x) =\infty, \lim_{x \to 0^-}f(x) = -\infty $ and yet we are calling it continouos. 
Also what exactly is the difference between a "function being continouos" and a "function being continouos in its domain".
 A: It is natural to state that the domain $D$ of your function is the set of those real numbers $x$ at which that expression makes sense. So, in this case, $D=\mathbb{R}\setminus\{0,2\}$. And, for each $a\in D$, we have $\lim_{x\to a}f(x)=f(a)$ indeed. Therefore $f$ is continuous. What happens outside $D$ does not matter.
A: You are correct. The function is continuous, but the idea of continuity only applies at points in the domain. The points $0$ and $2$ are not in the domain.
You are also right to be "worried" about those points.
The function can be extended to a function $\hat{f}$ including $2$ in its domain (you must decide how to define $\hat{f}(2)$ in that case; the only value that results in a function that is still continuous is to define $\hat{f}(2)=\tfrac12$).
You can also extend this to an even larger extension $f^*$ which includes $0$ in its domain, but it will not be continuous no matter how you define $f^*(0)$ for the reasons you point out.
Part of what you should take away from this is that the domain needs to be explicit before you can say whether a function is continuous. A function can be discontinuous, but restricting its domain can result in a continuous function. And a function can be continuous, but it can have continuous or discontinuous extensions. The extensions/restrictions really are different functions.
A: The so-called "calculus definition" of continuity is that a function $f$ is continuous at a point $a$ iff 
$$\lim_{x\to a}f(x)=f(a). $$
This equation says three non-trivial things (that is, any of them could fail):


*

*The two-sided limit of $f$ exists at $a$. 

*The function is defined at $a.$

*The limit of the function at $a$ is equal to the function's actual value at $a.$
For your function, all three things work for any $x$ not equal to $0$ or $2$ - that is, all numbers in its domain. That wouldn't be true for all functions. For example, the function
$$f(x)=\begin{cases}0,\;&x<0 \\ 1,\:&x\ge 0\end{cases} $$
has a domain everywhere, but is discontinuous at $0$.
A: The domain of the function excludes $x=0$ and $x=2$. At other values, the function equals $$\dfrac1x,$$ which is indeed continuous (being the ratio of two continuous function, with a non-zero denominator).
A: The function you have posted is an example of a rational function; i.e., a polynomial expression divided by a polynomial expression .
It is well known that rational functions are continuous wherever they are defined. That is what is meant by "continuous in its domain."
Moreover, rational functions are defined everywhere except at those $x$-values that would cause you to divide by $0$; in your case, over $\mathbb{R} - \lbrace 0 \rbrace - \lbrace 2 \rbrace $ = $(-\infty, 0) \cup (0, 2) \cup (2, \infty)$.  
A: The function $f(x)= \frac{x- 2}{x^2- 2x}= \frac{x- 2}{x(x- 2)}$ is not continuous at x= 2.  In fact, it is not even defined at x= 2.  
We can say that $\frac{x- 2}{x(x- 2)}= \frac{1}{x}$ for all x except 2.  It is NOT equal to 1/2 at x= 2 because $\frac{0}{2(0)}$ is not defined- we cannot just "cancel" the "0"s.
If you were to graph $y= \frac{x- 2}{x(x- 2)}$ its graph would be exactly like $y= 1/x$ except there would be a "hole" in the graph at (2, 1/2).
(I was focusing on the "interesting case", x= 2.  Of course, this is also not continuous at x= 0.)
