Skip to main content
KetQat

Appearance

Theorem · introductory

Gibbs' inequality (nonnegativity of relative entropy)

The relative entropy between two probability distributions is nonnegative and vanishes only when they are equal. Nonnegativity of mutual information, the bound H(X) <= log|X| and the fact that conditioning reduces entropy all follow.

Established resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

For probability distributions pp and qq on a finite set X\mathcal{X},

D(p∥q)  ≥  0,with equality if and only if p=q,D(p \Vert q) \;\ge\; 0, \qquad \text{with equality if and only if } p = q ,

where DD is the relative entropy.

Consequences, for random variables with finite alphabets:

  1. H(X)≤log⁡2∣X∣H(X) \le \log_2 \abs{\mathcal{X}}, with equality iff XX is uniform, because log⁡2∣X∣−H(X)=D(pX∥u)\log_2\abs{\mathcal{X}} - H(X) = D(p_X \Vert u) for the uniform distribution uu;
  2. I(X;Y)≥0I(X; Y) \ge 0, with equality iff XX and YY are independent, because I(X;Y)=D(pXY∥pX⊗pY)I(X; Y) = D(p_{XY} \Vert p_X \otimes p_Y);
  3. H(X∣Y)≤H(X)H(X \mid Y) \le H(X), since the difference is I(X;Y)I(X; Y), and likewise I(X;Y∣Z)≥0I(X; Y \mid Z) \ge 0 by averaging (2) over ZZ.

The statement and these corollaries are in chapter 2 of Cover and Thomas. The quantum analogue, nonnegativity of the quantum relative entropy, is known as Klein's inequality.

Holds when

  • Distributions on a finite set.

Proof

Proof of Gibbs' inequalityMachine-checked

If some xx has p(x)>0=q(x)p(x) > 0 = q(x), then D(p∥q)=+∞>0D(p \Vert q) = +\infty > 0 and p≠qp \ne q. Otherwise let S={x:p(x)>0}S = \{x : p(x) > 0\}. Since log⁡2\log_2 is strictly concave, Jensen's inequality for the probability weights p(x)p(x), x∈Sx \in S, gives

−D(p∥q)=∑x∈Sp(x)log⁡2q(x)p(x)  ≤  log⁡2∑x∈Sp(x)q(x)p(x)=log⁡2∑x∈Sq(x)  ≤  log⁡21=0.-D(p \Vert q) = \sum_{x \in S} p(x) \log_2 \frac{q(x)}{p(x)} \;\le\; \log_2 \sum_{x \in S} p(x) \frac{q(x)}{p(x)} = \log_2 \sum_{x \in S} q(x) \;\le\; \log_2 1 = 0 .

Equality in the first step holds iff q(x)/p(x)q(x)/p(x) takes one value cc on SS, and in the second iff ∑x∈Sq(x)=1\sum_{x \in S} q(x) = 1. Together these give c=1c = 1, i.e. q=pq = p on SS, and q=0q = 0 off SS, so p=qp = q. The corollaries follow from the identities quoted in the statement. This is the proof in chapter 2 of Cover and Thomas.

Mentions

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. Thomas M. Cover, Joy A. Thomas (2005). Elements of Information Theory. Wiley (2nd edition). doi:10.1002/047174882X

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Statement with equality case and the three corollaries re-derived (identities log|X| - H = D(p||u) and I = D(p_XY||p_X p_Y) checked numerically); consistent with Polyanskiy and Wu, Information Theory: From Coding to Learning (authors' open PDF) chapter 2. Cover and Thomas chapter 2 title confirmed via Crossref; Klein's inequality naming is standard.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e

Current revision 566102a6be1a1235. Source file knowledge/records/theorem/gibbs-inequality.md in the content repository (readable there once it is public).