Skip to content

Mu-Law Companding

A logarithmic companding law that allocates finer quantization resolution to small signal amplitudes and coarser resolution to large amplitudes, with an inverse expander at decoding.

Version
v2 · 2026-09-06 · History
Domain-specific #
2321
Origin domain
telecommunications
Subdomain
pulse code modulation
Aliases
Μ-law, U-law, Mu-law algorithm, G.711 mu-law

Core Idea

Mu-law companding maps a normalized signal amplitude \(x\in[-1,1]\) through a signed logarithmic compressor before uniform quantization:

\[ F(x)=\operatorname{sgn}(x) \frac{\ln(1+\mu|x|)}{\ln(1+\mu)}. \]

The receiver applies the inverse expansion

\[ F^{-1}(y)=\operatorname{sgn}(y) \frac{(1+\mu)^{|y|}-1}{\mu}. \]

Because the compressor has greater slope near zero, equal steps in the compressed domain correspond to small linear-amplitude steps for quiet signals and larger steps for loud signals. The law thus improves effective signal-to-quantization-noise behavior over a wide speech range at fixed code width. The standardized telephony form uses \(\mu=255\) and an eight-bit piecewise encoding specified by ITU-T G.711.[1]

Structural Signature

  • Signed bounded input: a linear PCM or normalized amplitude with preserved sign.
  • Positive companding parameter: \(\mu\) controls curvature; G.711 uses 255.
  • Logarithmic compressor: magnitude is transformed monotonically with high slope near zero.
  • Uniform-domain quantizer: compressed values receive equal code intervals.
  • Inverse expander: decoded magnitudes approximately restore the linear scale.
  • Nonuniform effective quantization: small amplitudes receive finer linear resolution.
  • Finite code format: standardized segment and mantissa bits implement the curve approximately.
  • Round-trip loss: quantization prevents exact inversion even though the analytic compressor is invertible.
  • Law boundary: A-law uses a different piecewise logarithmic characteristic.

Recognition test. Identify the logarithmic signed compressor, the corresponding inverse expansion, and the use of uniform quantization between them. A standalone log-amplitude display or dynamic-range compressor without decoder expansion is not mu-law companding.

What It Is Not

Mu-law is not general-purpose lossless data compression. It changes amplitude resolution and is lossy after quantization. It does not reduce the G.711 sample rate or exploit temporal redundancy.

It is not an audio loudness compressor with attack, release, threshold, and ratio. Such devices vary gain over time to control levels. Mu-law is a memoryless sample-by-sample transfer characteristic paired with inverse expansion.

It is not A-law. Both are G.711 companding laws, but their segment definitions, near-zero behavior, and bit mappings differ. It is also not arbitrary logarithmic encoding: the normalized formula, parameter, inverse, and telephony code mapping jointly fix identity.

Scope of Application

The canonical deployment is eight-bit PCM for voice-frequency telephony. G.711 specifies a nominal 8000 samples per second and two companding laws, mu-law and A-law.[1] Mu-law has historically been associated with North American and Japanese systems. The standard's exact code words, sign handling, bias, segment selection, and bit inversion matter for interoperability.

The analytic law is also used as a pedagogical and computational model of nonuniform quantization.[2] In machine learning and digital audio datasets, “mu-law encoding” may transform waveform samples into a discrete set of amplitude classes. Such uses instantiate the same compressor/quantizer logic but may not be bit-compatible with G.711.

Modern higher-bit-depth audio often uses linear PCM because adequate resolution makes companding unnecessary. Mu-law remains valuable where legacy interfaces, bandwidth, or specific signal distributions favor it.

Interchange testing should include positive and negative zero neighborhoods, segment boundaries, overload endpoints, and every reserved or exceptional code required by the selected specification. A mathematically monotone implementation can still be wire-incompatible if its bias, complementing convention, or endpoint decision differs. The abstraction therefore has an analytic layer and a discrete interoperability layer; both must be named when results are compared.

Clarity

For \(\mu>0\), \(F(0)=0\), \(F(1)=1\), and \(F(-x)=-F(x)\). Its derivative for positive \(x\) is

\[ F'(x)=\frac{\mu}{(1+\mu x)\ln(1+\mu)}, \]

which decreases with amplitude. Near zero, the large derivative expands small input differences before quantization. The inverse correspondingly compresses code-space error near zero back to a small linear error.

The continuous formula describes the law's geometry. G.711's actual encoder is a piecewise, finite-word mapping. Treating the formula and the bit-exact standard as identical can cause off-by-one, sign, or codeword errors.

Manages Complexity

One monotone transform lets a uniform quantizer behave like a nonuniform quantizer.[3] Hardware or software can quantize equal compressed intervals while allocating linear-domain precision according to amplitude. This avoids storing an arbitrary nonuniform threshold table in the conceptual model.

The compression also approximates a roughly constant ratio of quantization step to signal magnitude over much of the range, which suits speech's large dynamic range. The price is larger absolute error for high-amplitude samples and irreversible quantization noise.

The abstraction says nothing about antialias filtering, sampling, packetization, channel coding, or perceptual codecs. Those pipeline stages remain separate.

Abstract Reasoning

The compressor is strictly increasing and odd, so it preserves order and sign. Substituting the inverse verifies

\[ F^{-1}(F(x))=x \]

before quantization. Let compressed quantizer step be \(\Delta_y\). A first-order linear-domain step near \(x\) is

\[ \Delta_x\approx\frac{\Delta_y}{F'(x)} =\Delta_y\frac{(1+\mu|x|)\ln(1+\mu)}{\mu}. \]

Thus effective linear resolution grows approximately with amplitude. At \(x=0\), it is finest; near full scale it is coarsest. This calculation is the mechanism, not merely an appeal to logarithmic hearing.

As \(\mu\to0\), the limit of \(F(x)\) is \(x\), so mu-law continuously approaches linear encoding.

The continuous curve and the digital code are distinct layers. A mathematical compander specifies a nonlinear amplitude map and its inverse; a telephony implementation also specifies segment boundaries, quantization intervals, sign handling, bit conventions, and transmission format. Two implementations can share the mu-law curve yet differ at code-word boundaries. Conversely, merely using a logarithmic quantizer does not establish conformance to the standardized mu-law encoding. Keeping these layers separate prevents equations from being mistaken for a complete codec specification.

Knowledge Transfer

The same law transfers from telephony PCM to waveform-class encoding when samples are normalized and the transform/quantize/invert roles remain literal. The implementation may use different bin counts, but changing \(\mu\), normalization, or code format must be documented.

The intuition transfers to logarithmic sensors and perceptual encodings only at a broader level. Those are not mu-law unless they use this characteristic or its standardized discrete approximation.

Examples

  1. Quiet speech sample. A small amplitude is expanded strongly in compressed space and receives relatively fine linear resolution.
  2. Full-scale sample. It maps to a code near magnitude one, with a larger effective linear quantization interval.
  3. Round trip without quantization. Applying \(F\) and then \(F^{-1}\) returns the input exactly.
  4. G.711 encoder. A linear PCM sample is biased, segmented, quantized into an eight-bit word, and inverted by the specified decoder tables.
  5. Machine-learning waveform class. Normalize, mu-law compress, and uniformly quantize to 256 labels; this is structurally related but not automatically G.711 bit-compatible.
  6. Non-example. Taking \(20\log_{10}|x|\) for a level meter has no inverse expansion and is not companding.

Structural Tensions

  • Quiet-signal fidelity vs. loud-signal resolution: precision is redistributed, not created. Diagnostic: plot linear-domain step size against amplitude.
  • Analytic curve vs. standard bit mapping: the formula and G.711 table can differ at code boundaries. Diagnostic: use bit-exact vectors for interoperability.
  • Dynamic range vs. quantization loss: companding handles range but remains lossy. Diagnostic: measure round-trip signal-to-quantization-noise ratio.
  • Perceptual rationale vs. engineering identity: logarithmic intuition motivates the law but does not define every implementation. Diagnostic: verify parameter and mapping.
  • Legacy compatibility vs. modern linear PCM: standard support may outweigh optimality. Diagnostic: separate interface requirements from codec choice.
  • Autonomy vs. Logarithmic Encoding: the parent supplies scale allocation, while mu-law adds a signed invertible characteristic and telephony code. Diagnostic: require compressor and expander.

Structural–Framed Character

The structure is a paired nonlinear transform surrounding quantization. It is framed by sampled-signal engineering: amplitude normalization, sign, quantizer, inverse, and code format are literal.

Its autonomy survives standardization because the transform mechanism recurs independently of one device. Yet a bare G.711 product label without the law's roles is only an implementation reference.

Structural Core vs. Domain Accent

The core is logarithmic allocation of representational resolution. The domain accent is signed audio amplitude and inverse companding around PCM quantization. Removing the inverse yields generic log encoding; removing quantization eliminates the practical reason for the pair.

The candidate is domain-specific because its legitimate uses remain one signal-processing lineage.

Logarithmic Perception and Encoding is the proposed minimal parent: mu-law is a strict logarithmic encoding specialization. Compression is a neighbor, but mu-law's primary invariant is resolution redistribution rather than reduction of sample count. Quantization is an indispensable pipeline component.

Relationships to Other Abstractions

Local relationship map for Mu-Law CompandingParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Mu-Law CompandingDOMAINPrime abstraction: Logarithmic Perception and Encoding — is a kind ofLogarithmic Per…PRIME

Current abstraction Mu-Law Companding Domain-specific

Parents (1) — more general patterns this builds on

  • Mu-Law Companding is a kind of Logarithmic Perception and Encoding Prime

    Logarithmic Perception and Encoding is the proposed minimal parent: mu-law is a strict logarithmic encoding specialization.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Mu-Law Companding sits in a sparse region of the domain-specific corpus (96th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Unclustered & Miscellaneous (1565 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-09-08

Not to Be Confused With

  • A-law: the other G.711 companding characteristic.
  • Linear PCM: uniform quantization directly in amplitude.
  • Dynamic range compressor: time-varying gain control without paired expansion.
  • Logarithmic level meter: display transform rather than encoder/decoder pair.
  • Lossless compression: reversible bit-rate reduction.
  • G.711 as a whole: includes sampling and both A-law and mu-law specifications.

References

[1] International Telecommunication Union, ITU-T Recommendation G.711: Pulse Code Modulation (PCM) of Voice Frequencies, current official record, https://www.itu.int/rec/T-REC-G.711. registry ↩a ↩b

[2] N. S. Jayant and Peter Noll, Digital Coding of Waveforms, Prentice-Hall, 1984, chapters on nonuniform quantization and companding, ISBN 978-0-13-211913-9. registry

[3] John G. Proakis and Dimitris G. Manolakis, Digital Signal Processing, 4th ed., Pearson, 2007, sections on PCM and companding, ISBN 978-0-13-187374-2. registry