IGCSE FM Matrix Transformations Dr J Frost (jfrost@tiffin.kingston.sch.uk) www.drfrostmaths.com The specification: Last modified: 3rd January 2016 Introduction A matrix (plural: matrices) is simply an ‘array’ of numbers, e.g. On a simple level, a matrix is simply a way to organise values into rows and columns, and represent these multiple values as a single structure. For the purposes of IGCSE Further Maths, you should understand matrices as a way to transform points. Matrices are particularly useful in 3D graphics, as matrices can be used to carry out rotations/enlargements (useful for changing the camera angle) or project into a 2D ‘viewing’ plane. (Just for Fun) Using matrices to represent data This is a scene from the film Good Will?Hunting. Maths professor Lambeau poses a “difficult”* problem for his graduate students from algebraic graph theory, the first part asking for a matrix representation of this graph. Matt Damon anonymously solves the problem while on a cleaning shift. In an ‘adjacency matrix’, the number in the ith row and jth column is the number of edges directly connecting node (i.e. dot) i to dot j ? * It really isn’t. Using matrices to represent data In my 4th year undergraduate dissertation, I used matrices to help ‘learn’ mark schemes from GCSE biology scripts. Matrix algebra helped me to initially determine how words (and more complex semantic information) tended to occur together with other words. Matrix Algebra Matrix Fundamentals Understand the dimensions of a matrix, and operations on matrices, such as addition, scalar multiplication and matrix multiplication. Matrix Fundamentals #1 Dimensions of Matrices The dimension of a matrix is its size, in terms of its number of rows and columns. Matrix Dimensions 2ο΄3 3ο΄1 ? 1ο΄3 ? Matrix Fundamentals #2 Notation/Names for Matrices A matrix can have square or curvy brackets*. Matrix Column Vector Row Vector (The vector you know and love) So a matrix with one column is simply a vector in the usual sense. * The textbook only uses curvy. Matrix Fundamentals #3 Variables for Matrices If we wish a variable to represent a matrix, we use bold, capital letters. 1 π¨= 6 −3 πͺ = π·π π»π· Matrix Fundamentals #4 Adding/Subtracting Matrices Simply add/subtract the corresponding elements of each matrix. They must be of the same dimension. ? ? Matrix Fundamentals #5 Scalar Multiplication A scalar is a number which can ‘scale’ the elements inside a matrix/vector. 1 2 3 ? ? ? Matrix Fundamentals #6 Matrix Multiplication This is where things get slightly more complicated... Now repeat for the next row of the left matrix... 1 2 7 0 3 -2 8 4 3 -1 0 2 5 1 0 8 1 7 3 -3 -11 42 16 61 50 -6 We start with this row and column, and sum the products of each pair. (1 x 5) + (0 x 1) + (3 x 0) + (-2 x 8) = -11 Further Example June 2012 Paper 1 Q2 = 10 ? 17 Test Your Understanding Now you have a go... a If π΄ = b 1 2 c 1 3 1 1 1 0 2 4 2 0 0 ,π΅ = 3 1 1 π ?π , π΄π΅ = 2 π π π ? 3 = π −1 7 10 = ? 15 22 N N N 1 1 2 3 2 = 14 ? 3 1 1 2 3 2 1 2 3 = 2 4? 6 3 3 6 9 ? Bro Exam Note: In IGCSEFM, you will only have to multiply either a 2 × 2 by 2 × 1 or 2 × 2 by 2 × 1. Identity Matrix 1 0 π Let π° = and π΄ = 0 1 π Determine: π π π πΌπ΄ = π π΄πΌ = π . π π ?π π ?π 1 0 is known as the ‘identity matrix’. 0 1 Multiplying by it has no effect, i.e. π΄πΌ = πΌπ΄ = π΄ for any matrix π΄. ο‘π° = It may seem pointless to have such a matrix, but it’ll have more importance when we consider matrices as ‘transformations’ later. Although admittedly you won’t quite fully appreciate why we have it unless you do Further Maths A Level… Exercise 1 1 ? ? ? ? ? ? 2 ? ? ? ? ? ? 3 ? ? ? ? ? ? Exercise 1 4 ? ? ? ? ? ? 5 ? ? ? ? ? ? 6 ? ? ? ? ? ? Exercise 1 7 ? ? ? ? ? ? Harder Multiplication Questions Matrix multiplications may give us simultaneous equations, which we solve in the usual way. June 2013 Paper 2 Q12 π₯ 2 − 12 4π₯ = π₯ − 4π¦ 8 π₯ 2 − 12 = 4π₯ π₯?2 − 4π₯ − 12 = 0 π₯ = −2 ππ π₯ = 6 π¦ = −2.5 ππ π¦ = −0.5 Test Your Understanding AQA Worksheet 2 π + ππ = ππ → π = π π + ππ = ππ → π=π ?→ π = π π+π=π 22 ο οΆ2οΆ a οΆ ο¦3 ο§ο§ ο·ο· ο·ο· ο·ο· ο9οΈ4οΈ 3 οΈ ο¨7 Exercise 1b 4 1 Set 4 Paper 1 Q17 −π + ππ = ππ ? π=π 2 June 2013 Paper 2 Q11 −π ππ − π π π π π ? ππ + ππ = −π π − ππ = π π = π + ππ ∴ π(π + ππ) + π + ππ π = −π πππ + ππ + π = π ππ + π π + π = π π π = −π ππ π = − π π = −π ππ π = −π ? ? π = −π, π = π, π = π 3 Set 2 Paper 2 Q16 π π π π+π π+π π+π πΈπ· = π π ∴ π = π, π = π π·πΈ = ? Matrices representing transformations Matrices can represent transformations to points in 2D or 3D space. π₯ Let us represent a point as the vector π¦ We can multiply it by a matrix: ππ 2 0 π₯ = ? π¦ ππ 0 2 (Note: You’re used to representing points as coordinates like π₯, π¦ rather than vectors, but it allows us to apply matrix transformations to them more easily in this form) π¦ Important Note: When we multiply by a matrix, it goes on the front, not after. This is a bit like how with composite functions, e.g. ππ(π₯), we applied π to π₯ followed π. We go right to left. What ‘transformation’ therefore does the 2 0 matrix represent? 0 2 An enlargement by scale factor 2 about ? the origin. π₯ π¦ 2π₯ 2π¦ π₯ A further example What transformation does the matrix 0 −1 1 0 0 1 represent? −1 0 π₯ π ? π¦ = −π Step 1: Find the effect π₯ on a point π¦ . Step 2: Draw the old and new point (using a specific example point if you wish) to see the effect. π¦ 3 1 ? π₯ 1 −3 Transformation: Rotation ππ° clockwise about ? the origin. Investigate In pairs or otherwise, determine the transformations that each of these matrices represents. −1 0 0 1 Reflection in the line π = ? π 0 1 1 0 0 −1 Reflection in the line π =?π 0 −1 Rotation πππ° ? origin. about the 1 0 Reflection in the line π=π ? −1 0 0 1 −1 0 Rotation ππ° ? about anticlockwise the origin. 0 −1 1 0 Rotation ππ° clockwise ? about the origin. 1 0 0 1 No effect! ? Going backwards Work out the transformation that transforms a point 270° clockwise about the origin. π¦ −1 3 ? ? 3 π₯1 Use a specific point or π¦ and find the effect of the transformation. π₯ Work 0 out −1 what 1 matrix 0 would have this effect π₯ −π¦ π¦ = π₯ Transforming the unit square Set 3 Paper 2 Q17 For more complex transformations it’s not sufficient to look at the effect on just one point: we can’t fully see what the matrix is doing. If we look at the effect on a unit square (with coordinates 0,0 , 1,0 , 1,1 , 0,1 ), we can better see the effect of a matrix transformation on a region in the π₯-π¦ plane. Just apply the transformation to each point of the unit square. 3 0 3 0 3 0 3 0 0 3 0 3 0 3 0 3 0 0 1 0 0 1 1 1 π ? π π = ? π π = ? π π = ? π = Test Your Understanding Set 1 Paper 1 Q14 π΄′ π΅′ πΆ′ 0 −1 0 −1 0 −1 0 −1 −1 0 −1 0 −1 0 −1 0 0 0 1 ? 00 1 1 1 π π π = −π −π = π −π = −π = Exercise 3 1 [Jan 2013 Paper 2 Q15] Describe fully the single transformation represented by the 0 −1 matrix 1 0 Rotation ππ° anticlockwise about the origin. 5 ? 2 [Set 2 Paper 1 Q4] The transformation matrix π 2 maps the point 3,4 onto the point −1 1 2, π . Work out the values of π and π. π =?−π, π = π ? 6 π π 3 [Set 3 Paper 1 Q6] The matrix −π 2π maps the point 5,4 onto the point 1,17 . Work 7 out the values of π and π. π = ?−π, π = π. π 4 [Worksheet 2 Q5] Work out the image of the point D (ο1, 2) after transformation by the π 2 3 matrix Solution: ? π −1 1 [Worksheet 2 Q6] The point A(m, n) is transformed to the point Aο’ (ο2, 0) by 2 3 the matrix 1 1 Work out the values of m and n. π = π, π = −π [Worksheet 2 Q8] Describe fully the transformation given by the matrix 0 −1 −1 0 Reflection in the line π = −π ? [Worksheet 2 Q9] The unit square OABC is transformed by the matrix β 0 to the square OAο’Bο’Cο’. 0 β The area of OAο’Bο’Cο’ is 27. Work out the exact value of h. π =?π π Combined Transformations π΄ π π΅ ? π΄π ? π΅π΄π π΅π΄ ? If a point π is transformed by the matrix π΄ followed by the matrix π΅, what calculation would get the new point? Therefore what matrix represents the combined transformation of π΄ followed by π΅? ο‘ The matrix π΅π΄ represents the combined transformation of π΄ followed by π΅. Example −1 0 A point π is transformed using the matrix , i.e. a reflection in the line π₯ = 0, 0 1 0 1 followed by , i.e. a reflection in the line π¦ = π₯. 1 0 (a) Give a single matrix which represents the combined transformation. (b) Describe geometrically the single transformation this matrix represents. a b π π π π −π π π π = ? π π −π π Rotation ππ° clockwise about the origin. ? Test Your Understanding Worksheet 2 Q7 Bro Note: The default direction of rotation is anticlockwise if not specified. 0 ?1 1 0 0 1 π©= −1? 0 0 1 0 1 1 0 π©π¨ = = −1 0 1 0 0 −1 ? (The question does not ask, but this represents a reflection in the line π¦ = 0) π¨= Exercise 3 1 Point 3, −2 is transformed by the matrix −1 followed by a further transformation 1 0 2 by the matrix . 1 0 (i) Work out the matrix for the combined π π transformation. Solution: π −π (ii) Work out the co-ordinates of the image point of π. Solution: (−π, π) 3 1 0 The unit square is reflected in the π₯-axis followed by a rotation through 180° centre the origin. Work out the matrix for the combined transformation. Solution: ? ? 2 Point −1,4 is transformed by the matrix 3 −2 −1 followed by a further 2 1 0 transformation by the matrix . 3 −2 (i) Work out the matrix for the combined π −π transformation. Solution: ππ −π (ii) Work out the co-ordinates of the image point of π. Solution: (−π, −ππ) ? ? 4 ?−π π π π The unit square is enlarged, centre the origin, scale factor 2 followed by a reflection in the line π¦ = π₯. Work out the matrix for the combined transformation. Solution: ?ππ π π Exercise 3 5 [Jan 2013 Paper 2 Q17] −1 0 represents a 0 1 0 1 represents a 1 0 reflection in the line π¦ = π₯. Work out the matrix that represents a reflection in the π¦-axis followed by a reflection in the line π¦ = π₯. π π −π π π π = π π π π −π π reflection in the π¦-axis. ? 6 [June 2012 Paper Q22] The transformation 0 −1 matrix maps a point π to π. The −1 0 1 0 transformation matrix maps point π 0 −1 to point π . Point π is −4,3 . Work out the coordinates of point π. π π π −π π −π = π −π −π π π π This is a rotation ππ° anticlockwise. So π original point π· is π ? 7 [Set 1 Paper Q14b] The unit square OABC is transformed by reflection in the line π¦ = π₯ followed by enlargement about the origin with scale factor 2. What is the matrix of the combined transformation? π π π π π π = ? π π π π π π 3 0 −1 0 and π΅ = . 0 3 0 1 The point π 2,7 is transformed by matrix π΅π΄ to π′. Show that π′ lies on the line 7π₯ + 2π¦ = 0. π΄= −π π π π π π −π = π π ? π π ππ π −π + π ππ = π