Tutorial 4: Determinants and Linear Transformations
Tutorial 4: Determinants and Linear Transformations
Tutorial 4: Determinants and Linear Transformations
Foundational questions 1 0 1 1 0 1 2 0 ? Exercise 1. What is the determinant of 0 0 2 1 0 0 0 5 Solution: Expanding Column 1, then Column 2, etc we see it is 1.(1).2.5 = 10. Exercise 2. Are the following functions linear transformations? (i) f1 : R2 (x, y ) R3 R2 (x, y ) R3 (ii) f2 : R2 R (x, y ) |x + y | R2
(iii) f3 :
(iv) f4 :
(x, y, z ) (y, x, z )
(x, y )
x2 y
if y = 0, if y = 0.
Solution: (i) Yes. f1 ((x, y ) + (x , y )) = f1 (x + x , y + y ) = (x + x , (y + y )) = (x, y ) + (x , y ) = f1 (x, y ) + f1 (x , y ) and f1 ((x, y )) = f1 (x, y ) = (x, y ) = (x, y ) = f1 (x, y ). (ii) No, it does not satisfy the second condition: f2 ((1)(1, 1)) = f2 (1, 1) = 2 while (1)f2 (1, 1) = (1)2 = 2. You can also show it does not satisfy the rst condition (but note that you only have to show one of them, not both): f2 ((1, 0) + (1, 0)) = f2 (0, 0) = 0 while f2 (1, 0) + f2 (1, 0) = 1 + 1 = 2. (iii) Yes. f3 ((x, y, z ) + (x , y , z )) = f1 (x + x , y + y , z + z ) = ((y + y ), x + x , z + z ) = (y, x, z ) + (y , x , z ) = f3 (x, y, z ) + f3 (x , y , z ) and f3 ((x, y, z )) = f3 (x, y, z ) = (y, x, z ) = (y, x, z ) = f3 (x, y, z ).
1
(iv) No. f4 does not preserve addition: f4 ((1, 1) + (0, 1)) = f4 (1, 2) = 1/2 while f4 (1, 1) + f4 (0, 1) = 1 + 0 = 1. Note that f4 does preserve scalar multiplication! Exercise 3. For each of the functions where you answered yes in the previous exercise, give the matrix with respect to the standard bases and a geometric description of the linear transformation. 1 0 Solution: The standard matrix for f1 is , it is a reection through the y -axis. 0 1 0 1 0 0 0 , it is a rotation of angle 90 degrees around the z -axis. The standard matrix for f3 is 1 0 0 1 Exercise 4. Let f5 : R2 R3 be the linear transformation mapping e1 to (1, 1, 2) and e2 to (0, 1, 1). What is the image of (1, 2) and of (x, y ) under f5 ? Solution: f5 (1, 2) = f5 (1, 0)+ f5 (0, 2) = f5 (1, 0)+2f5 (0, 1) = (1, 1, 2)+2(0, 1, 1) = (1, 3, 4). f5 (x, y ) = f5 (x, 0) + f5 (0, y ) = xf5 (1, 0) + yf5 (0, 1) = x(1, 1, 2) + y (0, 1, 1) = (x, x + y, 2x + y ). Conceptual understanding Exercise 5. For which value(s) of k is the following matrix invertible? [Hint: compute the determinant, starting with some row operations; do not rush into using the determinant formula.] 1 0 0 k 0 k 1 1 0 1 k k 1 0 0 2 Solution: The easiest method is to calculate the determinant, and see for which k it is non zero. Thus we need the answer to be factorised so that we can easily tell for which k it is equal to 0. 1 0 0 k 0 k 1 1 0 1 k k 1 0 0 2 = 0 1 k 2 1 k 2 1 k k 0 0 2k 1 0 0 k 2 0 0 1 k 1 k 2 0 1 k k 0 0 0 2k 0 1 k2 1 k R2 R2 kR3 R4 R4 R1
= (2 k )
So the matrix is always invertible except for k {1, 2, 1}. Exercise 6. Using the standard basis of R2 , determine the matrix of each of the following linear transformations, and compute their determinants: (1) a rotation of angle around the origin. (2) (Harder) a reection in a line forming an angle /2 with the x-axis.
2
Solution: cos() sin() (1) sin() cos() cos() sin() (2) sin() cos()
which has determinant cos()2 + sin()2 = 1. which has determinant cos()2 sin()2 = 1.
Exercise 7. Multiply the matrices found in the previous exercise to determine: (1) the composition of a rotation of angle 1 and a rotation of angle 2 , both around the origin. (2) the composition of a reection with itself. Hint: You may need the trig identities: cos(A + B ) = cos(A) cos(B ) sin(A) sin(B ) sin(A + B ) = sin(A) cos(B ) + cos(A) sin(B ) Solution: cos(1 ) sin(1 ) cos(2 ) sin(2 ) (1) sin(1 ) cos(1 ) sin(2 ) cos()2) cos(1 ) cos(2 ) sin(1 ) sin(2 ) cos(1 ) sin(2 ) sin(1 ) cos(2 ) = sin(1 ) cos(2 ) + cos(1 ) sin(2 ) sin(1 ) sin(2 ) + cos(1 ) cos(2 ) cos(1 + 2 ) sin(1 + 2 ) = . So the composition is a rotation of angle 1 + 2 . sin(1 + 2 ) cos(1 + 2 ) cos() sin() cos() sin() 1 0 (2) = . Composing a reection by itself sin() cos() sin() cos() 0 1 yields the identity. Exploration: Cross product
In R3 , the cross product of two vectors a = (a1 , a2 , a3 ) and b = (b1 , b2 , b3 ) is the vector (a2 b3 a3 b2 , a3 b1 a1 b3 , a1 b2 a2 b1 ). We denote it by a b. The trick to remember this formula is that the cross product is the determinant of the matrix e1 e2 e3 a1 a2 a3 . b1 b2 b3 Exercise 8. Let a = (1, 3, 1) and b = (2, 1, 5). Compute the following things. (i) (1, 3, 1) (2, 1, 5); (ii) (1, 3, 1) (1, 3, 1); (iii) the scalar product of a b with a and with b; (iv) the lengths of (1, 3, 1) (2, 1, 5), (1, 3, 1), and (2, 1, 5); (v) the angle between (1, 3, 1) and (2, 1, 5). (vi) Check that |a b| = |a||b| sin . Solution:
3
(i)
e1 e2 e3 1 3 1 = (16, 7, 5). (1, 3, 1) (2, 1, 5) = 2 1 5 e1 e2 e3 1 3 1 = (0, 0, 0). (1, 3, 1) (1, 3, 1) = 1 3 1 (1, 3, 1).(16, 7, 5) = 16 21 + 5 = 0 and 5) = 32 7 25 = 0. (2, 1, 5).(16, 7, 2 2 2 |(16, 7, 5)| = 16 + (7) + (5) = 330, |(1, 3, 1)| = 11, and |(2, 1, 5)| = sqrt30. To calculate an angle we use the scalar product: (1, 3, 1).(2, 1, 5) = 0, so = /2. In general a.b = |a||b| sin . sin = 1, so we just have |a b| = |a||b|, which is true.
Exercise 9. We now prove things in general, for any vectors a and b. (i) What is a a? (ii) Show that b a = a b. (iii) Show that a b is orthogonal (perpendicular) to a. (Similarly it is also orthogonal to b). (iv) Compute e1 (e1 e2 ) and (e1 e1 ) e2 . The cross product is not an associative operation, that is the position of the parenthesis is very important. (v) (hard) Show that |a b| = |a||b| sin , where [0, ] is the angle between the vectors a and b. Solution: e1 e2 e3 (i) a1 a2 a3 = (0, 0, 0) because the determinant has two lines equal. a1 a2 a3 (ii) It follows from the fact that when you switch two lines the determinant changes sign. (iii) We have to compute the scalar product (a2 b3 a3 b2 , a3 b1 a1 b3 , a1 b2 a2 b1 ).(a1 , a2 , a3 ) = a1 a2 b3 a1 a3 b2 + a2 a3 b1 a1 a2 b3 + a1 a3 b2 a2 a3 b1 = 0. (iv) e1 (e1 e2 ) = e1 e3 = e2 and (e1 e1 ) e2 = 0 e2 = 0. (v) The square of the left-hand side is: = (a2 b3 a3 b2 )2 + (a3 b1 a1 b3 )2 + (a1 b2 a2 b1 )2
2 2 2 2 2 2 2 2 2 2 2 = a2 2 b3 2a2 a3 b2 b3 + a3 b2 + a3 b1 2a1 a3 b1 b3 + a1 b3 + a1 b2 2a1 a2 b1 b2 + a2 b1
The square of the right-hand side is: = |a|2 |b|2 sin2 = |a|2 |b|2 (1 cos2 ) = |a|2 |b|2 |a|2 |b|2 cos2 = |a|2 |b|2 (a.b)2
2 2 2 2 2 2 = (a2 1 + a2 + a3 )(b1 + b2 + b3 ) (a1 b1 + a2 b2 + a3 b3 ) 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 = a2 1 b 1 + a1 b 2 + a1 b 3 + a2 b 1 + a2 b 2 + a2 b 3 + a3 b 1 + a3 b 2 + a3 b 3 2 2 2 2 2 a2 1 b1 a2 b2 a3 b3 2a1 a2 b1 b2 2a1 a3 b1 b3 2a2 a3 b2 b3 2 2 2 2 2 2 2 2 2 2 2 = a2 2 b3 2a2 a3 b2 b3 + a3 b2 + a3 b1 2a1 a3 b1 b3 + a1 b3 + a1 b2 2a1 a2 b1 b2 + a2 b1 .
So the squares of the RHS and LHS are equal, and since both sides are non-negative, they must be equal.
4
The cross-product ab is a vector which is perpendicular to both a and b, of length |a||b| sin , where [0, ] is the angle between the vectors a and b. There are two such vectors, so we need to be more precise. The direction of a b is determined by the following Right Hand Rule: suppose your right hand index nger is in the direction of a and your right hand middle nger is in the direction of b, then your right hand thumb indicates the direction of a b. [We are using the following orientation of the standard basis: your right hand thumb indicates the direction of e1 , your right hand index nger indicates the direction of e2 , and your right hand middle nger indicates the direction of e3 . This is the most common orientation used in engineering/physics.]