76. Scaling Matrix

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

The -th coordinate gets multiplied by :

76.1. Uniform vs non-uniform

Example

.

. The unit circle maps to the ellipse .

76.2. Properties

76.3. Negative scaling

Scaling by 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:

Or, more directly: — adds extra of the projection onto .

76.5. Application to images / graphics

76.6. See also