{
  "id": "natural-logarithm",
  "title": "Natural Logarithm",
  "lang": "en",
  "source_lang": "en",
  "summary": "The natural logarithm is the inverse of the exponential function with base e, fundamental to calculus, growth models, probability, and complex analysis.",
  "category": "mathematics",
  "subcategory": "analysis",
  "type": "concept",
  "aliases": [
    "Logarithm to base e",
    "Napierian logarithm",
    "Hyperbolic logarithm"
  ],
  "generated_at": "2026-11-02",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/natural-logarithm/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/natural-logarithm/",
      "json": "https://aiwiki.page/zh/natural-logarithm.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The natural logarithm of a positive real number \\(x\\), written \\(\\ln x\\), is its logarithm to the base e, where \\(e=2.718281828\\ldots\\). Equivalently, it is the number to which \\(e\\) must be raised to obtain \\(x\\). It is therefore the inverse function of the real exponential function: \\(\\ln(e^y)=y\\) for every real \\(y\\), and \\(e^{\\ln x}=x\\) for every \\(x>0\\).\n\nThe natural logarithm converts multiplication into addition and measures multiplicative change on an additive scale. Its particular importance comes from its compatibility with calculus: its derivative is exactly \\(1/x\\), without the constant factor that occurs for logarithms to other bases. It consequently appears in integration, continuous growth, numerical computation, statistical inference, and information measurement. Its extension to complex numbers also provides a central example of a multivalued function and explains why logarithmic identities require additional care outside the positive real numbers."
    },
    {
      "heading": "Definitions and mathematical characterization",
      "text": "The natural logarithm can be defined without first constructing exponentiation with an irrational base. A standard definition uses the integral\n\n\\[\\ln x=\\int_1^x\\frac{dt}{t},\\qquad x>0.\\]\n\nFor \\(x\\geq 1\\), this is the area under the curve \\(y=1/t\\) between \\(1\\) and \\(x\\). For \\(0<x<1\\), the integral has reversed limits and is negative. This definition immediately gives \\(\\ln 1=0\\). The older name “hyperbolic logarithm” reflects the connection with the rectangular hyperbola \\(y=1/x\\).\n\nBy the fundamental theorem of calculus, this function has derivative \\(1/x\\). It is therefore continuous and strictly increasing on the positive real numbers. Its values are unbounded in both directions:\n\n\\[\\lim_{x\\to0^+}\\ln x=-\\infty, \\qquad \\lim_{x\\to\\infty}\\ln x=\\infty.\\]\n\nFor example, the divergence at infinity can be seen by dividing the integral into intervals \\([2^k,2^{k+1}]\\). Each interval contributes the same positive area after a change of variable, so the total grows without bound. Consequently, \\(\\ln\\) is a bijection from \\((0,\\infty)\\) onto \\(\\mathbb R\\), and its inverse defines the exponential function.\n\nThe number \\(e\\) is the unique positive number satisfying \\(\\ln e=1\\). This characterization agrees with the familiar compound-interest limit\n\n\\[e=\\lim_{n\\to\\infty}\\left(1+\\frac1n\\right)^n.\\]\n\nAlternatively, one may first define \\(\\exp x\\) through a convergent power series or a differential equation, and then define \\(\\ln\\) as its inverse. These constructions lead to the same function; they differ only in which properties are established first.\n\nThe natural logarithm is also characterized as the unique differentiable function \\(f\\) on \\((0,\\infty)\\) satisfying \\(f'(x)=1/x\\) and \\(f(1)=0\\). An algebraic characterization uses the identity \\(f(xy)=f(x)+f(y)\\). Under continuity or suitable comparable regularity assumptions, every such function has the form \\(f(x)=c\\ln x\\); requiring \\(f(e)=1\\) fixes \\(c=1\\). Without regularity assumptions, the multiplication-to-addition identity alone admits pathological solutions.\n\nNotation depends on context. Elementary mathematics commonly distinguishes \\(\\ln x\\) from \\(\\log_{10}x\\), whereas advanced analysis often writes \\(\\log x\\) for the natural logarithm. Programming languages and mathematical software also differ, so the meaning of an unqualified log depends on the convention being used."
    },
    {
      "heading": "Algebraic identities, order, and inequalities",
      "text": "The defining algebraic property of the natural logarithm is\n\n\\[\\ln(xy)=\\ln x+\\ln y,\\qquad x,y>0.\\]\n\nFrom the integral definition, substituting \\(t=xu\\) gives\n\n\\[\\int_x^{xy}\\frac{dt}{t} = \\int_1^y\\frac{du}{u},\\]\n\nwhich proves the identity after splitting the integral at \\(x\\). Thus equal ratios of positive numbers correspond to equal differences of their logarithms. For example, multiplying any positive quantity by \\(2\\) increases its logarithm by \\(\\ln2\\approx0.693147\\), irrespective of the initial quantity.\n\nThe product identity yields the quotient and power rules:\n\n\\[\\ln\\frac{x}{y}=\\ln x-\\ln y, \\qquad \\ln(x^a)=a\\ln x,\\]\n\nwhere \\(x,y>0\\) and \\(a\\) is real. Real powers can themselves be defined by \\(x^a=\\exp(a\\ln x)\\). For any base \\(b>0\\), \\(b\\ne1\\), the change-of-base formula is\n\n\\[\\log_bx=\\frac{\\ln x}{\\ln b}.\\]\n\nIn particular, \\(\\log_{10}x=\\ln x/\\ln10\\). There is no corresponding distributive rule for addition: generally, \\(\\ln(x+y)\\ne\\ln x+\\ln y\\).\n\nThe graph is strictly increasing but bends downward, since\n\n\\[\\frac{d^2}{dx^2}\\ln x=-\\frac1{x^2}<0.\\]\n\nIt is therefore strictly concave, while \\(-\\ln x\\) is a convex function. The tangent at \\(x=1\\) lies above the graph and gives the fundamental inequality\n\n\\[\\ln x\\leq x-1,\\]\n\nwith equality only at \\(x=1\\). Applying this inequality to \\(1/x\\) also gives\n\n\\[1-\\frac1x\\leq\\ln x\\leq x-1,\\qquad x>0.\\]\n\nThese bounds quantify the closeness of the logarithm to its linear approximation near \\(1\\).\n\nConcavity also connects logarithms with averaging. For positive numbers \\(x_1,\\ldots,x_n\\) and nonnegative weights \\(w_i\\) summing to \\(1\\), Jensen’s inequality states\n\n\\[\\sum_{i=1}^n w_i\\ln x_i \\leq \\ln\\left(\\sum_{i=1}^n w_i x_i\\right).\\]\n\nExponentiation produces the weighted arithmetic–geometric mean inequality,\n\n\\[\\prod_{i=1}^n x_i^{w_i} \\leq \\sum_{i=1}^n w_i x_i.\\]\n\nStrict concavity makes equality possible only when all positively weighted values are equal. In the language of group theory, the natural logarithm is an isomorphism from the positive real numbers under multiplication to the real numbers under addition. This gives a structural explanation for the usefulness of logarithms whenever multiplicative relationships need to be studied additively."
    },
    {
      "heading": "Differentiation, integration, and relative change",
      "text": "For a differentiable positive function \\(u(x)\\), the chain rule gives\n\n\\[\\frac{d}{dx}\\ln u(x)=\\frac{u'(x)}{u(x)}.\\]\n\nThe ratio \\(u'/u\\) is called a logarithmic derivative. It measures the instantaneous rate of change relative to the current value, rather than the absolute rate \\(u'\\). If a population grows by \\(100\\) individuals per year, that absolute rate has very different significance for populations of \\(1{,}000\\) and \\(1{,}000{,}000\\); the logarithmic derivative distinguishes these cases directly.\n\nFor a nonzero real-valued function, the corresponding formula is\n\n\\[\\frac{d}{dx}\\ln|u(x)|=\\frac{u'(x)}{u(x)}\\]\n\non any interval where \\(u\\) does not vanish. The absolute value is essential when \\(u\\) is negative. In particular,\n\n\\[\\int\\frac{dx}{x}=\\ln|x|+C.\\]\n\nThe formula applies separately on the intervals \\((-\\infty,0)\\) and \\((0,\\infty)\\), and the integration constants need not agree between them. The singularity at zero cannot be crossed by an ordinary proper integral.\n\nLogarithmic differentiation simplifies products, quotients, and variable powers. If \\(y=x^x\\) for \\(x>0\\), then \\(\\ln y=x\\ln x\\), so\n\n\\[y'=x^x(\\ln x+1).\\]\n\nMore generally, if \\(y=u(x)^{v(x)}\\) with \\(u(x)>0\\), then\n\n\\[\\frac{y'}{y} = v'\\ln u+v\\frac{u'}u.\\]\n\nA product containing many factors can similarly be differentiated by replacing it with a sum of logarithms. This method is particularly useful when a direct application of the product rule would create numerous terms.\n\nThe natural logarithm is also a basic example in integration by parts:\n\n\\[\\int\\ln x\\,dx=x\\ln x-x+C,\\qquad x>0.\\]\n\nMore generally,\n\n\\[\\int\\frac{u'(x)}{u(x)}\\,dx=\\ln|u(x)|+C\\]\n\nwhere \\(u\\ne0\\). These formulas explain the appearance of logarithms in integrals of rational functions: a simple linear factor in a denominator often produces a logarithmic term after partial-fraction decomposition.\n\nFor small increments \\(\\Delta x\\), differentiability gives\n\n\\[\\ln(x+\\Delta x)-\\ln x \\approx\\frac{\\Delta x}{x}.\\]\n\nThus changes in logarithms approximate fractional changes. The approximation concerns small relative increments, not merely small absolute increments. For a finite relative change \\(r>-1\\), the exact logarithmic change is \\(\\ln(1+r)\\), while the ordinary fractional change is \\(r\\); their difference becomes important when changes are large."
    },
    {
      "heading": "Series, local approximations, and asymptotic behavior",
      "text": "The most familiar Taylor series for the natural logarithm is\n\n\\[\\ln(1+u) = u-\\frac{u^2}{2}+\\frac{u^3}{3} -\\frac{u^4}{4}+\\cdots.\\]\n\nFor \\(|u|<1\\), it follows by integrating the geometric series for \\(1/(1+u)\\) term by term. The series also converges at \\(u=1\\), where it gives the alternating harmonic representation of \\(\\ln2\\), but diverges at \\(u=-1\\). Its radius of convergence is \\(1\\), reflecting the singularity at the corresponding argument \\(1+u=0\\).\n\nFor \\(0\\leq u\\leq1\\), truncation after \\(N\\) terms has error at most \\(u^{N+1}/(N+1)\\), by the alternating-series estimate. The approximation \\(\\ln(1+u)\\approx u\\) is therefore the first term of a systematic expansion, not an independent heuristic. For example,\n\n\\[\\ln(1.01)\\approx0.009950330853,\\]\n\nrather than exactly \\(0.01\\). The quadratic correction \\(-u^2/2\\) accounts for most of the difference at this scale.\n\nA frequently more effective series uses\n\n\\[z=\\frac{x-1}{x+1}.\\]\n\nSince \\(x=(1+z)/(1-z)\\), subtraction of two logarithmic series yields\n\n\\[\\ln x = 2\\left( z+\\frac{z^3}{3}+\\frac{z^5}{5}+\\cdots \\right),\\qquad x>0.\\]\n\nHere \\(|z|<1\\) for every positive \\(x\\), although convergence becomes slow when \\(x\\) is extremely small or large. At \\(x=2\\), \\(z=1/3\\), so this expansion converges much faster than the alternating harmonic series. After retaining terms through \\(z^{2N-1}/(2N-1)\\), the absolute remainder is bounded by\n\n\\[\\frac{2|z|^{2N+1}}{(2N+1)(1-|z|^2)}.\\]\n\nThe logarithm grows without bound at infinity but more slowly than every positive power:\n\n\\[\\lim_{x\\to\\infty}\\frac{\\ln x}{x^\\alpha}=0 \\qquad(\\alpha>0).\\]\n\nLikewise, \\(x^\\alpha|\\ln x|\\to0\\) as \\(x\\to0^+\\). These comparisons are important when deciding whether logarithmic singularities are integrable or whether logarithmic factors change the dominant scale of an expression. In particular, although \\(\\ln x\\) diverges at zero, its improper integral over \\((0,1)\\) exists and equals \\(-1\\).\n\nLogarithms also enter asymptotic expansions involving products. A major example is the logarithmic form of Stirling’s formula for the factorial:\n\n\\[\\ln(n!) = n\\ln n-n+\\frac12\\ln(2\\pi n) +\\frac1{12n}+O(n^{-3}).\\]\n\nThe logarithm turns the product \\(1\\cdot2\\cdots n\\) into a sum, making integral approximation and higher-order corrections possible. This expansion is fundamental in combinatorics, probability, and numerical evaluation of very large factorials."
    },
    {
      "heading": "Historical development",
      "text": "Logarithms originated as computational devices rather than as inverse functions studied in calculus. John Napier published Mirifici Logarithmorum Canonis Descriptio in 1614, introducing tables that allowed difficult multiplications and divisions to be replaced by additions and subtractions. His construction used an analogy between motion at constant speed and motion whose speed decreased in proportion to the remaining distance. It was designed for astronomical and trigonometric computation.\n\nNapier’s original logarithms were scaled and oriented differently from the modern function \\(\\ln x\\). In modern notation, his idealized construction is associated with an expression of the form\n\n\\[10^7\\ln\\left(\\frac{10^7}{x}\\right),\\]\n\nrather than simply \\(\\ln x\\). Accordingly, the historical name “Napierian logarithm,” now often used for the natural logarithm, should not be taken to mean that his 1614 tables listed modern base-\\(e\\) values. Henry Briggs subsequently developed common, or base-10, logarithms, which were especially convenient for decimal calculation. His Arithmetica Logarithmica appeared in 1624.\n\nThe connection with area under a hyperbola developed during the seventeenth century. Grégoire de Saint-Vincent studied the quadrature of the hyperbola in his 1647 Opus geometricum. In 1649, Alphonse Antonio de Sarasa explicitly connected the resulting area relationships with logarithms. The essential geometric fact was that multiplying endpoints by a common factor leaves the corresponding hyperbolic area unchanged, producing the addition law characteristic of logarithms.\n\nThe development of calculus made the natural normalization especially significant. Nicholas Mercator published the logarithmic series in Logarithmotechnia in 1668. The emerging methods of differentiation and integration connected logarithms directly with \\(1/x\\), giving them a role beyond numerical tables. The name “natural” came to express the simplicity of this analytic relationship, rather than any special convenience for decimal arithmetic.\n\nIn the eighteenth century, Leonhard Euler systematically developed exponential and logarithmic functions and established much of their modern notation and treatment, notably in Introductio in analysin infinitorum of 1748. Logarithms of negative and complex numbers also became a subject of debate and clarification. The modern account distinguishes the real logarithm, defined only for positive arguments, from complex logarithms with multiple values. This distinction resolves apparent contradictions that arise when real logarithmic rules are extended without attention to their domains."
    },
    {
      "heading": "Numerical evaluation and floating-point computation",
      "text": "Direct summation of a logarithmic series is seldom the best general-purpose method for evaluating \\(\\ln x\\). Efficient algorithms first reduce the argument to a small interval. In binary floating-point arithmetic, a positive number can be decomposed as\n\n\\[x=2^k m,\\]\n\nwhere \\(k\\) is an integer and \\(m\\) is a significand in a chosen range, commonly \\([1,2)\\). Then\n\n\\[\\ln x=k\\ln2+\\ln m.\\]\n\nA further adjustment can place \\(m\\) closer to \\(1\\), where a short polynomial or rational approximation is accurate. Implementations may also use tables of precomputed logarithms to make the remaining correction very small.\n\nCare is needed near \\(x=1\\), because the result is close to zero. If a program forms \\(1+u\\) before taking its logarithm and \\(u\\) is tiny, rounding can erase \\(u\\) altogether. In binary64 arithmetic with round-to-nearest, for example, \\(1+10^{-16}\\) rounds to \\(1\\), even though \\(\\ln(1+10^{-16})\\) is approximately \\(10^{-16}\\). The specialized function log1p(u) evaluates \\(\\ln(1+u)\\) while preserving information that would otherwise be lost in the addition.\n\nThis issue illustrates numerical stability and the distinction between absolute and relative error. For a perturbation \\(\\delta x\\),\n\n\\[\\delta(\\ln x)\\approx\\frac{\\delta x}{x}.\\]\n\nThe relative condition number of the logarithm, when input and output errors are both measured relatively, is\n\n\\[\\kappa(x)= \\left|\\frac{x(\\ln x)'}{\\ln x}\\right| = \\frac1{|\\ln x|}, \\qquad x\\ne1.\\]\n\nIt becomes large near \\(1\\) because the output approaches zero. This does not prevent an algorithm from achieving a small absolute error; it means that relative error in a nearly zero result is intrinsically sensitive.\n\nLogarithms are also used to stabilize other computations. A product of many small positive numbers may underflow even when its logarithm is easily representable:\n\n\\[\\ln\\left(\\prod_i p_i\\right)=\\sum_i\\ln p_i.\\]\n\nSimilarly, the log-sum-exp identity\n\n\\[\\ln\\left(\\sum_i e^{a_i}\\right) = m+\\ln\\left(\\sum_i e^{a_i-m}\\right), \\qquad m=\\max_i a_i,\\]\n\navoids overflow in the exponential terms when all \\(a_i\\) are finite. This transformation is widely used in probability calculations and the softmax function.\n\nAccuracy guarantees vary between mathematical libraries. Correct rounding requires returning the nearest representable value under the specified rounding mode, a stronger requirement than merely having a small approximation error. Special inputs also require explicit treatment: floating-point libraries commonly return negative infinity for the logarithm of positive zero and a not-a-number result for negative real arguments."
    },
    {
      "heading": "Complex logarithms and branch structure",
      "text": "For a nonzero complex number written in polar form,\n\n\\[z=re^{i\\theta},\\qquad r>0,\\]\n\nevery value\n\n\\[\\log z=\\ln r+i(\\theta+2\\pi k), \\qquad k\\in\\mathbb Z,\\]\n\nis a complex logarithm of \\(z\\). This follows because adding \\(2\\pi i k\\) to an exponent does not change its exponential. Unlike the real exponential function, the complex exponential is periodic and therefore not globally one-to-one. Its inverse consequently cannot be a single-valued function on the entire punctured plane.\n\nA branch of the logarithm chooses the argument continuously on a suitable domain. A standard analytic principal branch is\n\n\\[\\operatorname{Log}z=\\ln|z|+i\\operatorname{Arg}z, \\qquad -\\pi<\\operatorname{Arg}z<\\pi,\\]\n\ndefined on \\(\\mathbb C\\setminus(-\\infty,0]\\). The removed nonpositive real axis is a branch cut. Some conventions assign principal values on the negative real axis as well, but such an assignment does not make the logarithm analytic across that axis.\n\nOn any domain carrying an analytic logarithm,\n\n\\[\\frac{d}{dz}\\log z=\\frac1z.\\]\n\nThere is no globally analytic logarithm on \\(\\mathbb C\\setminus\\{0\\}\\). Indeed, the contour integral of \\(1/z\\) around a positively oriented circle enclosing the origin is \\(2\\pi i\\), whereas the integral of the derivative of a globally defined analytic function around a closed curve would be zero. On a simply connected open domain avoiding zero, an analytic logarithm does exist.\n\nReal logarithmic identities must therefore be qualified in complex analysis. For example,\n\n\\[\\operatorname{Log}(zw)\\]\n\nand \\(\\operatorname{Log}z+\\operatorname{Log}w\\) can differ by an integer multiple of \\(2\\pi i\\). Taking \\(z=w=e^{3\\pi i/4}\\), both factors lie in the principal branch domain, but\n\n\\[\\operatorname{Log}z+\\operatorname{Log}w=\\frac{3\\pi i}{2}, \\qquad \\operatorname{Log}(zw)=-\\frac{\\pi i}{2}.\\]\n\nThe discrepancy is \\(2\\pi i\\), not a failure of the exponential relation.\n\nThe branch structure also governs complex powers, defined locally by \\(z^\\alpha=\\exp(\\alpha\\log z)\\). For noninteger \\(\\alpha\\), different choices of logarithm can yield different powers. Under analytic continuation once around zero, a logarithm increases by \\(2\\pi i\\). This behavior makes the logarithm a basic model for studying branch points, continuation along paths, and functions defined on multiple sheets."
    },
    {
      "heading": "Probability, statistical inference, and information",
      "text": "Natural logarithms are central to maximum likelihood estimation. For independent observations with probability densities or masses \\(f(x_i;\\theta)\\), the likelihood function is a product,\n\n\\[L(\\theta)=\\prod_{i=1}^n f(x_i;\\theta).\\]\n\nWhere these factors are positive, its logarithm is\n\n\\[\\ell(\\theta)=\\sum_{i=1}^n\\ln f(x_i;\\theta).\\]\n\nBecause \\(\\ln\\) is strictly increasing, maximizing \\(L\\) and maximizing \\(\\ell\\) give the same parameter values. The logarithmic form is easier to differentiate and is usually more stable to compute. A zero likelihood can be represented by the extended value \\(-\\infty\\).\n\nFor observations from a normal distribution with unknown mean \\(\\mu\\) and known variance \\(\\sigma^2\\),\n\n\\[\\ell(\\mu) = -\\frac n2\\ln(2\\pi\\sigma^2) -\\frac1{2\\sigma^2}\\sum_{i=1}^n(x_i-\\mu)^2.\\]\n\nMaximizing this expression is equivalent to minimizing the sum of squared deviations, linking likelihood with least squares. The logarithm converts the Gaussian exponential into a quadratic expression, exposing the underlying optimization problem.\n\nA positive random variable \\(X\\) is said to have a lognormal distribution when \\(Y=\\ln X\\) is normally distributed. If \\(Y\\) has mean \\(\\mu\\) and variance \\(\\sigma^2\\), then the median of \\(X\\) is \\(e^\\mu\\), but its expectation is\n\n\\[\\mathbb E[X]=e^{\\mu+\\sigma^2/2}.\\]\n\nThus exponentiating the mean of logarithms does not generally recover the arithmetic mean of the original values. More broadly, concavity gives \\(\\mathbb E[\\ln X]\\leq\\ln\\mathbb E[X]\\) whenever the relevant expectations exist.\n\nIn information theory, the self-information of an event with positive probability \\(p\\) is \\(-\\ln p\\), measured in nats. Independent events have multiplicative probabilities and therefore additive information. For a discrete distribution \\((p_i)\\), entropy is\n\n\\[H=-\\sum_i p_i\\ln p_i,\\]\n\nwith \\(0\\ln0\\) interpreted by continuity as zero. Using base \\(2\\) instead measures information in bits; dividing a value in nats by \\(\\ln2\\) converts it to bits.\n\nThe Kullback–Leibler divergence between discrete distributions is\n\n\\[D_{\\mathrm{KL}}(P\\|Q) = \\sum_i p_i\\ln\\frac{p_i}{q_i}.\\]\n\nIt is an expected log-likelihood ratio and is nonnegative, with value \\(+\\infty\\) if some \\(p_i>0\\) has \\(q_i=0\\). Logarithms also appear in cross-entropy losses and the logit \\(\\ln[p/(1-p)]\\), where probabilities between zero and one are transformed onto the whole real line."
    },
    {
      "heading": "Growth laws, measurement, and physical models",
      "text": "The natural logarithm is the appropriate inverse for continuous exponential growth. If a quantity \\(N(t)\\) satisfies the differential equation\n\n\\[\\frac{dN}{dt}=kN,\\]\n\nthen \\(N(t)=N_0e^{kt}\\), and\n\n\\[\\ln\\frac{N(t)}{N_0}=kt.\\]\n\nThe parameter \\(k\\) is the constant relative growth rate. For \\(k>0\\), the doubling time is \\(\\ln2/k\\); for exponential decay with \\(k<0\\), the half-life is \\(\\ln2/|k|\\). The logarithm isolates elapsed time or the growth-rate parameter from a measured ratio.\n\nIn finance, the continuously compounded return between two positive prices is\n\n\\[r=\\ln\\frac{P_1}{P_0}.\\]\n\nSuccessive logarithmic returns add exactly:\n\n\\[\\ln\\frac{P_2}{P_0} = \\ln\\frac{P_1}{P_0} + \\ln\\frac{P_2}{P_1}.\\]\n\nOrdinary fractional returns do not add in this way because their gross growth factors multiply. For example, a rise of \\(10\\%\\) followed by a fall of \\(10\\%\\) produces a net factor \\(1.1\\times0.9=0.99\\), not \\(1\\). The corresponding log returns sum to \\(\\ln0.99\\).\n\nLogarithmic coordinates also expose power laws. If \\(y=Ax^b\\) with \\(x,y,A>0\\), then\n\n\\[\\ln y=\\ln A+b\\ln x.\\]\n\nA plot of \\(\\ln y\\) against \\(\\ln x\\) is therefore linear with slope \\(b\\). More generally, the local elasticity of \\(y\\) with respect to \\(x\\) is\n\n\\[\\frac{d\\ln y}{d\\ln x} = \\frac{x}{y}\\frac{dy}{dx}.\\]\n\nIn econometrics, this derivative expresses the proportional response of one variable to a proportional change in another. A regression fitted after logarithmic transformation, however, specifies errors on the logarithmic scale and is not automatically equivalent to fitting an additive-error model on the original scale.\n\nPhysical logarithms usually act on dimensionless ratios. An expression such as \\(\\ln L\\), with \\(L\\) a dimensional length, depends on the chosen unit unless it abbreviates \\(\\ln(L/L_0)\\) for a reference length \\(L_0\\). Ratios also appear naturally in equilibrium constants, concentration activities, and changes in thermodynamic state.\n\nIn thermodynamics, the statistical expression \\(S=k_{\\mathrm B}\\ln\\Omega\\) relates entropy to the number \\(\\Omega\\) of compatible microstates in the equal-probability setting. When two independent systems have multiplicities \\(\\Omega_1\\) and \\(\\Omega_2\\), their combined multiplicity is \\(\\Omega_1\\Omega_2\\). The logarithm makes the corresponding entropies additive. For unequal microstate probabilities, the related expression is \\(-k_{\\mathrm B}\\sum_i p_i\\ln p_i\\), displaying the mathematical connection between statistical mechanics and information entropy."
    },
    {
      "heading": "Extensions to matrices and connections with number theory",
      "text": "For a square matrix \\(A\\), a matrix logarithm is a matrix \\(B\\) satisfying\n\n\\[e^B=A,\\]\n\nwhere the matrix exponential is defined by its power series. Every invertible complex matrix has at least one complex logarithm, but logarithms need not be unique. Real matrices introduce an additional restriction: an invertible real matrix does not always possess a real logarithm. Even in dimension one, the real matrix \\([-1]\\) cannot be the exponential of a real scalar.\n\nFor a real symmetric positive-definite matrix, the logarithm has a particularly direct construction. By the spectral theorem, write\n\n\\[A=Q\\operatorname{diag}(\\lambda_1,\\ldots,\\lambda_n)Q^{T}, \\qquad \\lambda_i>0,\\]\n\nwith \\(Q\\) orthogonal. Its principal logarithm is\n\n\\[\\log A = Q\\operatorname{diag}(\\ln\\lambda_1,\\ldots,\\ln\\lambda_n)Q^{T}.\\]\n\nThus the scalar natural logarithm is applied to the positive eigenvalues while preserving the eigenspaces. More generally, a complex matrix with no eigenvalues on the nonpositive real axis has a unique principal logarithm whose eigenvalues have imaginary parts strictly between \\(-\\pi\\) and \\(\\pi\\).\n\nScalar identities do not all survive unchanged. In particular, \\(\\log(AB)=\\log A+\\log B\\) is not a general matrix identity: noncommutativity and branch choices both matter. For a positive-definite matrix, however,\n\n\\[\\operatorname{tr}(\\log A)=\\ln\\det A,\\]\n\nbecause the trace sums the logarithms of its eigenvalues and the determinant multiplies those eigenvalues. This identity underlies the log-determinant functions used in multivariate statistics and convex optimization.\n\nIn number theory, natural logarithms describe the average distribution of prime numbers. The prime number theorem states\n\n\\[\\pi(x)\\sim\\frac{x}{\\ln x},\\]\n\nwhere \\(\\pi(x)\\) counts primes not exceeding \\(x\\), and \\(\\sim\\) means that the ratio of the two sides tends to \\(1\\). The related logarithmic integral,\n\n\\[\\operatorname{Li}(x)=\\int_2^x\\frac{dt}{\\ln t}, \\qquad x>2,\\]\n\nprovides another standard approximation. The appearance of \\(1/\\ln x\\) expresses the declining average density of primes at large scales.\n\nLogarithms also turn arithmetic products into sums. For example,\n\n\\[\\ln(n!)=\\sum_{k=1}^n\\ln k.\\]\n\nPrime products similarly become sums of logarithms of primes, which are easier to connect with analytic functions and integral estimates. This conversion is especially important in studying the Euler product for the Riemann zeta function, where multiplicative information about prime factorizations is translated into additive analytic expressions."
    }
  ],
  "links": [
    "logarithm",
    "e-mathematical-constant",
    "inverse-function",
    "exponential-function",
    "calculus",
    "integral",
    "fundamental-theorem-of-calculus",
    "derivative",
    "real-number",
    "bijective-function",
    "convex-function",
    "jensens-inequality",
    "group-theory",
    "isomorphism",
    "chain-rule",
    "integration-by-parts",
    "taylor-series",
    "geometric-series",
    "asymptotic-expansion",
    "factorial",
    "leonhard-euler",
    "floating-point-arithmetic",
    "numerical-stability",
    "condition-number",
    "softmax-function",
    "complex-number",
    "line-integral",
    "complex-analysis",
    "analytic-continuation",
    "maximum-likelihood-estimation",
    "likelihood-function",
    "normal-distribution",
    "ordinary-least-squares",
    "random-variable",
    "lognormal-distribution",
    "expected-value",
    "information-theory",
    "information-entropy",
    "kullback-leibler-divergence",
    "cross-entropy",
    "logit",
    "differential-equation",
    "power-law",
    "econometrics",
    "thermodynamics",
    "matrix",
    "positive-definite-matrix",
    "spectral-theorem",
    "determinant",
    "convex-optimization",
    "number-theory",
    "prime-number",
    "prime-number-theorem",
    "riemann-zeta-function"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}