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:

Wolfram Research (2007), ScalingMatrix, Wolfram Language function, https://reference.wolfram.com/language/ref/ScalingMatrix.html.

Text

Wolfram Research (2007), ScalingMatrix, Wolfram Language function, https://reference.wolfram.com/language/ref/ScalingMatrix.html.

CMS

Wolfram Language. 2007. "ScalingMatrix." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ScalingMatrix.html.

APA

Wolfram Language. (2007). ScalingMatrix. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ScalingMatrix.html

BibTeX

@misc{reference.wolfram_2024_scalingmatrix, author="Wolfram Research", title="{ScalingMatrix}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/ScalingMatrix.html}", note=[Accessed: 03-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_scalingmatrix, organization={Wolfram Research}, title={ScalingMatrix}, year={2007}, url={https://reference.wolfram.com/language/ref/ScalingMatrix.html}, note=[Accessed: 03-December-2024 ]}