Home page for accesible maths 6 Linear transformations

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

6.2. Linear transformations versus matrices

The purpose of this section is to emphasize the following correspondence:

Linear transformations T Composition of functions, T∘S T⁢(xy) ⟷ 
Matrices
A
Matrix multiplication, ⁢ A B
⁢ ( a 11 a 12 a 21 a 22 ) ( x y )

For every linear transformation we will assign exactly one matrix to it (Definition 6.2.5), and for every matrix there is exactly one linear transformation which it defines (Example 6.1). This type of correspondence is called a bijection or a bijective correspondence, and above this is indicated by the two-way array ↔.

An advantage of writing transformations using matrices is that it makes some computations easier; for example, composition of maps is given by matrix multiplication. If TA,TB are transformations with matrices A,B respectively, then the composition TA∘TB is equal to TA⁢B. This is, in fact, the reason why matrix multiplication is defined the way it is.

Recall that composition of maps reads right to left, i.e. TA∘TB means ‘first do TB, then TA’. This matters because in general TB∘TA≠TA∘TB. For convenience, we often write TA⁢TB instead of TA∘TB.

Example 6.2.1.

  • Consider the following matrices:

    A:=(1201),B:=(03-10).

    Then their associated linear transformations can be written as

    TA⁢(x,y)=(x+2⁢y,y),TB⁢(x,y)=(3⁢y,-x).

    Let’s calculate the composition:

    (TA∘TB)⁢(x,y)=TA⁢(3⁢y,-x)=(3⁢y-2⁢x,-x).

    This is the linear transformation associated to the matrix A⁢B=(-23-10), as expected.

Throughout this section, we consider the Euclidean plane ℝ2, and transformations ℝ2→ℝ2. But you should know that linear transformations ℝn→ℝm correspond to m×n matrices in exactly the same way. We will look at the M2⁡(ℝ) case because it is easiest to visualise.

The standard basis vectors of ℝ2 are {e1,e2} (See Definition 1.4.8). So we have already two equivalent ways of writing the same vector, given by the left and right hand sides of the following equation:

(ab)=a⁢e1+b⁢e2.

We will use the following notation for points in ℝ2:

(a,b)∈ℝ2.

Notice this notation is different from the 1×2 matrix (ab) because of the comma.

Remark 6.2.2.

Points and vectors in ℝn can be identified with each other. Explicitly, a point P=(x,y) corresponds to the vector from O to P, O⁢P→=(xy), where O=(0,0) (see Figure 4). Thus, the convention is that we write the coordinates of points horizontally with commas between them, and the vectors vertically, as column vectors. In practice, it is usually okay to equate the two in your head. We use the notation to emphasize the different perspectives of “vectors” versus “points”, and it is common to switch between the two.

Figure 4. The vector and point corresponding to the pair (a,b)∈ℝ2
Proposition 6.2.3.

Let T1,T2:R2→R2 be linear transformations. Then the composition T2⁢T1 is also a linear transformation.

Proof.

Let λ∈ℝ and pick any vectors v,w∈ℝ2. We have

T2⁢T1⁢(v+w) =T2⁢(T1⁢(v+w))=T2⁢(T1⁢(v)+T1⁢(w))  ⁢since T1 is linear
=T2⁢(T1⁢(v))+T2⁢(T1⁢(w))  ⁢since T2 is linear
=T2⁢T1⁢(v)+T2⁢T1⁢(w)
and
T2⁢T1⁢(λ⁢v) =T2⁢(T1⁢(λ⁢v))=T2⁢(λ⁢T1⁢(v))  ⁢since T1 is linear
=λ⁢T2⁢(T1⁢(v))  ⁢since T2 is linear
=λ⁢T2⁢T1⁢(v)

which proves that LT1 and LT2 hold. ∎

Theorem 6.2.4.

Any linear transformation of R2 is determined by its effect on the standard basis vectors e1 and e2. In other words, a linear transformation T is entirely known if T⁢(e1) and T⁢(e2) are given.

Proof.

Since any vector can be written in the form a⁢e1+b⁢e2, where a,b∈ℝ, by linearity we have T⁢(a⁢e1+b⁢e2)=a⁢T⁢(e1)+b⁢T⁢(e2). ∎

Definition 6.2.5.

Given a linear transformation T of ℝ2, and let a11,a12,a21,a22∈ℝ be defined as

T⁢(e1)=a11⁢e1+a21⁢e2 and T⁢(e2)=a12⁢e1+a22⁢e2.

The matrix A=(a11a12a21a22) is called the matrix associated to the linear transformation T.

Remark 6.2.6.
  • •

    There is nothing special about the ℝ2 case here; this definition could be generalised to higher dimensions.

  • •

    In fact, A is the matrix of T with respect to the standard basis {e1,e2} of R2. In more general situations, such as in MATH220, one could use a different basis, which would produce a different matrix.

  • •

    We will also say that T is the linear transformation given by the matrix A.

Theorem 6.2.7.

Let A, B be the matrices of the linear transformations T and S of R2. Then

  1. (i)

    T⁢(xy)=(a11a12a21a22)⁢(xy)=A⁢(xy).

  2. (ii)

    A⁢B (matrix multiplication) is the matrix of the linear transformation T∘S.

Proof.

We have that (xy)=x⁢e1+y⁢e2. Thus

T⁢(x⁢e1+y⁢e2) =x⁢T⁢(e1)+y⁢T⁢(e2)  ⁢by linearity
=x⁢(a11⁢e1+a21⁢e2)+y⁢(a12⁢e1+a22⁢e2)  ⁢by Definition 6.2.5
=(x⁢a11+y⁢a12)⁢e1+(x⁢a21+y⁢a22)⁢e2
=(a11⁢x+a12⁢ya21⁢x+a22⁢y)=(a11a12a21a22)⁢(xy)  ⁢by Definition 1.3.1.

This proves part (i).

For part (ii), let C be the matrix of T∘S, which is a linear transformation by Proposition 6.2.3. So

T⁢(S⁢(e1))=(T∘S)⁢(e1)=c11⁢e1+c21⁢e2.

On the other hand, we have that

T⁢(S⁢(e1)) =T⁢(b11⁢e1+b21⁢e2)  ⁢since B is the matrix for S
=b11⁢T⁢(e1)+b21⁢T⁢(e2)  ⁢by linearity of T
=b11⁢(a11⁢e1+a21⁢e2)+b21⁢(a12⁢e1+a22⁢e2)
=(a11⁢b11+a12⁢b21)⁢e1+(a21⁢b11+a22⁢b21)⁢e2.

Equating coefficients of e1, we find that c11=a11⁢b11+a12⁢b21, while equating coefficients of e2, we get c21=a21⁢b11+a22⁢b21. A similar calculation for T⁢(S⁢(e2)) gives expressions for c12 and c22 in terms of a11,…,a22 and b11,…,b22, and in all four cases we see that ci⁢j is equal to the (i,j) coefficient of the matrix product A⁢B defined in Definition 1.4.1; that is, C=A⁢B. ∎

Proposition 6.2.8 (Rotation transformations).

In coordinates, anticlockwise rotation through the angle θ is given by

Rθ⁢(x,y)=(x⁢cos⁡θ-y⁢sin⁡θ , x⁢sin⁡θ+y⁢cos⁡θ) for all (x,y)∈ℝ2. 

So a rotation around the origin is represented by the matrix

Rθ=(cos⁡θ-sin⁡θsin⁡θcos⁡θ).

In particular, it is a linear transformation.

Proof.

Assume the vector v=(xy) makes an angle α above the positive x-axis. The length of v is r=x2+y2 (see Definition 1.3.5), so we can use polar coordinates to write P=(x,y)=(r⁢cos⁡α,r⁢sin⁡α). When P′ is written in polar coordinates, it makes an angle α+θ with the x-axis, so we have P′=(x′,y′)=(r⁢cos⁡(α+θ),r⁢sin⁡(α+θ)). Now we can use trigonometric identities as follows:

x′ =r⁢cos⁡(α+θ)=r⁢(cos⁡θ⁢cos⁡α-sin⁡θ⁢sin⁡α)
=(r⁢cos⁡α)⁢cos⁡θ-(r⁢sin⁡α)⁢sin⁡θ
=x⁢cos⁡θ-y⁢sin⁡θ
and
y′ =r⁢sin⁡(α+θ)=r⁢(sin⁡θ⁢cos⁡α+cos⁡θ⁢sin⁡α)
=(r⁢cos⁡α)⁢sin⁡θ+(r⁢sin⁡α)⁢cos⁡θ
=x⁢sin⁡θ+y⁢cos⁡θ.

This proves the results. ∎

Proposition 6.2.9 (Reflection transformations).

In coordinates, the reflection about the line lθ, whose angle above the x-axis is θ, is given by

Hθ⁢(x,y)=(x⁢cos⁡2⁢θ+y⁢sin⁡2⁢θ,x⁢sin⁡2⁢θ-y⁢cos⁡2⁢θ) for all (x,y)∈ℝ2. 

So it may be represented by the matrix

Hθ=(cos⁡2⁢θsin⁡2⁢θsin⁡2⁢θ-cos⁡2⁢θ).

In particular, it is a linear transformation.

Proof.

Let P′=(x′,y′) be the image of P=(x,y)∈ℝ2, as in Figure 3. If the vector corresponding to P makes an angle α above the x-axis, then the angle between l and v is θ-α. Therefore, P′ is obtained from P by a rotation through 2⁢(θ-α). So the angle P′ makes with the x-axis is 2⁢(θ-α)+α=2⁢θ-α. Therefore, using trigonometric identities and polar coordinates (see the rotational case above),

x′ =r⁢cos⁡(2⁢θ-α)=r⁢(cos⁡2⁢θ⁢cos⁡α+sin⁡2⁢θ⁢sin⁡α)
=x⁢cos⁡2⁢θ+y⁢sin⁡2⁢θ
and
y′ =r⁢sin⁡(2⁢θ-α)=r⁢(sin⁡2⁢θ⁢cos⁡α-cos⁡2⁢θ⁢sin⁡α)
=x⁢sin⁡2⁢θ-y⁢cos⁡2⁢θ.

∎

Now we have seen the examples of the rotation around the origin, and of a reflection about a line. We found that for any angle θ∈[0,2⁢π), they are represented by the matrices

Rθ=(cos⁡θ-sin⁡θsin⁡θcos⁡θ) and Hθ=(cos⁡2⁢θsin⁡2⁢θsin⁡2⁢θ-cos⁡2⁢θ).

We showed this by using trigonometric identities. But there is a faster geometric way: consider the Figures 2 and 3, and see where e1 and e2 are mapped:

Rθ⁢(e1)=(cos⁡θsin⁡θ), Rθ⁢(e2)=(-sin⁡θcos⁡θ)
Hθ⁢(e1)=(cos⁡2⁢θsin⁡2⁢θ), Hθ⁢(e2)=(sin⁡2⁢θ-cos⁡2⁢θ).

So the matrices we found in Propositions 6.2.8 and 6.2.9 are correct.

Example 6.2.10.

  • Prove that we have the equality Rπ/3⁢H0=Hπ/6.

  • Solution: The LHS is the composition of the reflection about the x-axis followed by the anticlockwise rotation through π3, while the RHS is the reflection about the line which makes an angle π6 with the x-axis. To prove the claim, let us calculate with their associated matrices:

    Rπ/3⁢H0=(12-323212)⁢(100-1)=(123232-12)=(cos⁡π3sin⁡π3sin⁡π3-cos⁡π3)=Hπ/6.

    Their associated matrices are equal, and therefore these linear transformations are equal.