Logarithm

Definition. For a real x>0x > 0, the logarithm log⁡2x\log_2 x is the exponent to which 22 must be raised to give xx: log⁡2x=y\log_2 x = y exactly when 2y=x2^y = x. In this course the base is 22 unless stated.

The power rule log⁡2(xk)=klog⁡2x\log_2(x^k) = k \log_2 x holds for every integer k≥1k \geq 1. Changing the base multiplies the logarithm by a constant, and big-O ignores constant factors, so the base rarely matters. Up to rounding, log⁡2n\log_2 n is the number of bits needed to write nn in binary. Defined in Lecture 9.

Updated
Copyright © 2026 Jared Coleman. All rights reserved.