Chain rule for conditional entropy Created 2026-10-06 Updated 2026-10-14
For classical finite random variables, . Each identity follows by inserting the corresponding joint entropy into . The two orders are particularly useful when one variable is a deterministic function of the others, as in Fano's inequality via an error indicator.
Use logarithms to base two, so all entropies are in bits. For a discrete probability distribution and a density operator with eigenvalues , the Shannon entropy and Von Neumann entropy are respectively
Use . The second definition is basis-independent by the spectral theorem; for a density operator diagonal with probabilities , it agrees with the first.
The classical relative entropy, or Kullback-Leibler divergence, of from is
It is if some has . The quantum relative entropy is
when the support of is contained in that of , and is otherwise. Matrix logarithms are taken on the corresponding positive supports. In a common eigenbasis this reduces to classical relative entropy; both divergences are nonnegative and are generally asymmetric.
To prove Fano's inequality, let the finite alphabet size be and let indicate an incorrect guess. Since is determined by , the chain rule for conditional entropy first gives
Expanding in the opposite order gives
Conditioning reduces entropy, so , the binary entropy function. When , knowledge of determines and the conditional entropy is zero. When , can lie in at most the alphabet values other than . Entropy on values is at most : its deficit from that number is the nonnegative relative entropy from the uniform distribution. Averaging the two cases therefore gives
Combining the two expansions proves
This proof of Fano's inequality via an error indicator works for any alphabet-valued guessing rule, not just an optimal one. If , there is no guessing uncertainty and the claim is simply ; that case is treated separately rather than writing .
Because is determined by , its conditional entropy satisfies . Equate the two forms of the chain rule for conditional entropy to obtain
Conditioning cannot increase classical Shannon entropy: by nonnegativity of mutual information. Thus . When , the value of is exactly and . When and , the value is excluded, leaving at most possibilities. By maximum entropy on a finite alphabet,
Averaging the two conditional cases now yields
and consequently
This is Fano's inequality via an error indicator. Events of zero probability contribute zero to the average and need no conditional distribution. For , the inference is automatically correct and the entropy is zero; the displayed logarithmic form is intended for . Optimality of the guess is not needed for the inequality: it holds for every deterministic .