# Scaling

← Back: Translation |
Overview: Transformations |
Next: Rotation → |

Scaling shifts coordinates similar to translation. The difference is, that translation is independent of the current coordinates. Scaling however shifts the coordinates depending on the current values. So the same transformation matrix has various effects on different vectors.

For the sake of simplicity scaling is explained in two-dimensional space. But the behavior of the parameters is the same for an additional third dimension. Scaling is achieved by modifying the components and on the first diagonal of the transformation matrix , while the other components are zero:

The computation of scaling looks as follows in coordinate notation:

So the values and act as factors for the x- and the y-component of the scaled vector.

Several different cases for and can be considered. The following transformation matrices show some of the possible cases, that achieve different scaling results (see figure):

is the identity matrix → no effect

x-component is scaled up → vector is shifted to positive x-direction

x- and y-component are scaled up → vector is shifted diagonally to positive x- and y-direction

y-component is inverted → vector is reflected on x-axis to negative y-direction

x-component is scaled down → vector is shifted closer to y-axis

**Example:***Various scaling examples*