Announcements Wednesday, October 10

Similar documents
Announcements Monday, October 02

Announcements Wednesday, October 25

Announcements Wednesday, September 27

ICS 6N Computational Linear Algebra Matrix Algebra

Matrix Arithmetic. j=1

Matrices: 2.1 Operations with Matrices

Announcements Wednesday, October 04

Kevin James. MTHSC 3110 Section 2.1 Matrix Operations

Matrix Algebra 2.1 MATRIX OPERATIONS Pearson Education, Inc.

Announcements Wednesday, November 01

Math 4377/6308 Advanced Linear Algebra

Announcements Monday, September 25

Graduate Mathematical Economics Lecture 1

Announcements Monday, October 29

Announcements Wednesday, November 01

Linear Equations in Linear Algebra

10. Linear Systems of ODEs, Matrix multiplication, superposition principle (parts of sections )

CS 246 Review of Linear Algebra 01/17/19

Announcements Monday, September 18

Undergraduate Mathematical Economics Lecture 1

Linear Algebra. Linear Equations and Matrices. Copyright 2005, W.R. Winfrey

Linear Algebra and Matrix Inversion

Chapter 4 - MATRIX ALGEBRA. ... a 2j... a 2n. a i1 a i2... a ij... a in

Mathematics 13: Lecture 10

Announcements Wednesday, November 7

A FIRST COURSE IN LINEAR ALGEBRA. An Open Text by Ken Kuttler. Matrix Arithmetic

Matrix Arithmetic. a 11 a. A + B = + a m1 a mn. + b. a 11 + b 11 a 1n + b 1n = a m1. b m1 b mn. and scalar multiplication for matrices via.

Lecture 3 Linear Algebra Background

Matrix & Linear Algebra

We could express the left side as a sum of vectors and obtain the Vector Form of a Linear System: a 12 a x n. a m2

. =. a i1 x 1 + a i2 x 2 + a in x n = b i. a 11 a 12 a 1n a 21 a 22 a 1n. i1 a i2 a in

Announcements Monday, November 13

Matrix Algebra. Matrix Algebra. Chapter 8 - S&B

Matrices BUSINESS MATHEMATICS

Announcements September 19

Announcements Wednesday, November 7

MAT 2037 LINEAR ALGEBRA I web:

Matrix operations Linear Algebra with Computer Science Application

Matrix Multiplication

Phys 201. Matrices and Determinants

Calculus II - Basic Matrix Operations

Announcements Monday, November 13

Section 9.2: Matrices.. a m1 a m2 a mn

. a m1 a mn. a 1 a 2 a = a n

Announcements Wednesday, November 15

Elementary Row Operations on Matrices

CLASS 12 ALGEBRA OF MATRICES

Linear Algebra Highlights

Daily Update. Math 290: Elementary Linear Algebra Fall 2018

Matrix representation of a linear map

MAT 1302B Mathematical Methods II

Math 220 F11 Lecture Notes

Sometimes the domains X and Z will be the same, so this might be written:

2.1 Matrices. 3 5 Solve for the variables in the following matrix equation.

Introduction to Matrix Algebra

1 Matrices and matrix algebra

Matrices. Math 240 Calculus III. Wednesday, July 10, Summer 2013, Session II. Matrices. Math 240. Definitions and Notation.

Math Linear Algebra Final Exam Review Sheet

Roberto s Notes on Linear Algebra Chapter 4: Matrix Algebra Section 4. Matrix products

Chapter 2. Matrix Arithmetic. Chapter 2

Section 9.2: Matrices. Definition: A matrix A consists of a rectangular array of numbers, or elements, arranged in m rows and n columns.

Announcements Monday, November 26

CS100: DISCRETE STRUCTURES. Lecture 3 Matrices Ch 3 Pages:

Section 1.8/1.9. Linear Transformations

Matrix Operations. Linear Combination Vector Algebra Angle Between Vectors Projections and Reflections Equality of matrices, Augmented Matrix

Elementary maths for GMT

Math 416, Spring 2010 Matrix multiplication; subspaces February 2, 2010 MATRIX MULTIPLICATION; SUBSPACES. 1. Announcements

Math 314/814 Topics for first exam

1300 Linear Algebra and Vector Geometry

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

Matrices. Chapter Definitions and Notations

Introduction. Vectors and Matrices. Vectors [1] Vectors [2]

MATH2210 Notebook 2 Spring 2018

MATRICES. a m,1 a m,n A =

Matrix representation of a linear map

Announcements Monday, November 26

Chapter 5: Matrices. Daniel Chan. Semester UNSW. Daniel Chan (UNSW) Chapter 5: Matrices Semester / 33

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

Systems of Linear Equations and Matrices

I = i 0,

Linear Algebra Tutorial for Math3315/CSE3365 Daniel R. Reynolds

Things we can already do with matrices. Unit II - Matrix arithmetic. Defining the matrix product. Things that fail in matrix arithmetic

Linear Algebra March 16, 2019

Chapter 2 Notes, Linear Algebra 5e Lay

Systems of Linear Equations and Matrices

Announcements Monday, November 06

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)

Announcements Wednesday, August 30

Foundations of Cryptography

Linear algebra comments. Sophie Marques

MTH 464: Computational Linear Algebra

Announcements Wednesday, September 05

Announcements Wednesday, August 30

Matrices. 1 a a2 1 b b 2 1 c c π

7.5 Operations with Matrices. Copyright Cengage Learning. All rights reserved.

MATH Topics in Applied Mathematics Lecture 12: Evaluation of determinants. Cross product.

Announcements Wednesday, September 20

7 Matrix Operations. 7.0 Matrix Multiplication + 3 = 3 = 4

Definition. A matrix is a rectangular array of numbers enclosed by brackets (plural: matrices).

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra /34

Transcription:

Announcements Wednesday, October 10 The second midterm is on Friday, October 19 That is one week from this Friday The exam covers 35, 36, 37, 39, 41, 42, 43, 44 (through today s material) WeBWorK 42, 43 are due today at 11:59pm The quiz on Friday covers 42, 43 You can go to other instructors office hours; see Canvas announcements

Section 44 Matrix Multiplication

Motivation Recall: we can turn any system of linear equations into a matrix equation Ax b This notation is suggestive Can we solve the equation by dividing by A? x?? b A Answer: Sometimes, but you have to know what you re doing Today we ll study matrix algebra: adding and multiplying matrices These are not so hard to do The important thing to understand today is the relationship between matrix multiplication and composition of transformations

More Notation for Matrices Let A be an m n matrix We write a ij for the entry in the ith row and the jth column It is called the ijth entry of the matrix The entries a 11, a 22, a 33, are the diagonal entries; they form the main diagonal of the matrix A diagonal matrix is a square matrix whose only nonzero entries are on the main diagonal The n n identity matrix I n is the diagonal matrix with all diagonal entries equal to 1 It is special because I nv v for all v in R n a 11 a 1j a 1n a i1 a ij a in a m1 a mj a mn jth column ith row ( ) a a 11 a 12 a 11 a 12 13 a a 21 a 22 a 21 a 22 23 a 31 a 32 a 11 0 0 0 a 22 0 0 0 a 33 1 0 0 I 3 0 1 0 0 0 1

More Notation for Matrices Continued The zero matrix (of size m n) is the ( ) m n matrix 0 with all zero entries 0 0 0 0 0 0 0 The transpose of an m n matrix A is the n m matrix A T whose rows are the columns of A In other words, the ij entry of A T is a ji A ( ) a 11 a 12 a 13 a 21 a 22 a 23 flip A T a 11 a 21 a 12 a 22 a 13 a 23

Addition and Scalar Multiplication You add two matrices component by component, like with vectors ( ) ( ) ( ) a11 a 12 a 13 b11 b 12 b 13 a11 + b 11 a 12 + b 12 a 13 + b 13 + a 21 a 22 a 23 b 21 b 22 b 23 a 21 + b 21 a 22 + b 22 a 23 + b 23 Note you can only add two matrices of the same size You multiply a matrix by a scalar by multiplying each component, like with vectors ( ) ( ) a11 a 12 a 13 ca11 ca 12 ca 13 c a 21 a 22 a 23 ca 21 ca 22 ca 23 These satisfy the expected rules, like with vectors: A + B B + A (A + B) + C A + (B + C) c(a + B) ca + cb (c + d)a ca + da (cd)a c(da) A + 0 A

Matrix Multiplication Beware: matrix multiplication is more subtle than addition and scalar multiplication must be equal Let A be an m n matrix and let B be an n p matrix with columns v 1, v 2, v p: B v 1 v 2 v p The product AB is the m p matrix with columns Av 1, Av 2,, Av p: The equality is a definition AB def Av 1 Av 2 Av p In order for Av 1, Av 2,, Av p to make sense, the number of columns of A has to be the same as the number of rows of B Note the sizes of the product! Example ( ) 1 2 3 1 3 2 2 4 5 6 3 1 ( 1 2 3 4 5 6 ( 14 ) 10 32 28 ) 1 2 3 ( ) 1 2 3 3 2 4 5 6 1

The Row-Column Rule for Matrix Multiplication Recall: A row vector of length n times a column vector of length n is a scalar: ( ) a1 a n b 1 b n r m a 1b 1 + + a nb n Another way of multiplying a matrix by a vector is: r 1 r 1x Ax x r mx On the other hand, you multiply two matrices by AB A c 1 c p Ac 1 Ac p It follows that r 1 r 1c 1 r 1c 2 r 1c p AB c 1 c p r 2c 1 r 2c 2 r 2c p r m r mc 1 r mc 2 r mc p

The Row-Column Rule for Matrix Multiplication The ij entry of C AB is the ith row of A times the jth column of B: c ij (AB) ij a i1 b 1j + a i2 b 2j + + a in b nj This is how everybody on the planet actually computes AB Diagram (AB C): a 11 a 1k a 1n b 11 b 1j b 1p c 11 c 1j c 1p a i1 a ik a in b k1 b kj b kp c i1 c ij c ip a m1 a mk a mn b n1 b nj b np c m1 c mj c mp jth column ij entry Example ( ) 1 2 3 1 3 ( ) ( ) 2 2 1 1 + 2 2 + 3 3 14 4 5 6 3 1 ( ) 1 2 3 1 3 ( ) ( ) 2 2 4 5 6 4 1 + 5 2 + 6 3 32 3 1 ith row

Composition of Transformations Why is this the correct definition of matrix multiplication? Definition Let T : R n R m and U : R p R n be transformations The composition is the transformation T U : R p R m defined by T U(x) T (U(x)) This makes sense because U(x) (the output of U) is in R n, which is the domain of T (the inputs of T ) [interactive] x U T U U(x) T T U(x) R p R n R m Fact: If T and U are linear then so is T U Guess: If A is the matrix for T, and B is the matrix for U, what is the matrix for T U?

Composition of Linear Transformations Let T : R n R m and U : R p R n be linear transformations Let A and B be their matrices: A T (e 1) T (e 2) T (e n) B U(e 1) U(e 2) U(e p) Question U(e 1 ) Be 1 is the first column of B What is the matrix for T U? the first column of AB is A(Be 1 ) We find the matrix for T U by plugging in the unit coordinate vectors: T U(e 1) T (U(e 1)) T (Be 1) A(Be 1) (AB)e 1 For any other i, the same works: T U(e i ) T (U(e i )) T (Be i ) A(Be i ) (AB)e i This says that the ith column of the matrix for T U is the ith column of AB The matrix of the composition is the product of the matrices!

Composition of Linear Transformations Remark We can also add and scalar multiply linear transformations: T, U : R n R m T + U : R n R m (T + U)(x) T (x) + U(x) In other words, add transformations pointwise T : R n R m c in R ct : R n R m (ct )(x) c T (x) In other words, scalar-multiply a transformation pointwise If T has matrix A and U has matrix B, then: T + U has matrix A + B ct has matrix ca So, transformation algebra is the same as matrix algebra

Composition of Linear Transformations Example Let T : R 3 R 2 and U : R 2 R 3 be the matrix transformations ( ) 1 0 1 1 0 T (x) x U(x) 0 1 x 0 1 1 1 1 Then the matrix for T U is ( 1 1 0 0 1 1 ) 1 0 0 1 1 1 [interactive] ( ) 1 1 1 2

Composition of Linear Transformations Another Example Let T : R 2 R 2 be rotation by 45, and let U : R 2 R 2 scale the x-coordinate by 15 Let s compute their standard matrices A and B: ) T (e 1 ) 45 1 2 1 2 T (e 1) 1 ( 1 2 1 T (e 2) 1 ( ) 1 2 1 1 T 2 (e 2 ) 1 2 45 U(e 1 ) ( ) 15 U(e 1) 0 ( ) U(e 2 ) 0 U(e 2) 1 A 1 ( ) 1 1 2 1 1 B ( ) 15 0 0 1

Composition of Linear Transformations Another example, continued So the matrix C for T U is C AB 1 ( ) ( ) 1 1 15 0 2 1 1 0 1 ( ( ) ( ) ( ) ( ) ) 1 1 1 15 1 1 1 0 2 1 1 0 2 1 ( ) 15 1 1 1 1 2 15 1 Check: [interactive: e 1 ] [interactive: e 2 ] e 1 U(e 1 ) T (U(e 1 )) T U(e 1) 1 ( ) 15 2 15 e 2 U(e 2 ) T (U(e 2 )) T U(e2) 1 ( ) 1 2 1 C 1 ( ) 15 1 2 15 1

Composition of Linear Transformations Another example Let T : R 3 R 3 be projection onto the yz-plane, and let U : R 3 R 3 be reflection over the xy-plane Let s compute their standard matrices A and B: yz e 1 T (e 1 ) xy yz T (e 2 ) xy yz T (e 3 ) xy 0 0 0 A 0 1 0 0 0 1 yz U(e 1 ) xy yz U(e 2 ) xy yz U(e 3 ) e 3 xy 1 0 0 B 0 1 0 0 0 1

Composition of Linear Transformations Another example, continued So the matrix C for T U is 0 0 0 1 0 0 0 0 0 C AB 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1 Check: we did this last time [interactive: e 1 ] [interactive: e 2 ] [interactive: e 3 ]

Poll Poll Do there exist nonzero matrices A and B with AB 0? Yes! Here s an example: ( ) ( ) 1 0 0 0 1 0 1 1 ( ( 1 0 1 0 ) ( 0 1 ) ( 1 0 1 0 ) ( ) ) 0 1 ( ) 0 0 0 0

Properties of Matrix Multiplication Mostly matrix multiplication works like you d expect Suppose A has size m n, and that the other matrices below have the right size to make multiplication work A(BC) (AB)C A(B + C) (AB + AC) (B + C)A BA + CA c(ab) (ca)b c(ab) A(cB) I ma A AI n A Most of these are easy to verify Associativity is A(BC) (AB)C It is a pain to verify using the row-column rule! Much easier: use associativity of linear transformations: S (T U) (S T ) U This is a good example of an instance where having a conceptual viewpoint saves you a lot of work Recommended: Try to verify all of them on your own

Properties of Matrix Multiplication Caveats Warnings! AB is usually not equal to BA ( ) ( ) ( 0 1 2 0 0 1 1 0 0 1 2 0 ) ( 2 0 0 1 In fact, AB may be defined when BA is not AB AC does not imply B C, even if A 0 ( ) ( ) ( ) 1 0 1 2 1 2 0 0 3 4 0 0 ) ( ) 0 1 1 0 ( 1 0 0 0 ) ( ) 1 2 5 6 ( ) 0 2 1 0 AB 0 does not imply A 0 or B 0 ( ) ( ) ( ) 1 0 0 0 0 0 1 0 1 1 0 0

Powers of a Matrix Suppose A is a square matrix Then A A makes sense, and has the same size Then A (A A) also makes sense and has the same size Definition Let n be a positive whole number and let A be a square matrix The nth power of A is the product A n A A A }{{} n times Example A ( ) ( ) ( ) ( ) 1 1 A 2 1 1 1 1 1 2 0 1 0 1 0 1 0 1 ( ) ( ) ( ) A 3 1 2 1 1 1 3 0 1 0 1 0 1 ( ) ( ) ( ) A n 1 n 1 1 1 1 n 0 1 0 1 0 1

Summary The product of an m n matrix and an n p matrix is an m p matrix I showed you two ways of computing the product Composition of linear transformations corresponds to multiplication of matrices You have to be careful when multiplying matrices together, because things like commutativity and cancellation fail You can take powers of square matrices