Algebra & Functions · Logarithm

Logarithm

The logarithm logb x is the exponent to which the base b must be raised to give x: by = x means y = logb x. It turns multiplication into addition: logb(xy) = logb x + logb y.

01

The logarithm in this visualization

The logarithm of xx to the base bb, written log⁡bx\log_b x, is the exponent yy with by=xb^y = x: how many times bb must be multiplied together to give xx. It exists for x>0x > 0, with b>0b > 0 and b≠1b \ne 1. The common bases are 10 (log⁡10\log_{10}, the common logarithm), ee (ln⁡\ln, the natural logarithm) and 2. This page explains the curve y=log⁡bxy = \log_b x by one rule.

Multiplying adds the same height
log⁡b(x0mk)=log⁡bx0+klog⁡bm\log_b(x_0 m^k) = \log_b x_0 + k \log_b m

On the x axis a chain of points starts at x0x_0 and is multiplied by the same mm again and again: x0,x0m,x0m2,…x_0, x_0 m, x_0 m^2, \dots, and divided by it the other way. For m>1m > 1 the points spread farther and farther apart along the x axis (for m<1m < 1 the chain runs the other way), yet on the curve every step has the same height log⁡bm\log_b m, because log⁡b(xy)=log⁡bx+log⁡by\log_b(xy) = \log_b x + \log_b y: multiplying the numbers adds their logarithms. The yellow notches on the y axis are evenly spaced. Starting from x0=1x_0 = 1 with m=bm = b, the heights are 0, 1, 2, 3: the logarithm counts the factors of bb. With m=bm = \sqrt b two steps make one factor of bb, so each is ½ high — that is where fractional exponents come from. The rule shapes the whole curve: it passes through (1,0)(1, 0) and (b,1)(b, 1); it flattens, since one more step up needs the same factor, a longer and longer stretch of the x axis; and dividing towards 0 never reaches it, so for b>1b > 1 the curve falls without bound as x→0+x \to 0^+.

On a log scale a number sits at the position log⁡x\log x. The chain then becomes evenly spaced and the curve a straight line: equal ratios are equal distances. A slide rule is two such scales: sliding one along by log⁡x0\log x_0 multiplies every number on it by x0x_0, and you read products by eye to about three figures. Changing the base only rescales the heights, log⁡bx=ln⁡x/ln⁡b\log_b x = \ln x / \ln b; for 0<b<10 < b < 1 the curve is turned upside down, log⁡1/bx=−log⁡bx\log_{1/b} x = -\log_b x. And log⁡b(kx)=log⁡bx+log⁡bk\log_b(kx) = \log_b x + \log_b k: scaling the curve sideways by 1/k1/k is the same as moving it up by log⁡bk\log_b k.

02

Things to notice

  • The logarithm turns products into sums, not sums into sums: log⁡2(3+5)=3\log_2(3 + 5) = 3, while log⁡23+log⁡25=log⁡215≈3.907\log_2 3 + \log_2 5 = \log_2 15 \approx 3.907.
  • What is halved by 2\sqrt 2 is the step in height, not the number: 2≈1.414\sqrt 2 \approx 1.414, and log⁡22=12\log_2 \sqrt 2 = \tfrac12.
  • Numbers between 0 and 1 have logarithms too, negative ones for b>1b > 1: log⁡214=−2\log_2 \tfrac14 = -2. The base cannot be 1, since every power of 1 is 1; close to 1 the curve becomes very steep (log⁡1.012≈69.66\log_{1.01} 2 \approx 69.66).
  • The logarithm grows slowly but without limit: log⁡2x\log_2 x reaches 10 at x=1024x = 1024 and 20 at x=1 048 576x = 1\,048\,576.
  • The page writes a value with “=” only when it is exact — log⁡101000=3\log_{10} 1000 = 3, log⁡48=32\log_4 8 = \tfrac32 — and with “≈” when it is rounded. It keeps every number exact (decimals, fractions, roots such as √2, and e) to decide which.
03

Controls

  • Drag the solid start to slide the whole chain (x0x_0 changes); drag any other point of the chain and the multiplier changes so that the point follows your hand. Click a point to read its logarithm above the graph. Drag (b,1)(b, 1) to change the base on its side of 1; the keys ½, 2, e, 10 jump across. The fields take exact numbers such as 0.5, 1/3, √2 or e.
  • Linear | Log turns the x axis into a log scale and back. Slide rule lays a C scale under the axis, its 1 under the start. log⁡b(mx)\log_b(mx) shows the curve scaled sideways by 1/m1/m; bxb^x and y=xy = x show the inverse function and its mirror line, on a linear axis with equal scales.
  • Presentation mode opens a full-screen view for projectors (← → turn the multiplier to ½, √2, 2, 3, 10; H hides the logarithms).
04

Related