Mathematical singularity
In mathematics, a singularity is in general a point at which a given mathematical object is not defined, or a point of an exceptional set where it fails to be wellbehaved in some particular way, such as differentiability. See Singularity theory for general discussion of the geometric theory, which only covers some aspects.
For example, the function
 f(x)=\frac{1}{x}
on the real line has a singularity at x = 0, where it seems to "explode" to ±∞ and is not defined. The function g(x) = x (see absolute value) also has a singularity at x = 0, since it is not differentiable there. Similarly, the graph defined by y^{2} = x also has a singularity at (0,0), this time because it has a "corner" (vertical tangent) at that point.
The algebraic set defined by \{(x,y):x=y\} in the (x, y) coordinate system has a singularity (singular point) at (0, 0) because it does not admit a tangent there.
Contents
Real analysis
In real analysis singularities are either discontinuities or discontinuities of the derivative (sometimes also discontinuities of higher order derivatives). There are four kinds of discontinuities: type I, which has two subtypes, and type II, which also can be divided into two subtypes, but normally is not.
To describe these types two limits are used. Suppose that f(x) is a function of a real argument x, and for any value of its argument, say c, then the lefthanded limit, f(c^), and the righthanded limit, f(c^+), are defined by:
 f(c^) = \lim_{x \to c}f(x), constrained by x < c and
 f(c^+) = \lim_{x \to c}f(x), constrained by x > c.
The value f(c^) is the value that the function f(x) tends towards as the value x approaches c from below, and the value f(c^+) is the value that the function f(x) tends towards as the value x approaches c from above, regardless of the actual value the function has at the point where x = c .
There are some functions for which these limits do not exist at all. For example the function
 g(x) = \sin\left(\frac{1}{x}\right)
does not tend towards anything as x approaches c = 0. The limits in this case are not infinite, but rather undefined: there is no value that g(x) settles in on. Borrowing from complex analysis, this is sometimes called an essential singularity.
 A point of continuity, is a value of c for which f(c^) = f(c) = f(c^+), as one usually expects. All the values must be finite.

A type I discontinuity occurs when both f(c^) and f(c^+) exist and are finite, but one of three conditions also apply: f(c^) \neq f(c^+); f(c) does not exist for that value of x; or f(c) does not match the value that the two limits tend towards. Two subtypes occur:
 A jump discontinuity occurs when f(c^) \neq f(c^+), regardless of whether f(c) exists, and regardless of what value it might have if it does exist.
 A removable discontinuity occurs when f(c^) = f(c^+), but either the value of f(c) does not match the limits, or the function does not exist at the point x = c .

A type II discontinuity occurs when either f(c^) or f(c^+) does not exist (possibly both). This has two subtypes, which are usually not considered separately:
 An infinite discontinuity is the special case when either the left hand or right hand limit does not exist specifically because it is infinite, and the other limit is either also infinite or is some well defined finite number.
 An essential singularity is a term borrowed from complex analysis (see below). This is the case when either one or the other limits f(c^) or f(c^+) does not exist, but not because it is an infinite discontinuity. Essential singularities approach no limit, not even if legal answers are extended to include \pm\infty.
In real analysis, a singularity or discontinuity is a property of a function alone. Any singularities that may exist in the derivative of a function are considered as belonging to the derivative, not to the original function.
Coordinate singularities
A coordinate singularity (or coördinate singularity) occurs when an apparent singularity or discontinuity occurs in one coordinate frame, which can be removed by choosing a different frame. An example is the apparent singularity at the 90 degree latitude in spherical coordinates. An object moving due north (for example, along the line 0 degrees longitude) on the surface of a sphere will suddenly experience an instantaneous change in longitude at the pole (in the case of the example, jumping from longitude 0 to longitude 180 degrees). This discontinuity, however, is only apparent; it is an artifact of the coordinate system chosen, which is singular at the poles. A different coordinate system would eliminate the apparent discontinuity, e.g. by replacing latitude/longitude with nvector.
Complex analysis
In complex analysis there are four classes of singularities, described below. Suppose U is an open subset of the complex numbers C, and the point a is an element of U, and f is a complex differentiable function defined on some neighborhood around a, excluding a: U \ {a}.

Isolated singularities: Suppose the function f is not defined at a, although it does have values defined on U \ {a}.
 The point a is a removable singularity of f if there exists a holomorphic function g defined on all of U such that f(z) = g(z) for all z in U \ {a}. The function g is a continuous replacement for the function f.
 The point a is a pole or nonessential singularity of f if there exists a holomorphic function g defined on U with g(a) nonzero, and a natural number n such that f(z) = g(z) / (z − a)^{n} for all z in U \ {a}. The number n here is called the order of the pole. The derivative at a nonessential singularity itself has a nonessential singularity, with n increased by 1 (except if n is 0 so that the singularities are removable).
 The point a is an essential singularity of f if it is neither a removable singularity nor a pole. The point a is an essential singularity if and only if the Laurent series has infinitely many powers of negative degree.
 Branch points are generally the result of a multivalued function, such as \sqrt{z} or \log(z) being defined within a certain limited domain so that the function can be made singlevalued within the domain. The cut is a line or curve excluded from the domain to introduce a technical separation between discontinuous values of the function. When the cut is genuinely required, the function will have distinctly different values on each side of the branch cut. The shape of the branch cut is a matter of choice, however, it must connect two different branch points (like z=0 and z=\infty for \log(z)) which is fixed in place.
Finitetime singularity
A finitetime singularity occurs when one input variable is time, and an output variable increases towards infinite at a finite time. These are important in kinematics and PDEs (Partial Differential Equations) – infinites do not occur physically, but the behavior near the singularity is often of interest. Mathematically the simplest finitetime singularities are power laws for various exponents, x^{\alpha}, of which the simplest is hyperbolic growth, where the exponent is (negative) 1: x^{1}. More precisely, in order to get a singularity at positive time as time advances (so the output grows to infinity), one instead uses (t_0t)^{\alpha} (using t for time, reversing direction to t so time increases to infinity, and shifting the singularity forward from 0 to a fixed time t_0).
An example would be the bouncing motion of an inelastic ball on a plane. If idealized motion is considered, in which the same fraction of kinetic energy is lost on each bounce, the frequency of bounces becomes infinite as the ball comes to rest in a finite time. Other examples of finitetime singularities include the Painlevé paradox in various forms (for example, the tendency of a chalk to skip when dragged across a blackboard), and how the precession rate of a coin spun on a flat surface accelerates towards infinite, before abruptly stopping (as studied using the Euler's Disk toy).
Hypothetical examples include Heinz von Foerster's facetious "Doomsday's Equation" (simplistic models yield infinite human population in finite time).
Algebraic geometry and commutative algebra
In algebraic geometry, a singularity of an algebraic variety is a point of the variety where the tangent space may not be regularly defined. The simplest example of singularities are curves that cross themselves. But there are other types of singularities, like cusps. For example, the equation y^2  x^3 = 0 defines a curve that has a cusp at the origin x = y = 0. One could define the xaxis as a tangent at this point, but this definition can not be the same as the definition at other points. In fact, in this case, the xaxis is a "double tangent."
For affine and projective varieties, the singularities are the points where the Jacobian matrix has a rank which is lower than at other points of the variety.
An equivalent definition in terms of commutative algebra may be given, which extends to abstract varieties and schemes: A point is singular if the local ring at this point is not a regular local ring.