18.06.04: ‘Matrices’ Lecturer: Barwick Wednesday 10 February 2016 18.06.04: ‘Matrices’ Figure 1: What are the angles between my bonds? You were saying? 18.06.04: ‘Matrices’ Exam 1 is a week from today ▶ It should be pretty simple. ▶ I will cover the course material through Friday’s lecture. ▶ You may not use any aids. 18.06.04: ‘Matrices’ The projection of a vector 𝑏⃗ onto a vector 𝑎⃗ is the vector ⃗ ⃗ 𝑎 = 𝑎⃗ ⋅ 𝑏 𝑎.⃗ 𝜋𝑎⃗ (𝑏)⃗ ≔ (̂ 𝑎 ⋅ 𝑏)̂ 𝑎⃗ ⋅ 𝑎⃗ 𝑎⃗ . 𝑏⃗ 𝜋𝑎⃗ (𝑏)⃗ 18.06.04: ‘Matrices’ Matrices Matrices are rectangular arrays of real numbers: 𝑎11 𝑎12 𝑎 𝑎22 𝐴 = ( 21 ⋮ ⋮ 𝑎𝑚1 𝑎𝑚2 ⋯ 𝑎1𝑛 ⋯ 𝑎2𝑛 ) ⋱ ⋮ ⋯ 𝑎𝑚𝑛 18.06.04: ‘Matrices’ Here, 𝐴 has 𝑚 rows and 𝑛 columns. We say that 𝐴 is an 𝑚 × 𝑛 matrix. We can think of 𝐴 as a sequence of 𝑛 vectors in R𝑚 : 𝐴 = ( 𝐴1⃗ 𝐴2⃗ ⋯ 𝐴𝑛⃗ ) or as a sequence of 𝑚 row vectors in R𝑛 : 𝐴⃗ 1 𝐴⃗ 𝐴 = ( 2 ). ⋮ 𝐴⃗ 𝑚 18.06.04: ‘Matrices’ The first thing that makes the notion of a matrix interesting is that you can multiply matrices by vectors. If 𝑏1 𝑏 𝑏⃗ = ( 2 ) ∈ R𝑛 , ⋮ 𝑏𝑛 then we can write 𝑎11 𝑏1 + 𝑎12 𝑏2 + ⋯ + 𝑎1𝑛 𝑏𝑛 𝑎 𝑏 + 𝑎22 𝑏2 + ⋯ + 𝑎2𝑛 𝑏𝑛 𝐴𝑏⃗ = 𝑏1 𝐴1⃗ + 𝑏2 𝐴2⃗ + ⋯ + 𝑏𝑛 𝐴𝑛⃗ = ( 21 1 ) ⋮ 𝑎𝑚1 𝑏1 + 𝑎𝑚2 𝑏2 + ⋯ + 𝑎𝑚𝑛 𝑏𝑛 18.06.04: ‘Matrices’ Or, equivalently, 𝐴⃗ 1 ⋅ 𝑏⃗ 𝑎11 𝑏1 + 𝑎12 𝑏2 + ⋯ + 𝑎1𝑛 𝑏𝑛 ⃗ ⃗ 𝐴 ⋅𝑏 𝑎 𝑏 + 𝑎22 𝑏2 + ⋯ + 𝑎2𝑛 𝑏𝑛 𝐴𝑏⃗ ≔ ( 2 ) = ( 21 1 ) ⋮ ⋮ 𝐴⃗ 𝑚 ⋅ 𝑏⃗ 𝑎𝑚1 𝑏1 + 𝑎𝑚2 𝑏2 + ⋯ + 𝑎𝑚𝑛 𝑏𝑛 18.06.04: ‘Matrices’ One way to say what’s going on here is to say that multiplication by an 𝑚 × 𝑛 matrix 𝐴 is a function 𝑇𝐴 ∶ R𝑛 R𝑚 that is defined so that 𝑇𝐴 (𝑥)⃗ = 𝐴𝑥.⃗ This is an important way to think about matrices, and so we should pay close attention to this picture. 18.06.04: ‘Matrices’ Let’s think about this function applied to the unit vectors 𝑒𝑖̂ : 𝑇𝐴 (𝑒𝑖̂ ) = 𝐴𝑒𝑖̂ = ? 18.06.04: ‘Matrices’ 𝑎11 𝑎12 𝑎 𝑎22 𝑇𝐴 (𝑒𝑖̂ ) = 𝐴𝑒𝑖̂ = ( 21 ⋮ ⋮ 𝑎𝑚1 𝑎𝑚2 ( ⋯ 𝑎1𝑛 ( ( ⋯ 𝑎2𝑛 )( ( ( ⋱ ⋮ ( ( ⋯ 𝑎𝑚𝑛 ( 0 0 ⋮ 0 1 0 ⋮ 0 𝐴 = ( 𝐴𝑒1̂ 𝐴𝑒1̂ ⋯ 𝐴𝑒𝑛̂ ) ) ) ) )=( ) ) ) ) ) 𝑎1𝑖 𝑎2𝑖 ) = 𝐴𝑖⃗ . ⋮ 𝑎𝑚𝑖 18.06.04: ‘Matrices’ Question. If 𝜃 ∈ [0, 2𝜋), then we can form this 2 × 2 matrix: 𝑅𝜃 ≔ ( cos 𝜃 − sin 𝜃 ). sin 𝜃 cos 𝜃 Describe the corresponding function 𝑇𝑅𝜃 ∶ R2 R2 geometrically. 18.06.04: ‘Matrices’ Armed with this, we can compile systems of 𝑚 linear equations 𝑣1 = 𝑎11 𝑥1 + 𝑎12 𝑥2 + ⋯ + 𝑎1𝑛 𝑥𝑛 ; 𝑣2 = 𝑎21 𝑥1 + 𝑎22 𝑥2 + ⋯ + 𝑎2𝑛 𝑥𝑛 ; ⋮ 𝑣𝑚 = 𝑎𝑚1 𝑥1 + 𝑎𝑚2 𝑥2 + ⋯ + 𝑎𝑚𝑛 𝑥𝑛 ; into the single equation 𝑣 ⃗ = 𝐴𝑥,⃗ where 𝑣 ⃗ ∈ R𝑛 is a fixed vector, and 𝑥⃗ ∈ R𝑚 is a variable vector. Solving the system is solving the compiled equation. 18.06.04: ‘Matrices’ But so what? It’s the same data, but a different format. The point is that qualitative things about the system of linear equations can be extracted from qualitative things about the matrix. 18.06.04: ‘Matrices’ Here’s a diagonal 𝑛 × 𝑛 matrix: 𝜆1 0 0 𝜆2 𝐴 = diag (𝜆1 , 𝜆2 , … , 𝜆𝑛 ) ≔ ( ⋮ ⋮ 0 0 ⋯ 0 ⋯ 0 ); ⋱ ⋮ ⋯ 𝜆𝑛 𝜆1 𝑏1 𝜆 𝑏 𝐴𝑏⃗ = ( 2 2 ) , ⋮ 𝜆𝑛 𝑏𝑛 so equations 𝐴𝑥⃗ = 𝑣 ⃗ will be wicked easy to solve (uniquely??). 18.06.04: ‘Matrices’ Only slightly less easy to solve will be what we get out of an 𝑛 × 𝑛 upper triangular matrix: 𝑎11 𝑎12 0 𝑎22 𝐴=( ⋮ ⋮ 0 0 ⋯ 𝑎1𝑛 ⋯ 𝑎2𝑛 ) ⋱ ⋮ ⋯ 𝑎𝑛𝑛 𝑎11 𝑏1 + 𝑎12 𝑏2 + ⋯ + 𝑎1𝑛 𝑏𝑛 𝑎 𝑏 + 𝑎23 𝑏3 + ⋯ + 𝑎2𝑛 𝑏𝑛 𝐴𝑏⃗ = ( 22 2 ). ⋮ 𝑎𝑛𝑛 𝑏𝑛 18.06.04: ‘Matrices’ Question. Suppose 𝐴 an 𝑚 × 𝑛 matrix. When is a vector in R𝑚 of the form 𝐴𝑏⃗ for some vector 𝑏⃗ ∈ R𝑛 ? Hint: We gave this formula 𝐴𝑏⃗ = 𝑏1 𝐴1⃗ + 𝑏2 𝐴2⃗ + ⋯ + 𝑏𝑛 𝐴𝑛⃗ , which exhibits 𝐴𝑏⃗ as a linear combination of the column vectors of 𝐴 … 18.06.04: ‘Matrices’ Question. Suppose 𝐴 an 𝑚 × 𝑛 matrix. When is the system of linear equations 𝐴𝑥⃗ = 𝑣 ⃗ redundant? That is, when is it the case that the equations provide the same constraints on the variable 𝑥⃗ that could be provided with fewer equations? Hint: we have the dual formula 𝐴⃗ 1 ⋅ 𝑏⃗ 𝐴⃗ ⋅ 𝑏⃗ 𝐴𝑏⃗ ≔ ( 2 ) ⋮ 𝐴⃗ 𝑚 ⋅ 𝑏⃗