# Compositions of linear transformations

Compositions of linear transformations is about treating multiple linear transformations in sequence. For instance, let's say that $T$, $R$ and $S$ are linear transformations. A composition is then, for example, the output $y$ of the vector $x$ for $$T \circ R \circ S(x) = y$$ ## Intro

The use of optical lenses and glass discs that bend light rays, makes it possible to zoom in and out with a camera, while maintaining the picture's sharpness. This zooming is a form of linear transformation of the photo. Optical lenses are somewhat problematic though. Since the light is bent differently depending on its color, pictures taken with a single lens will appear blurred.

Therefore, a camera lens is composed of multiple optical lenses placed in series to correct for distortion. Consequently, the final picture captured by a camera can be viewed as a composition of linear transformations.

## Concept

Since the product of multiplying a vector by a matrix is a new vector, there is nothing stopping us from multiplying such resulting vector by a second matrix to form a third vector.

Alternatively, this vector can be obtained by first multiplying the two matrices, hence forming a single matrix to multiply the initial vector by.

Matrices we use to multiply vectors constitute linear transformations. A matrix constructed as a product of two separate matrices form a composition of two linear transformations.

A composition of linear transformations performs multiple linear transformations all at once

This concept is not limited to two matrices, and can be extended to any number of individual linear transformations.

## Math

If we let and refer to two linear transformations, and we want to apply followed by to the vector , then the equation of the composite linear transformation looks as follows:

Now it does not matter in which order we carry out the calculations.

Hence, we can write as a single linear transformation by defining :

Note, however, that matrix multiplications are not necessarily commutative, which means we must pay attention to the order of and

Following this template, we can form a composition of any number of linear transformations as

## Compositions

A composition of two linear transformations refers to performing two linear transformations at the same time. Take the example that is a rotation and is a reflection, according to:

then the composite linear mapping would be:

For the arbitrary vector , we first perform a rotation and then a reflection (execution takes place from right to left, and you read this as S circle R). Let the standard matrices and apply to the respective transformations. Then we have that the composite standard matrix is:

such that:

This also applies analogously to the composition of linear transformations. Then we have that the default matrix for:

becomes:

Since matrix multiplication depends on the order and one can not assume that the multiplication is commutative (AB = BA), it applies analogously to linear transformations.

### Example

Let be the rotation with angle and be the reflection of the line . Then we have the two vectors and as shown below:   