Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Visualization and Graphics > Computational Geometry > Geometric Transforms >
Mathematica > Visualization and Graphics > Symbolic Graphics Language > Graphics Transformations > Geometric Transforms >

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.
Scaling by factors a, b and c along the x, y and z directions:
Scaling by a factor s along the direction of the vector {1,-1}:
Scaling by factors a, b and c along the x, y and z directions:
In[1]:=
Click for copyable input
Out[1]//MatrixForm=
In[2]:=
Click for copyable input
Out[2]=
 
Scaling by a factor s along the direction of the vector {1,-1}:
In[1]:=
Click for copyable input
Out[1]//MatrixForm=
In[2]:=
Click for copyable input
Out[2]=
Scaling factors can be negative or zero:
Transformation applied to a 2D shape:
Transformation applied to a 3D shape:
Create an ellipsoid:
Display projection of a 3D graphic:
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 s1CenterEllipsis sn :
The inverse of ScalingMatrix[{s1, ..., sn}] is given by ScalingMatrix[{1/s1, ..., 1/sn}]:
Repeated scalings in different directions:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team