# ScalingMatrix

ScalingMatrix[{sx,sy,}]

gives the matrix corresponding to scaling by a factor si along each coordinate axis.

ScalingMatrix[s,v]

gives the matrix corresponding to scaling by a factor s along the direction of the vector v.

# Details # Examples

open allclose all

## Basic Examples(2)

Scaling by factors a, b, and c along the , , and directions:

Scaling by a factor s along the direction of the vector :

## Scope(3)

Scaling factors can be negative or zero:

Transformation applied to a 2D shape:

Transformation applied to a 3D shape:

## Applications(4)

Create an ellipsoid:

Display projection of a 3D graphic:

Transform a grayscale image by scaling with a factor of :

A pure rescaling of a 3D image:

## Properties & Relations(5)

The determinant of ScalingMatrix[s,v] is s:

The inverse of ScalingMatrix[s,v] is given by ScalingMatrix[1/s,v]:

The determinant of ScalingMatrix[{s1,,sn}] is given by s1 sn:

The inverse of ScalingMatrix[{s1,,sn}] is given by ScalingMatrix[{1/s1,,1/sn}]:

The form ScalingMatrix[{s1,,sn}] is equivalent to DiagonalMatrix[{s1,,sn}]:

## Neat Examples(1)

Repeated scalings in different directions: