ScalingMatrix

ScalingMatrix[{sx, sy, ...}]
gives the matrix corresponding to scaling by a factor along each coordinate axis.

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

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Scaling by factors , , and along the , , and directions:

In[1]:=
Click for copyable input
Out[1]//MatrixForm=
In[2]:=
Click for copyable input
Out[2]=

Scaling by a factor along the direction of the vector :

In[1]:=
Click for copyable input
Out[1]//MatrixForm=
In[2]:=
Click for copyable input
Out[2]=
New in 6
New to Mathematica? Find your learning path »
Have a question? Ask support »