Search topics and sections

Information theory is the branch of Mathematics that studies how to measure, store, and send information. It treats information as a choice among possible messages, sets aside what the messages mean, and measures the choice in bits.[1][2] Claude Shannon founded the modern field with his 1948 paper "A Mathematical Theory of Communication".[2]

The theory sets two hard limits. Entropy is the smallest average number of bits needed to describe data, which limits data compression. Channel capacity is the highest rate at which data can be sent over a noisy link and still be recovered with almost no errors.[3]

The basic idea

Information as choice

Shannon described the basic problem of communication as reproducing, at one point, a message selected at another point.[1] He treated meaning as irrelevant to this engineering problem. What matters is that the actual message is one chosen from a set of possible messages.[1]

The size of a message and the knowledge it carries are separate things.[2] Britannica gives the example of Victor Hugo, who sent his publisher a card with only "?" and got back a card with only "!". The cards were full of meaning in context and meaningless without it.[2]

Counting with logarithms

When there are NN equally likely messages, the information in picking one can be measured by the Logarithm of NN, a choice Shannon credited to Ralph Hartley.[1] Logarithms make information add up. Two punched cards should hold twice as much as one, and adding one two-state relay doubles the number of states but adds exactly 1 to the base-2 logarithm.[1]

The base of the logarithm sets the unit. With base 2 the unit is the binary digit, or bit, a word suggested by J. W. Tukey.[4] A device with two stable positions, such as a relay, stores one bit, and NN such devices have 2N2^N states, so they store log⁡22N=N\log_2 2^N = N bits.[4]

Log base Unit Note
2 bit The usual unit in communication
ee nat (natural unit) Useful when the work involves calculus
10 decimal digit One decimal digit is about 3133\tfrac{1}{3} bits

To change from base aa to base bb, multiply by log⁡ba\log_b a.[1]

Entropy

Surprise of one outcome

Learning that an unlikely event happened tells you more than learning that a likely one did.[5] The information content, or surprisal, of an outcome with probability pp is

I=−log⁡2p bits.I = -\log_2 p \text{ bits}.

A fair coin landing heads (p=1/2p = 1/2) gives 1 bit. An outcome with probability 1/81/8 gives 3 bits.

Average surprise

A discrete random variable is a quantity whose value is set by chance from a list of possible values. The entropy of such a variable XX is its average information content:[6]

H(X)=−∑xp(x)log⁡2p(x)H(X) = -\sum_{x} p(x)\log_2 p(x)

Here p(x)p(x) is the probability that XX takes the value xx, and the sum runs over all possible values. By convention 0log⁡0=00 \log 0 = 0, so outcomes that cannot happen add nothing.[6] Entropy depends only on the probabilities, not on the values themselves.[6]

Shannon noted that the same formula defines entropy in statistical mechanics, for example the H in Boltzmann's H theorem.[1]

Key properties

  • Entropy is 0 when the outcome is certain, since there is no uncertainty.[6]
  • Entropy is never more than log⁡2\log_2 of the number of possible values, and it equals that value only when all values are equally likely.[6]
  • Entropy is concave: the entropy of a mix of two distributions is at least the average of their two entropies.[6]

For a coin that lands heads with probability pp, the entropy is the binary entropy function H(p)=−plog⁡2p−(1−p)log⁡2(1−p)H(p) = -p\log_2 p - (1-p)\log_2(1-p). It is 0 at p=0p = 0 and p=1p = 1 and reaches its maximum of 1 bit at p=1/2p = 1/2.[6]

Binary entropy function00.250.50.751p (probability of heads)H(p) in bits00.51maximum: 1 bit at p = 0.5certain outcome: 0 bitscertain outcome: 0 bits
The binary entropy function H(p)=−plog⁡2p−(1−p)log⁡2(1−p)H(p) = -p \log_2 p - (1-p) \log_2 (1-p) is 0 bits when the outcome is certain (p=0p = 0 or p=1p = 1). It reaches its maximum of 1 bit at p=0.5p = 0.5, the fair coin.

Entropy as a game of questions

Entropy also counts the yes-or-no questions needed to find an unknown value. Suppose XX is aa, bb, cc, or dd with probabilities 1/21/2, 1/41/4, 1/81/8, and 1/81/8. Its entropy is 12⋅1+14⋅2+18⋅3+18⋅3=1.75\tfrac12 \cdot 1 + \tfrac14 \cdot 2 + \tfrac18 \cdot 3 + \tfrac18 \cdot 3 = 1.75 bits.

Asking "Is X=aX = a?", then "Is X=bX = b?", then "Is X=cX = c?" takes 1.75 questions on average, and no strategy does better.[3] In general, the minimum expected number of yes-or-no questions lies between H(X)H(X) and H(X)+1H(X) + 1.[3]

Question tree for identifying X Is X = a? Is X = b? Is X = c? a b c d yes / 0 yes / 0 yes / 0 no / 1 no / 1 no / 1 p = 1/2 1 question code 0 p = 1/4 2 questions code 10 p = 1/8 3 questions code 110 p = 1/8 3 questions code 111 Average = 1.75 questions = H(X) = 1.75 bits
A chain of yes/no questions finds XX in 11 question for aa (p=1/2p = 1/2), 22 for bb (p=1/4p = 1/4) and 33 for cc and dd (p=1/8p = 1/8 each). Reading each path as bits gives the codewords 0, 10, 110 and 111, and the average of 1.751.75 questions equals the entropy H(X)=1.75H(X) = 1.75 bits.

Measures of shared information

Most problems involve more than one random variable, such as what was sent and what was received. The following measures, all built from entropy, describe how such variables relate.

Joint and conditional entropy

The joint entropy H(X,Y)H(X,Y) is the entropy of the pair (X,Y)(X,Y) treated as a single variable.[6] The conditional entropy H(Y∣X)H(Y|X) is the uncertainty left in YY once XX is known, averaged over the values of XX.[6] The two are linked by the chain rule:[6]

H(X,Y)=H(X)+H(Y∣X)H(X,Y) = H(X) + H(Y|X)

On average, knowing YY never increases the uncertainty about XX, so H(X∣Y)≤H(X)H(X|Y) \le H(X).[6] A single observation can raise uncertainty, as one piece of new evidence in a court case sometimes does, but evidence lowers it on average.[6]

Mutual information

Mutual information measures how much one random variable tells about another. It is the drop in uncertainty about one variable from knowing the other:[6]

I(X;Y)=H(X)−H(X∣Y)=H(Y)−H(Y∣X)I(X;Y) = H(X) - H(X|Y) = H(Y) - H(Y|X)

Mutual information is symmetric in XX and YY, never negative, and zero exactly when XX and YY are independent.[3]

Relative entropy and cross-entropy

Relative entropy, also called the Kullback-Leibler divergence, compares two probability distributions pp and qq over the same values:[6]

D(p∥q)=∑xp(x)log⁡2p(x)q(x)D(p\|q) = \sum_{x} p(x)\log_2\frac{p(x)}{q(x)}

It measures the cost of assuming the distribution is qq when it is really pp. It is never negative and is zero only when p=qp = q, but it is not a true distance, because it is not symmetric and does not satisfy the triangle inequality.[6]

A code designed for qq needs H(p)+D(p∥q)H(p) + D(p\|q) bits on average to describe values that actually follow pp.[6] This total is the Cross-entropy, H(p,q)=−∑xp(x)log⁡2q(x)H(p,q) = -\sum_x p(x)\log_2 q(x). Mutual information is itself a relative entropy, between the joint distribution p(x,y)p(x,y) and the product p(x)p(y)p(x)p(y).[6]

Summary

Quantity Symbol Plain meaning
Entropy H(X)H(X) Average uncertainty in XX
Joint entropy H(X,Y)H(X,Y) Uncertainty in the pair
Conditional entropy H(X∣Y)H(X|Y) Uncertainty left in XX after learning YY
Mutual information I(X;Y)I(X;Y) Information XX and YY share
Relative entropy D(p∥q)D(p\Vert q) Extra cost of using qq in place of the true pp

An information diagram shows these relations as overlapping regions, with mutual information as the overlap of H(X)H(X) and H(Y)H(Y).[6]

Information diagram of two random variables H(X) H(Y) H(X|Y) I(X;Y) H(Y|X) H(X,Y)
Information diagram for two random variables. Each circle is an entropy, H(X)H(X) and H(Y)H(Y). The overlap is the mutual information I(X;Y)I(X;Y), and the parts outside it are H(X∣Y)H(X|Y) and H(Y∣X)H(Y|X), so H(X)=H(X∣Y)+I(X;Y)H(X) = H(X|Y) + I(X;Y) and the union is H(X,Y)=H(X∣Y)+I(X;Y)+H(Y∣X)H(X,Y) = H(X|Y) + I(X;Y) + H(Y|X).

Shannon's model of communication

Shannon described a communication system as five parts in a chain:[4]

  1. An information source picks a message.
  2. A transmitter turns the message into a signal. A telephone turns sound pressure into electric current, and a telegraph turns letters into dots, dashes, and spaces.
  3. A channel carries the signal. It may be a pair of wires, a coaxial cable, a band of radio frequencies, or a beam of light, and a noise source may disturb the signal on the way.
  4. A receiver does the inverse of the transmitter and rebuilds the message from the signal.
  5. A destination is the person or thing the message is meant for.
Shannon's general communication system Informationsource Transmitter Channel Receiver Destination Noise source message signal receivedsignal message
Shannon's general communication system. A message passes from the information source to a transmitter, which sends it into the channel as a signal, while a noise source disturbs the signal in the channel before the receiver rebuilds the message for the destination.

The model leads to two central questions. The first asks how far data can be compressed, and the answer is the entropy HH. The second asks how fast data can be sent reliably, and the answer is the channel capacity CC.[3] The Shannon-Weaver model page covers this diagram in more detail.

Source coding: compression

The source coding theorem

Shannon's source coding theorem ties compression to entropy. If a source has entropy HH bits per symbol and a channel can carry CC bits per second, the source can be coded to send C/H−ϵC/H - \epsilon symbols per second for any small ϵ>0\epsilon > 0, but never more than C/HC/H.[1]

In the language of compression, HH is a lower bound on the average length of the shortest description of a random variable. Codes exist whose average length is within 1 bit of HH.[3]

Practical lossless codes

Entropy coding gives short codewords to common symbols and long ones to rare symbols. Two families are widely known:

  • Huffman coding, published by David A. Huffman in 1952, is an optimum method for coding a finite set of messages, giving the smallest average number of code digits per message.[7]
  • Lempel-Ziv coding, published by Jacob Ziv and Abraham Lempel in 1977, is a universal method. Its compression ratio approaches the best ratio achievable by codes designed for a fully known source.[8] Later dictionary-based variants of the Lempel-Ziv methods replace repeated strings with short codes and are used in GIF image files.[9]

Lossy compression

Some uses do not need an exact copy of the data. Rate-distortion theory asks what rate is needed to describe a source when some distortion DD is allowed.[3] Shannon proved coding theorems for a source with such a fidelity criterion in 1959.[10]

Channel coding: beating noise

How much gets through

Shannon gave a worked example of a noisy link.[1] A source sends 1,000 symbols per second, each 0 or 1 with equal probability, so it produces 1,000 bits per second. Noise flips 1 symbol in 100 on average.

Subtracting the errors to get 990 bits per second is wrong, because the receiver does not know where the errors are.[1] In the extreme case where the output is independent of the input, half the symbols are still right by chance, yet no information gets through at all.[1]

The right correction subtracts the uncertainty that remains about what was sent after the signal is received. Shannon called this the equivocation, written today as H(X∣Y)H(X|Y):[1]

R=H(X)−H(X∣Y)R = H(X) - H(X|Y)

This is the mutual information between input and output. In the example, H(X∣Y)H(X|Y) is 0.081 bits per symbol, so the true rate is 1000−81=9191000 - 81 = 919 bits per second.[1]

Channel capacity

A channel is described by the probabilities p(y∣x)p(y|x) of each output yy given each input xx. Its capacity is the most mutual information any input distribution can achieve:[3]

C=max⁡p(x)I(X;Y)C = \max_{p(x)} I(X;Y)

Capacity is the maximum rate at which information can be sent over the channel and recovered with a vanishingly low probability of error.[3]

The noisy-channel coding theorem

In the early 1940s, engineers thought it impossible to send information at a positive rate with negligible error. Shannon proved that the error probability can be made nearly zero for every rate below capacity.[3] This is the noisy-channel coding theorem.

The theorem relies on codes with long block lengths. Real systems face limits on code complexity, so they may fall short of capacity.[3] Shannon's proof used randomly generated codes rather than building a specific one.[3]

The binary symmetric channel

The binary symmetric channel is the basic example of a noisy channel. It takes a bit as input and delivers it unchanged with probability 1−p1-p, or flipped with probability pp.[3]

Binary symmetric channelInput XOutput Y01011 - p1 - ppp
In the binary symmetric channel, each input bit XX reaches the output YY unchanged with probability 1−p1 - p and is flipped with crossover probability pp.

Its capacity is[3]

C=1−H(p)=1+plog⁡2p+(1−p)log⁡2(1−p) bits per use,C = 1 - H(p) = 1 + p\log_2 p + (1-p)\log_2(1-p) \text{ bits per use},

where H(p)H(p) is the binary entropy function. For p=0.01p = 0.01, C≈1−0.081=0.919C \approx 1 - 0.081 = 0.919 bits per use, which matches Shannon's 1,000-symbol example. For p=1/2p = 1/2, the output is independent of the input and C=0C = 0.

Bandwidth, power, and noise

White Gaussian noise is random noise whose sizes follow a bell curve and whose power is spread evenly across all frequencies. The Shannon-Hartley theorem gives the capacity of a channel with bandwidth WW hertz, average signal power PP, and white Gaussian noise power NN:[11]

C=Wlog⁡2(1+PN) bits per secondC = W\log_2\left(1 + \frac{P}{N}\right) \text{ bits per second}

The ratio P/NP/N is the signal-to-noise ratio. When P=NP = N, the capacity equals WW bits per second. Capacity grows in proportion to bandwidth but only with the logarithm of the signal-to-noise ratio.

Hartley's name is attached to the formula through a counting argument called Hartley's rule, but Rioul and Magossi note that Hartley's 1928 paper never mentions signal versus noise.[11] At least seven authors derived similar formulas independently in 1948.[11]

Error-correcting codes in practice

Coding theory designs the codes that the coding theorem promises exist. For about half a century, its central goal was practical codes that come close to capacity on well-understood channels.[12] Turbo codes and the rediscovery of low-density parity-check codes reached that goal in many practical cases by the mid-2000s.[12]

Code family Introduced Key point
Hamming codes 1950, Richard Hamming Correct any single error; the (7, 4) code appears in Shannon's 1948 paper[12][13]
BCH and Reed-Solomon codes 1959 to 1960, three independent papers Reed-Solomon codes work well against bursts of errors[12]
Low-density parity-check (LDPC) codes 1960, Robert Gallager Decoded by passing messages on a graph, the first appearance of the sum-product algorithm[12][14]
Turbo codes 1993, Claude Berrou, Alain Glavieux, Punya Thitimajshima Error correction near the Shannon limit[15]
Polar codes 2009, Erdal Arıkan Proven to reach capacity on symmetric binary-input channels without memory[16]

Modern mobile networks use these codes. In 5G NR, LDPC codes carry user data and polar codes carry control information, replacing the convolutional and turbo codes of 4G LTE.[17] The broader practice is covered under error detection and correction.

Why the theorems work: typical sequences

Both main theorems rest on the asymptotic equipartition property. For a sequence x1,…,xnx_1, \dots, x_n of nn symbols, the sample entropy is

−1nlog⁡2p(x1,…,xn).-\frac{1}{n}\log_2 p(x_1,\dots,x_n).

For long sequences, almost all sequences that occur are typical, meaning their sample entropy is close to HH, and there are about 2nH2^{nH} of them.[3] This set is called the typical set.

Compression follows directly. Shannon's first proof of the source coding theorem splits all sequences of nn symbols into a high-probability group with fewer than 2(H+η)n2^{(H+\eta)n} members and a remainder with total probability less than μ\mu, where η\eta and μ\mu both shrink toward zero as nn grows.[1] Indexing only the typical sequences takes about nHnH bits, or HH bits per symbol.

The channel side uses the same idea. Capacity is the logarithm of the number of input signals that stay distinguishable after noise.[3] Choosing codewords whose noisy versions do not overlap is like packing spheres in a space with many dimensions.[3]

History

Before 1948

Shannon wrote that a basis for his theory was contained in papers by Harry Nyquist (1924) and Ralph Hartley (1928).[4] Both men worked at Bell Labs.[4] Warren Weaver also traced the ideas back to Boltzmann's 1894 observation, pointed out by John von Neumann, that entropy is related to missing information.[4]

Shannon's paper

Shannon's paper appeared in the Bell System Technical Journal in 1948 and was reprinted as a book with Weaver in 1949.[11] It extended earlier work to include channel noise and the savings possible from the statistical structure of messages.[1] The practical spur was the telephone system, especially how to carry as many conversations as possible over existing cables.[2]

Shannon said communication theory owed a great debt to Norbert Wiener for much of its basic philosophy. Wiener in turn credited Shannon with independently developing the entropy ideas.[4]

Growth of the field

The theory spread quickly after 1948 to fields such as art and business. In a 1956 editorial titled "The Bandwagon," Shannon warned against applying it to every problem and field.[2]

Timeline of information theory, 1920 to 2010 1920193019401950196019701980199020002010 1924 Nyquisttelegraph speed 1948 ShannonA Mathematical Theoryof Communication 1950Hamming codes 1959 Shannonrate-distortiontheorems 1977 Lempel-Zivcompression 2009 Polar codes(Arikan) 1928 HartleyTransmission ofInformation 1949 Shannonsecrecy systems 1952 Huffmancoding 1960 GallagerLDPC codes 1993 Turbo codes
Milestones in information theory from 1920 to 2010. Shannon's 1948 paper, marked in red, sits among the early results of Nyquist and Hartley and the coding and compression methods that came after it.

The history of information theory page covers these events in more depth.

Connections to other fields

Information theory overlaps physics, mathematics, electrical engineering, and computer science.[3]

  • Physics: in statistical mechanics, entropy is roughly the logarithm of the number of ways a physical system can be arranged.[3]
  • Computer science: Kolmogorov, Chaitin, and Solomonoff defined the complexity of a data string as the length of the shortest program that prints it. For a sequence drawn at random from a distribution with entropy HH, this complexity is about HH.[3] This is the core of algorithmic information theory.
  • Probability and statistics: the chance that nn observations land in a rare set of outcomes is about 2−nD2^{-nD}, where DD is the relative entropy between the closest distribution in that set and the true distribution.[3] Relative entropy also sets the best error exponent in hypothesis tests, which is how fast the error probability shrinks as nn grows.[3]
  • Economics: in a horse race with uniform odds, the best growth rate of wealth plus the entropy of the race is constant, and side information raises the growth rate by exactly the mutual information.[3] See gambling and information theory.
  • Cryptography: in 1949 Shannon showed that perfect secrecy needs at least as many possible keys as possible messages, which the one-time pad meets.[18] This is the basis of information-theoretic security.
  • Machine learning: most modern neural networks are trained by maximum likelihood, which means minimizing the cross-entropy between the training data and the model's distribution.[19]
  • Quantum physics: quantum information theory studies sending information with quantum systems, and research on it began in the 1960s.[20]

References

  1. A Mathematical Theory of Communication, C. E. Shannon, Bell System Technical Journal, 1948.
  2. Information theory, Encyclopaedia Britannica.
  3. Elements of Information Theory, 2nd edition, T. M. Cover and J. A. Thomas, Wiley, 2006.
  4. The Mathematical Theory of Communication, C. E. Shannon and W. Weaver, University of Illinois Press, 1963.
  5. Probability and Information Theory, I. Goodfellow, Y. Bengio and A. Courville, Deep Learning, MIT Press, 2016.
  6. Entropy, Relative Entropy and Mutual Information, T. M. Cover and J. A. Thomas, Elements of Information Theory, Wiley, 1991.
  7. A Method for the Construction of Minimum-Redundancy Codes, D. A. Huffman, Proceedings of the IRE, 1952.
  8. A universal algorithm for sequential data compression, J. Ziv and A. Lempel, IEEE Transactions on Information Theory, 1977.
  9. Milestones: Lempel-Ziv Data Compression Algorithm, 1977, Engineering and Technology History Wiki, IEEE.
  10. Coding Theorems for a Discrete Source With a Fidelity Criterion, C. E. Shannon, IRE National Convention Record, 1959.
  11. Shannon's formula and Hartley's rule: A mathematical coincidence?, O. Rioul and J. C. Magossi, HAL open archive, 2019.
  12. Channel Coding: The Road to Channel Capacity, D. J. Costello and G. D. Forney, Proceedings of the IEEE, 2007.
  13. Error Detecting and Error Correcting Codes, R. W. Hamming, Bell System Technical Journal, 1950.
  14. Low density parity check codes, R. G. Gallager, Sc.D. thesis, Massachusetts Institute of Technology, 1960.
  15. Near Shannon limit error-correcting coding and decoding: Turbo-codes, C. Berrou, A. Glavieux and P. Thitimajshima, Proceedings of ICC '93, IEEE, 1993.
  16. Channel polarization: A method for constructing capacity-achieving codes for symmetric binary-input memoryless channels, E. Arıkan, IEEE Transactions on Information Theory, 2009.
  17. An overview of channel coding for 5G NR cellular communications, APSIPA Transactions on Signal and Information Processing, Cambridge University Press, 2019.
  18. Communication Theory of Secrecy Systems, C. E. Shannon, Bell System Technical Journal, 1949.
  19. Deep Feedforward Networks, I. Goodfellow, Y. Bengio and A. Courville, Deep Learning, MIT Press, 2016.
  20. Quantum Shannon Information Theory: Design of communication, cipher and sensor, arXiv, 2025.

Figure

Subtopics

A Mathematical Theory of CommunicationA Mind at PlayAdjusted mutual informationAlexander HolevoAlgorithmic information theoryAndrew ViterbiApoorva D. PatelAsymptotic equipartition propertyAubrey William IngletonBar productBenjamin SchumacherBinary erasure channelBinary symmetric channelBitBlackwell channelBlahut-Arimoto algorithmBretagnolle–Huber inequalityChannel capacityClassical capacityClaude BerrouClaude E. Shannon AwardClaude ShannonCoding theoryCommunication channelCommunication theory (engineering)Computationally bounded adversaryConstraint (information theory)Cross-entropyData compressionDavid A. HuffmanDavid J. C. MacKayDavid SlepianDistributed source codingDual total correlationEb/N0Ed PosnerEffective complexityElements of Information TheoryElias-Bassalygo boundEmre TelatarEntropic vectorEntropy (information theory)Entropy (journal)Entropy codingErasure codeErdal ArıkanError detection and correctionError exponentError-correcting codes with feedbackFlemming TopsøeGambling and information theoryGraph entropyGroup testingGustave SolomonHamming codeHenry LandauHistory of information theoryHubert YockeyIEEE Richard W. Hamming MedalIEEE Transactions on Information TheoryImre CsiszarIncompressibility methodInfo-metricsInformationInformation algebraInformation bottleneck methodInformation diagramInformation fluctuation complexityInformation gain ratioInformation projectionInformation source (mathematics)Information theory and measure theoryInformation-theoretic securityIntegrated information theoryIrving S. ReedJack WolfJacob ZivJames MasseyJessie MacWilliamsJohn Larry Kelly Jr.John R. PierceJoint source and channel codingJorma RissanenJoseph Kampé de FérietJuan Gualterio RoedererKeith DevlinKraft–McMillan inequalityKrichevsky–Trofimov estimatorKullback-Leibler divergenceKullback's inequalityLempel–Ziv complexityLog sum inequalityMarcel J. E. GolayMarkov information sourceMaximum entropy probability distributionMichael LubyMinimum description lengthMutual informationNetwork information theoryNeural codingNoisy channel modelNoisy-channel coding theoremPatrick Hayden (scientist)Permutation codePerplexityPeter EliasQuantities of informationQuantum capacityQuantum informationQuantum information scienceRalph HartleyRamon MargalefRate-distortion theoryRay SolomonoffRichard HammingRobert FanoRobert G. GallagerRobert McElieceRolf LandauerRudolf AhlswedeSelf-dissimilaritySequence logoShannon capacity of a graphShannon-Hartley theoremShannon–Weaver modelShannon's source coding theoremShearer's inequalitySolomon KullbackSource-channel separation theoremStochastic chains with memory of variable lengthSurprisal theoryThomas M. CoverTotal correlationTransfer entropyTriangular network codingTypical setUlam's gameVera PlessZ-channel (information theory)Zipf's lawZyablov bound