Linear TransformationsTopic #29 of 30

Composition of Transformations

Composing transformations, matrix multiplication interpretation, and order matters.

Overview

Composing linear transformations means applying one transformation after another. This corresponds to matrix multiplication, with the order of matrices reversed from the order of application.

Definition

For transformations S:UVS: U \to V and T:VWT: V \to W, the composition is:

(TS)(u)=T(S(u))(T \circ S)(\mathbf{u}) = T(S(\mathbf{u}))

First apply SS, then apply TT.

Composition is Linear

If SS and TT are linear, then TST \circ S is linear:

(TS)(cu+dv)=T(S(cu+dv))=T(cS(u)+dS(v))(T \circ S)(c\mathbf{u} + d\mathbf{v}) = T(S(c\mathbf{u} + d\mathbf{v})) = T(cS(\mathbf{u}) + dS(\mathbf{v}))

=cT(S(u))+dT(S(v))=c(TS)(u)+d(TS)(v)= cT(S(\mathbf{u})) + dT(S(\mathbf{v})) = c(T \circ S)(\mathbf{u}) + d(T \circ S)(\mathbf{v})

Matrix Representation

If SS has matrix AA and TT has matrix BB:

TS has matrix BAT \circ S \text{ has matrix } BA

Note the order: matrices multiply in reverse order of application.

Why Reversed?

(TS)(x)=T(S(x))=B(Ax)=(BA)x(T \circ S)(\mathbf{x}) = T(S(\mathbf{x})) = B(A\mathbf{x}) = (BA)\mathbf{x}

Example

SS is rotation by 90°, TT is scaling by 2:

A=[0110](rotation)A = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} \quad \text{(rotation)}

B=[2002](scaling)B = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} \quad \text{(scaling)}

TST \circ S (first rotate, then scale):

BA=[2002][0110]=[0220]BA = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix}\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} 0 & -2 \\ 2 & 0 \end{bmatrix}

STS \circ T (first scale, then rotate):

AB=[0110][2002]=[0220]AB = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} = \begin{bmatrix} 0 & -2 \\ 2 & 0 \end{bmatrix}

In this case, AB=BAAB = BA (scaling and rotation commute).

Non-Commutativity

In general, TSSTT \circ S \neq S \circ T.

Example

SS = reflection across x-axis, TT = rotation by 90°:

A=[1001],B=[0110]A = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}, \quad B = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}

BA=[0110][1001]=[0110]BA = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}

AB=[1001][0110]=[0110]AB = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} 0 & -1 \\ -1 & 0 \end{bmatrix}

BAABBA \neq AB: order matters!

Properties of Composition

PropertyFormula
Associativity(TS)R=T(SR)(T \circ S) \circ R = T \circ (S \circ R)
IdentityTI=IT=TT \circ I = I \circ T = T
InverseTT1=T1T=IT \circ T^{-1} = T^{-1} \circ T = I (if TT invertible)
Not commutativeTSSTT \circ S \neq S \circ T in general

Inverse Transformation

If TT is invertible (bijective):

T1 exists and T1T=TT1=IT^{-1} \text{ exists and } T^{-1} \circ T = T \circ T^{-1} = I

Matrix form:

A1A=AA1=IA^{-1}A = AA^{-1} = I

Multiple Compositions

For T1,T2,T3T_1, T_2, T_3 with matrices A1,A2,A3A_1, A_2, A_3:

T3T2T1 has matrix A3A2A1T_3 \circ T_2 \circ T_1 \text{ has matrix } A_3 A_2 A_1

Rightmost matrix corresponds to first transformation.

Application: Composite Transformations

Rotate then Scale

To rotate by θ\theta then scale by ss:

[s00s][cosθsinθsinθcosθ]=[scosθssinθssinθscosθ]\begin{bmatrix} s & 0 \\ 0 & s \end{bmatrix}\begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix} = \begin{bmatrix} s\cos\theta & -s\sin\theta \\ s\sin\theta & s\cos\theta \end{bmatrix}

Reflect then Rotate

Reflect across x-axis then rotate by 90°:

[0110][1001]=[0110]\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}

This is reflection across y=xy = x.

Decomposing Transformations

Any transformation can often be decomposed:

  • A=QRA = QR (orthogonal × upper triangular)
  • A=LUA = LU (lower × upper triangular)
  • A=PDP1A = PDP^{-1} (diagonalization)
  • A=UΣVTA = U\Sigma V^T (singular value decomposition)