Lecture 4: Products of Matrices

Similar documents
Lecture 9: Submatrices and Some Special Matrices

Matrices: 2.1 Operations with Matrices

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

Matrices. Chapter Definitions and Notations

. =. 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

Finite Math - J-term Section Systems of Linear Equations in Two Variables Example 1. Solve the system

Elementary maths for GMT

Linear Algebra V = T = ( 4 3 ).

Mathematics 13: Lecture 10

Math 4377/6308 Advanced Linear Algebra

Lecture 12: Solving Systems of Linear Equations by Gaussian Elimination

Matrix-Matrix Multiplication

n n matrices The system of m linear equations in n variables x 1, x 2,..., x n can be written as a matrix equation by Ax = b, or in full

Matrices Gaussian elimination Determinants. Graphics 2009/2010, period 1. Lecture 4: matrices

Math 3C Lecture 20. John Douglas Moore

Phys 201. Matrices and Determinants

Matrices BUSINESS MATHEMATICS

Linear Algebra and Matrix Inversion

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

Lecture Notes in Linear Algebra

Lecture 3: Matrix and Matrix Operations

Announcements Wednesday, October 10

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

Math 360 Linear Algebra Fall Class Notes. a a a a a a. a a a

Announcements Monday, October 02

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

MAT 2037 LINEAR ALGEBRA I web:

Kevin James. MTHSC 3110 Section 2.1 Matrix Operations

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

1111: Linear Algebra I

b 1 b 2.. b = b m A = [a 1,a 2,...,a n ] where a 1,j a 2,j a j = a m,j Let A R m n and x 1 x 2 x = x n

Linear Algebra I Lecture 8

Matrix Algebra & Elementary Matrices

Outline 1. Real and complex p orbitals (and for any l > 0 orbital) 2. Dirac Notation :Symbolic vs shorthand Hilbert Space Vectors,

Review of Linear Algebra

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

1111: Linear Algebra I

MATH2210 Notebook 2 Spring 2018

MATH 2030: MATRICES ,, a m1 a m2 a mn If the columns of A are the vectors a 1, a 2,...,a n ; A is represented as A 1. .

Strauss PDEs 2e: Section Exercise 4 Page 1 of 5

Math Bootcamp An p-dimensional vector is p numbers put together. Written as. x 1 x =. x p

2. Matrix Algebra and Random Vectors

Numerical Analysis Lecture Notes

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

Introduction to Matrix Algebra

HOMEWORK 7 solutions

Matrix & Linear Algebra

j=1 u 1jv 1j. 1/ 2 Lemma 1. An orthogonal set of vectors must be linearly independent.

Section 5.5: Matrices and Matrix Operations

ICS 6N Computational Linear Algebra Matrix Algebra

Exercise Set Suppose that A, B, C, D, and E are matrices with the following sizes: A B C D E

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

Basic Linear Algebra in MATLAB

3. Vector spaces 3.1 Linear dependence and independence 3.2 Basis and dimension. 5. Extreme points and basic feasible solutions

Equality: Two matrices A and B are equal, i.e., A = B if A and B have the same order and the entries of A and B are the same.

MODEL ANSWERS TO THE THIRD HOMEWORK

Differential equations

Dot Products, Transposes, and Orthogonal Projections

Matrix Algebra Determinant, Inverse matrix. Matrices. A. Fabretti. Mathematics 2 A.Y. 2015/2016. A. Fabretti Matrices

Elementary Row Operations on Matrices

Math Linear Algebra Final Exam Review Sheet

Matrices and Determinants

POLI270 - Linear Algebra

Chapter 1 Matrices and Systems of Equations

A Brief Introduction to Tensors

1 Matrices and matrix algebra

Getting Started with Communications Engineering. Rows first, columns second. Remember that. R then C. 1

Review of Linear Algebra

Linear Algebra I Lecture 10

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

22A-2 SUMMER 2014 LECTURE 5

Lecture 8: Determinants I

Lecture 19: Introduction to Linear Transformations

Methods for Solving Linear Systems Part 2

CLASS 12 ALGEBRA OF MATRICES

Linear Algebra (Review) Volker Tresp 2017

Math113: Linear Algebra. Beifang Chen

Section 12.4 Algebra of Matrices

Matrix Multiplication

I&C 6N. Computational Linear Algebra

Matrix Arithmetic. j=1

DOT PRODUCT. Statics, Fourteenth Edition in SI Units R.C. Hibbeler. Copyright 2017 by Pearson Education, Ltd. All rights reserved.

Math 60. Rumbos Spring Solutions to Assignment #17

[ Here 21 is the dot product of (3, 1, 2, 5) with (2, 3, 1, 2), and 31 is the dot product of

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

Formula for the inverse matrix. Cramer s rule. Review: 3 3 determinants can be computed expanding by any row or column

Graphing Square Roots - Class Work Graph the following equations by hand. State the domain and range of each using interval notation.

Determinants. Copyright c 2012 Dan Nettleton (Iowa State University) Statistics / 25

Symmetry and Properties of Crystals (MSE638) Stress and Strain Tensor

Review : Powers of a matrix

Discrete Structures: Sample Questions, Exam 2, SOLUTIONS

Chapter 4. Matrices and Matrix Rings

Math 304 (Spring 2010) - Lecture 2

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 18: The Rank of a Matrix and Consistency of Linear Systems

Materials engineering Collage \\ Ceramic & construction materials department Numerical Analysis \\Third stage by \\ Dalya Hekmat

Stage-structured Populations

MATH 106 LINEAR ALGEBRA LECTURE NOTES

Math 320, spring 2011 before the first midterm

PHYS 705: Classical Mechanics. Rigid Body Motion Introduction + Math Review

Transcription:

Lecture 4: Products of Matrices Winfried Just, Ohio University January 22 24, 2018

Matrix multiplication has a few surprises up its sleeve Let A = [a ij ] m n, B = [b ij ] m n be two matrices. The sum A + B behaves exactly as one might expect, the product AB doesn t. A + B is defined whenever m = m and n = n. AB may not be defined for matrices of the same order, and is sometimes meaningful for matrices of different orders. When A + B = [c ij ], then always c ij = a ij + b ij. When AB = [d ij ], then usually d ij a ij b ij. A + B = B + A, exactly as for addition of numbers. Unlike in multiplication of numbers, it is possible that AB BA.

When can we multiply two matrices? Let A = [a ij ] k n, B = [b ij ] m p be two matrices. Then the product AB is defined if, and only if, n = m, that is, the number of columns of A is equal to the number of rows of B. 1 0 3 1 4 A = 1 6 7 B = 1 7 C = 0 0 0 3 0 AB is defined (3 columns, 3 rows), AC is not defined (3 columns, 2 rows), AA is defined (3 columns, 3 rows), BA is not defined (2 columns, 3 rows), BB is not defined (2 columns, 3 rows), BC is defined (2 columns, 2 rows), CA is defined (3 columns, 3 rows), CB is defined (3 columns, 3 rows), CC is not defined (3 columns, 2 rows). [ 5 6 ] 7 4 3 2

The order of the product Let A = [a ij ] k n and B = [b ij ] n p be such that the number of columns of A is equal to the number of rows of B. Then the product AB is defined and has order k p. 1 0 3 1 4 [ ] A = 1 6 7 B = 1 7 5 6 7 C = 4 3 2 0 0 0 3 0 AB has order 3 2, AA has order 3 3, BC has order 3 3, CA has order 2 3, CB has order 2 2.

Some observations Let A be a matrix. The product AA exists if, and only if, A is square. When it exists, the product AA has the same order as A. Even when AA T and A T A both exist, they will have the same order only if A is a square matrix. If v is a 1 n row vector and w is an m 1 column vector, then v w exists if, and only if, n = m and has dimension 1 1 in this case. If v is a 1 n row vector and w is an m 1 column vector, then w v exists and has dimension m n.

Product of a row vector and a matrix Let A be a matrix of order m n. Let v be a 1 m row vector. va = [ a 11... a 1n ] v 1... v m.. = [ ] w 1... w n a m1... a mn Then va is a 1 n row vector. We can say that postmultiplying (multiplying from the right) an m-dimensional row vector v by A transforms v into a row vector w = va of dimension n.

Products of square matrices and column vectors Let A be a matrix of order m n. Let v be an n 1 column vector. a 11... a 1n v 1 w 1 A v =... =. a m1... a mn Then A v is an m 1 column vector. We can say that premultiplying (multiplying from the left) an n-dimensional column vector v by A transforms v into a column vector w = A v of dimension m. v n w m

The definition of the product Let A = [a ij ] k n and B = [b ij ] n p be such that the number of columns of A is equal to the number of rows of B. Then the product AB is the matrix C = [c ij ] k p such that for all i = 1,..., k and j = 1,..., p: c ij = a i1 b 1j + a i2 b 2j + + a in b nj = n a il b lj. l=1 a 11... a 1l... a 1n b 11... b 1j... b 1p c 11... c 1j... c 1p...... a i1... a il... a in b l1... b lj... b lp...... =... c i1... c ij... c ip... a k1... a kl... a kn b n1... b nj... b np c k1... c kj... c kp

An example of a matrix product Let A = [a ij ] 2 3 and B = [b ij ] 3 3. Then the product AB is the matrix C = [c ij ] 2 3 such that for all i = 1, 2 and j = 1, 2, 3: AB = c ij = a i1 b 1j + a i2 b 2j + a i3 b 3j = 3 a il b lj. l=1 [ ] 4 2 [ ] 1 1 0 1 3 2 1 c11 c = 12 c 13 0 2 3 c 1 1 2 21 c 22 c 23

An example of a product: c 11 Let A = [a ij ] 2 3 and B = [b ij ] 3 3. Then the product AB is the matrix C = [c ij ] 2 3 such that for all i = 1, 2 and j = 1, 2, 3: AB = c ij = a i1 b 1j + a i2 b 2j + a i3 b 3j = 3 a il b lj. l=1 [ ] 4 2 [ ] 1 1 0 1 3 2 1 2 c12 c = 13 0 2 3 c 1 1 2 21 c 22 c 23 c 11 = a 11 b 11 + a 12 b 21 + a 13 b 31 = 1 3 + 0 = 2.

An example of a product: c 12 Let A = [a ij ] 2 3 and B = [b ij ] 3 3. Then the product AB is the matrix C = [c ij ] 2 3 such that for all i = 1, 2 and j = 1, 2, 3: AB = c ij = a i1 b 1j + a i2 b 2j + a i3 b 3j = 3 a il b lj. l=1 [ ] 4 2 [ ] 1 1 0 1 3 2 1 2 6 c13 = 0 2 3 c 1 1 2 21 c 22 c 23 c 12 = a 11 b 12 + a 12 b 22 + a 13 b 32 = 4 + 2 + 0 = 6.

An example of a product: c 13 Let A = [a ij ] 2 3 and B = [b ij ] 3 3. Then the product AB is the matrix C = [c ij ] 2 3 such that for all i = 1, 2 and j = 1, 2, 3: AB = c ij = a i1 b 1j + a i2 b 2j + a i3 b 3j = 3 a il b lj. l=1 [ ] 4 2 [ ] 1 1 0 1 3 2 1 2 6 1 = 0 2 3 c 1 1 2 21 c 22 c 23 c 13 = a 11 b 13 + a 12 b 23 + a 13 b 33 = 2 1 + 0 = 1.

An example of a product: c 21 Let A = [a ij ] 2 3 and B = [b ij ] 3 3. Then the product AB is the matrix C = [c ij ] 2 3 such that for all i = 1, 2 and j = 1, 2, 3: AB = c ij = a i1 b 1j + a i2 b 2j + a i3 b 3j = 3 a il b lj. l=1 [ ] 4 2 [ ] 1 1 0 1 3 2 1 2 6 1 = 0 2 3 9 c 1 1 2 22 c 23 c 21 = a 21 b 11 + a 22 b 21 + a 23 b 31 = 0 + 6 + 3 = 9.

An example of a product: c 22 Let A = [a ij ] 2 3 and B = [b ij ] 3 3. Then the product AB is the matrix C = [c ij ] 2 3 such that for all i = 1, 2 and j = 1, 2, 3: AB = c ij = a i1 b 1j + a i2 b 2j + a i3 b 3j = 3 a il b lj. l=1 [ ] 4 2 [ ] 1 1 0 1 3 2 1 2 6 1 = 0 2 3 9 7 c 1 1 2 23 c 22 = a 21 b 12 + a 22 b 22 + a 23 b 32 = 0 4 3 = 7.

An example of a product: c 23 Let A = [a ij ] 2 3 and B = [b ij ] 3 3. Then the product AB is the matrix C = [c ij ] 2 3 such that for all i = 1, 2 and j = 1, 2, 3: AB = c ij = a i1 b 1j + a i2 b 2j + a i3 b 3j = [ 1 1 0 0 2 3 ] 4 2 1 3 2 1 = 1 1 2 3 a il b lj. l=1 [ 2 6 ] 1 9 7 8 c 23 = a 21 b 13 + a 22 b 23 + a 23 b 33 = 0 + 2 + 6 = 8.

Homework 10 For every angle α, define [ ] cos α sin α R α = sin α cos α Homework 10: Derive a formula for the product R α R β that is as simple as possible.

The inner product of two vectors Assume x is a 1 n row vector and y is an m 1 column vector. Then x y exists if, and only if, n = m, that is, if these vectors have the same dimension. If the product x y exists, it has order 1 1. x y = [ ] y 2 x 1 x 2... x n. = [c], y n where c = x 1 y 1 + x 2 y 2 + + x n y n = n l=1 x ly l is called the inner product or dot product of x and y. y 1

The inner product: Examples Let Then x = [ 2 4 ] y = [ ] 1 3 x y = [(2)( 1) + (4)(3)] = [10], x z = [(2)(2) + (4)( 1)] = [0], x u is undefined. z = [ ] 2 1 0 u = 1 3

An application of inner products Sums of vectors can be expressed as inner products: x 1 [ [ ] x 2 n ] 1 1 1... 1. = x l = [ ] 1 x 1 x 2... x n l=1. x n 1

Homework 11 Homework 11: Let v be the 1 m row vector all of whose elements are 1, let w be the n 1 column vector all of whose elements are 1, and let A be an m n matrix. Give verbal descriptions of va and of A w.

Homework 12 Homework 12: Consider the following matrices: A = [ 1 2 ] 3 4 5 6 B = [ 1 0 ] 4 5 9 0 C = [ 10 ] 2 2 1 Find all of the following matrix products that are defined. AB AC CA AB T B T A

A second look at the definition of the product AB a 11... a 1l... a 1n b 11... b 1j... b 1p c 11... c 1j... c 1p...... a i1... a il... a in b l1... b lj... b lp...... =... c i1... c ij... c ip... a k1... a kl... a kn b n1... b nj... b np c k1... c kj... c kp c ij = a i1 b 1j + a i2 b 2j + + a in b nj = n a il b lj. Recall that a i denotes the vector in row i of A, and b j denotes the vector in column j of B. l=1 In this notation, [c ij ] = a i b j.

The outer product of two vectors Assume x is a 1 n row vector and y is an m 1 column vector. Then y x exists always and is a matrix C = [c ij ] m n of order m n, called the outer product of y and x. y 1 c 11... c 1j... c 1n. [ ]... y x = y i x1... x j... x n = c i1... c ij... c in.... y m c m1... c mj... c mn Here c ij = y i x j for all i = 1,..., m and j = 1,..., n.

The outer product: An example Let x = [ 2 4 1 ] y = [ ] 1 3 Then the inner product x y is undefined and the outer product y x = [ ] [ ] 1 [2 ] ( 1)(2) ( 1)(4) ( 1)( 1) 4 1 = 3 (3)(2) (3)(4) (3)( 1) y x = [ 2 4 ] 1 6 12 3

A third look at the definition of the product AB Let A = [a ij ] k n, B = [b ij ] n p and AB = [c ij ] k p. A B = b [a 11... a 1l... a 1n ] 11.... [a i1... a il... a in ] b l1.... [a k1... a kl... a kn ] b n1... b 1j. b lj. b nj... b 1p. b lp. b np a 1 b 1... a 1 b j... a 1 b p [c 11 ]... [c 1j ]... [c 1p ]... = a i b 1... a i b j... a i b p... =... [c i1 ]... [c ij ]... [c ip ]... a k b 1... a k b j... a k b p [c k1 ]... [c kj ]... [c kp ] Thus we can obtain AB from the outer product A B of the column vector A and the row vector B by dropping all internal brackets. Ohio University Since Winfried 1804 Just, Ohio University MATH3200, Lecture 4: Matrix Department Products of Mathematics