Confusion about the definition of analytic and singularity. In my textbook the definition of analyticity is given as

A function is said to be analytic in a domain D if f(z) is defined and differentiable at all points of D. The function f(z) is said to be analytic at a point z = $z_0$ in D if f(z) is analytic in a neighborhood of $z_0$.
Also, by an analytic function we mean a function that is analytic in some domain.

And the definition of singularity is given as

Singular point of f(z) is a point z = c at which f(z) is not analytic
(but such that every disk with center c contains points at which f(z) is analytic). We
also say that f(z) is singular at c or has a singularity at c.

What confuses me the most is the definition of singularity. How can it be possible that the points next to a singular point z = c are analytic when the point z = c is not differentiable or not even defined. According to the definition of analyticity, why wouldn't the non-analyticity of z = c causes the adjacent points to be non-analytic and so on.
 A: Take, for instance, the function $\iota\colon\mathbb{C}\setminus\{0\}\longrightarrow\mathbb C$ defined by $\iota(z)=\frac1z$. It is not defined at $0$, right?! But you can check from the definition that is an analytic function. The fact that it is not defined at $0$ doesn't affect what happens around that point.
And, yes, $\iota$ has a singularity at $0$.
A: The general definition of a singularity of an analytic function is the following. It relies on the notion of an analytic continuation. Suppose that the function is defined by an element $(f,D)$ where $D$ is some disk and $f$ is analytic in $D$. Consider the analytic continuation along all
possible curves $\gamma(t): 0\leq t\leq 1$ such that $\gamma(0)$ is the center of $D$. We say that a curve defines a singularity of $f$, if an analytic continuation of $f$ is possible for $0\leq t<1$ but not possible for $0\leq t\leq 1$.
And we say that the singularity defined by $\gamma$ "is at $\gamma(1)$", or "lies over $\gamma(1)$.
Now two distinct curves $\gamma_1,\gamma_2$ may define the same singularity. So we introduce the following equivalence relation on curves.
Two curves are equivalent if:
a) $\gamma_1(0)=\gamma_2(0)$ and $\gamma(1)=\gamma_2(1)$.
b) There exist sequences $t_n\to 1$ and $s_n\to 1$, and curves $\beta_n$ from $\gamma_1(t_n)$ to $\gamma_2(s_n)$,
such that $\beta_n\to \gamma_1(1)$ as $n\to\infty$ uniformly, and the analytic continuation of $f$ to $\gamma_1(t_n)$ can be continued by an analytic continuation along $\beta_n$ to $\gamma_2(s_n)$ and the result coincides with the analytic continuation of $f$ to $\gamma_2(s_n)$ along $\gamma_2$.
Tus a singularity of $f$ is defined as a class of
curves with the described property, modulo this equivalence.
As you see, this general definition is somewhat complicated, and for this reason it is not included in the standard textbooks. Another reason is that the textbooks have no use for it in this generality.
So the authors usually restrict to special cases, (and for these cases give separate definitions) the most important are: isolated singularities, singularities of single valued functions, or of their inverses, or singularities of power series on the circle of convergence. The general definition is rarely used.
For example Wikipedia does not have any general definition, considering only special cases.
