76. Scaling Matrix

A scaling matrix stretches (or compresses) each coordinate independently. It’s a diagonal matrix:

𝑆=[𝑠1000𝑠2000𝑠𝑛]

The 𝑖-th coordinate gets multiplied by 𝑠𝑖:

𝑆𝑥=[𝑠1𝑥1𝑠2𝑥2𝑠𝑛𝑥𝑛]

76.1. Uniform vs non-uniform

Example

𝑆=[2003].

𝑆[11]=[23]. The unit circle 𝑥2+𝑦2=1 maps to the ellipse (𝑥2)2+(𝑦3)2=1.

76.2. Properties

76.3. Negative scaling

Scaling by 𝑠𝑖<0 flips the 𝑖-th coordinate:

76.4. Scaling in a general direction

To scale by factor 𝑐 along a non-axis direction 𝑣̂, conjugate by a rotation that aligns 𝑣̂ with a coordinate axis:

𝑆𝑣̂,𝑐=𝑅𝑇[𝑐001]𝑅

Or, more directly: 𝑆𝑣̂,𝑐=𝐼+(𝑐1)𝑣̂𝑣̂𝑇 — adds 𝑐1 extra of the projection onto 𝑣̂.

76.5. Application to images / graphics

76.6. See also