In mathematics, a complex logarithm is a generalization of the natural logarithm to nonzero complex numbers. The term refers to one of the following, which are strongly related: A complex logarithm of a nonzero complex number , defined to be any complex number for which . Such a number is denoted by . If is given in polar form as , where and are real numbers with , then is one logarithm of , and all the complex logarithms of are exactly the numbers of the form for integers . These logarithms are equally spaced along a vertical line in the complex plane. A complex-valued function , defined on some subset of the set of nonzero complex numbers, satisfying for all in . Such complex logarithm functions are analogous to the real logarithm function , which is the inverse of the real exponential function and hence satisfies for all positive real numbers . Complex logarithm functions can be constructed by explicit formulas involving real-valued functions, by integration of , or by the process of analytic continuation. There is no continuous complex logarithm function defined on all of . Ways of dealing with this include branches, the associated Riemann surface, and partial inverses of the complex exponential function. The principal value defines a particular complex logarithm function that is continuous except along the negative real axis; on the complex plane with the negative real numbers and 0 removed, it is the analytic continuation of the (real) natural logarithm. Problems with inverting the complex exponential function For a function to have an inverse, it must map distinct values to distinct values; that is, it must be injective. But the complex exponential function is not injective, because for any complex number and integer , since adding to has the effect of rotating counterclockwise radians. So the points equally spaced along a vertical line, are all mapped to the same number by the exponential function. This means that the exponential function does not have an inverse function in the standard sense. There are two solutions to this problem. One is to restrict the domain of the exponential function to a region that does not contain any two numbers differing by an integer multiple of : this leads naturally to the definition of branches of , which are certain functions that single out one logarithm of each number in their domains. This is analogous to