Matrix Multiplication Hyun Lee, Eun Kim, Jedd Hakimi.

Slides:



Advertisements
Similar presentations
Chapter 6 Matrix Algebra.
Advertisements

Points, Vectors, Lines, Spheres and Matrices
Matrix A rectangular array of terms. Each term is an element of the matrix. Each matrix is describe by its dimensions. ( m x n) Where m is the number.
Warm-Up 1.Is matrix multiplication commutative? P 539 # 1,3,5, 11 a b c and d, 19, 20, 32.
12 System of Linear Equations Case Study
Chapter 4 Systems of Linear Equations; Matrices
Lesson 12.2 Matrix Multiplication. 3 Row and Column Order The rows in a matrix are usually indexed 1 to m from top to bottom. The columns are usually.
CSNB143 – Discrete Structure
Chapter Matrices Matrix Arithmetic
Mathematics. Matrices and Determinants-1 Session.
MF-852 Financial Econometrics
Maths for Computer Graphics
Contents Introduction Matrix Multiplication Partitioned Matrices
CALCULUS – II Matrix Multiplication by Dr. Eman Saad & Dr. Shorouk Ossama.
Matrices and Determinants
Chapter 3 The Inverse. 3.1 Introduction Definition 1: The inverse of an n  n matrix A is an n  n matrix B having the property that AB = BA = I B is.
Lecture 7: Matrix-Vector Product; Matrix of a Linear Transformation; Matrix-Matrix Product Sections 2.1, 2.2.1,
MATRICES. Matrices A matrix is a rectangular array of objects (usually numbers) arranged in m horizontal rows and n vertical columns. A matrix with m.
CE 311 K - Introduction to Computer Methods Daene C. McKinney
1.3 Matrices and Matrix Operations.
 Row and Reduced Row Echelon  Elementary Matrices.
Chap. 2 Matrices 2.1 Operations with Matrices
Chapter 6.7 Determinants. In this chapter all matrices are square; for example: 1x1 (what is a 1x1 matrix, in fact?), 2x2, 3x3 Our goal is to introduce.
2 2.1 © 2016 Pearson Education, Inc. Matrix Algebra MATRIX OPERATIONS.
Chapter 4 Matrices By: Matt Raimondi.
Matrices & Determinants Chapter: 1 Matrices & Determinants.
Chapter 8 Matrices and Determinants Copyright © 2014, 2010, 2007 Pearson Education, Inc Matrix Operations and Their Applications.
1.3 Matrices and Matrix Operations. Definition A matrix is a rectangular array of numbers. The numbers in the array are called the entries in the matrix.
Matrices. A matrix, A, is a rectangular collection of numbers. A matrix with “m” rows and “n” columns is said to have order m x n. Each entry, or element,
8.1 Matrices & Systems of Equations
1 C ollege A lgebra Systems and Matrices (Chapter5) 1.
Chapter 4 – Matrix CSNB 143 Discrete Mathematical Structures.
If A and B are both m × n matrices then the sum of A and B, denoted A + B, is a matrix obtained by adding corresponding elements of A and B. add these.
Slide Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Fundamentals of Engineering Analysis
Chapter 6 Matrices and Determinants Copyright © 2014, 2010, 2007 Pearson Education, Inc Matrix Operations and Their Applications.
Meeting 18 Matrix Operations. Matrix If A is an m x n matrix - that is, a matrix with m rows and n columns – then the scalar entry in the i th row and.
2 2.1 © 2012 Pearson Education, Inc. Matrix Algebra MATRIX OPERATIONS.
Matrices: Basic Operations and Their Properties
Chapter 2 … part1 Matrices Linear Algebra S 1. Ch2_2 2.1 Addition, Scalar Multiplication, and Multiplication of Matrices Definition A matrix is a rectangular.
1.3 Matrices and Matrix Operations. A matrix is a rectangular array of numbers. The numbers in the arry are called the Entries in the matrix. The size.
Copyright © Cengage Learning. All rights reserved. 2 SYSTEMS OF LINEAR EQUATIONS AND MATRICES.
Chapter 1 Section 1.5 Matrix Operations. Matrices A matrix (despite the glamour of the movie) is a collection of numbers arranged in a rectangle or an.
Matrices and Determinants
Systems of Equations and Matrices Review of Matrix Properties Mitchell.
Matrices Presentation by : Miss Matkar Pallavi. P.
Matrix Algebra Definitions Operations Matrix algebra is a means of making calculations upon arrays of numbers (or data). Most data sets are matrix-type.
2 2.4 © 2016 Pearson Education, Ltd. Matrix Algebra PARTITIONED MATRICES.
2.1 Matrix Operations 2. Matrix Algebra. j -th column i -th row Diagonal entries Diagonal matrix : a square matrix whose nondiagonal entries are zero.
Matrices. Matrix A matrix is an ordered rectangular array of numbers. The entry in the i th row and j th column is denoted by a ij. Ex. 4 Columns 3 Rows.
Linear Algebra by Dr. Shorouk Ossama.
MTH108 Business Math I Lecture 20.
7.1 Matrices, Vectors: Addition and Scalar Multiplication
Matrix Algebra MATRIX OPERATIONS © 2012 Pearson Education, Inc.
Properties and Applications of Matrices
MATRICES.
Matrix Algebra MATRIX OPERATIONS.
MATHEMATICS Matrix Algebra
MATHEMATICS Matrix Multiplication
Matrix Algebra MATRIX OPERATIONS © 2012 Pearson Education, Inc.
2. Matrix Algebra 2.1 Matrix Operations.
CS100: Discrete structures
Matrices and Matrix Operations
Matrices.
Linear Algebra Lecture 11.
DETERMINANT MATH 80 - Linear Algebra.
Matrix Algebra MATRIX OPERATIONS © 2012 Pearson Education, Inc.
Matrices and Determinants
Presentation transcript:

Matrix Multiplication Hyun Lee, Eun Kim, Jedd Hakimi

2.1 Matrix Operations Key Idea Key Idea Matrix multiplication corresponds to composition of linear transformation. The definition of AB, is critical for the development of theory and application. Then what is the definition of AB?

What is AB? The subscripts tell the location of an entry. If A is m x n matrix, then m represents the row and n represents the column. In the product AB, left-multiplication by A acts on the columns of while right multiplication by B actions on the rows of A. In other words.. The subscripts tell the location of an entry. If A is m x n matrix, then m represents the row and n represents the column. In the product AB, left-multiplication by A acts on the columns of while right multiplication by B actions on the rows of A. In other words..

Definition of AB continues.. Columns j Columns j Columns j Columns j of AB = A x of B of AB = A x of B Also, the following is true. (row i of AB)=(row i of A) x B (row i of AB)=(row i of A) x B

How do we add matrix? Let me show you an example: suppose A= 2 3 B= , , then what is A+B? = =

Example of Bx X= X= then.. What is 4x? then.. What is 4x? 4x=

Matrix Multiplication How do we multiply the matrix? How do we multiply the matrix? When matrix x is multiply by B, we are transforming x into vector Bx. Lets say we multiply by Bx by A again, now we have created A(Bx). This is the key concept to move on to next steps ! When matrix x is multiply by B, we are transforming x into vector Bx. Lets say we multiply by Bx by A again, now we have created A(Bx). This is the key concept to move on to next steps !

We can always express A(Bx) and (AB)x to represent this composite mapping as a matrix that was multiplied by a single factor. We can always express A(Bx) and (AB)x to represent this composite mapping as a matrix that was multiplied by a single factor.

Example If A is a 4 x 5 matrix and B is a 5 x 3 matrix, what are the sizes of AB and BA, if they are defined? If A is a 4 x 5 matrix and B is a 5 x 3 matrix, what are the sizes of AB and BA, if they are defined?

Remember! You can’t multiply any matrix. There are some conditions! The number of columns on the first matrix has to be same as the number of rows of the second matrix.

Theorem 1 A,B, and C are the matrices of same size and let r and s be the scalars. A,B, and C are the matrices of same size and let r and s be the scalars. A+B= B+A1.1 A+B= B+A1.1 (A+B)+C=A+(B+C)1.2 (A+B)+C=A+(B+C)1.2 A+0=A1.3 A+0=A1.3 r(A+b)=rA+rB1.4 r(A+b)=rA+rB1.4 (r+s)A= rA+sA1.5 (r+s)A= rA+sA1.5 R(sA)=(rs)A 1.6 R(sA)=(rs)A 1.6

Lets prove it! Note that all the vectors of A, B, and C has the same size. Lets say 2 nd column of vector of A, B, C is A 2, B 2, and C 2 (respectively). Then … Note that all the vectors of A, B, and C has the same size. Lets say 2 nd column of vector of A, B, C is A 2, B 2, and C 2 (respectively). Then … 3(A 2 +B 2 )= 3A 2 +3B 2 3(A 2 +B 2 )= 3A 2 +3B 2 The first matrix has the same size as the matrix on the right: The corresponding columns are equal so from it can be proved using same logic as I proved 1.4 The first matrix has the same size as the matrix on the right: The corresponding columns are equal so from it can be proved using same logic as I proved 1.4

A X B A= 3 0 B= A x B= 3(4)+0(6), 3(7)+0(8) 1(4)+1(6), 1(7)+1(8) 5(4)+2(6), 5(7)+2(8) =

Row-Column Rule If we think of the i th row of A and the j th column of B as vectors, then the element in the i th row and the j th column of C is, scalar product of the i th row of A and jth column of B. (AB)ij=Ai1Bij+Ai2Bi2+….+AinBnj Rowi(AB)=rowi(a) * B

Theorem 2 A, B, and Cs are matrices they have sizes for which the indicates sums and products are defined A(BC)=(AB)C2.1 A(B+C)=AB+AC2.2 (B+C)A=BA+CA2.3 r(AB)=(rA)B=A(rB)2.4 ImA=A=AIn2.5

Let’s prove it A(BC)=(AB)C------Associative law First observe that both A(BC) and (AB)C are m x n matrices. Let U j denote column j of AB. Since U j ==AB j, column j of A(BC) i s AU j = A(BC j ). Further more, column j of (AB)C is (AB)C j =A(Bc j ). It follows that the corresponding columns of A(BC) and (AB)C are equal.

Example of “Associative Law” A=(1,2), B= 3 4 C= A=(1,2), B= 3 4 C= AB=(1,2) 3 4 = (7,6) (AB)C=(7,6) =(51,6,4) A(BC)=(1,2) =(51,6,14)

Proof of “Distributive Law” Both (A+B)C and AC +BC are m *n matrices, and so we compare the corresponding columns of each matrix. For any j, ACj and BCj are the jth columns of AC and BC, respectively. But …….. *jth column of (A+B)C is (A+B)Cj=ACj+BCj. By property of matrix jth column of AC+BC is equal to the above. This left distributive law applies to right distributive law, too.

Example of “Distributive Law” A=(1,2) B= 3 4C= B+C= 7 6 A(B+C)=(9,30) AB=(3,14)AC=(6,16)AB+AC=(9,30)

AB is not equal to BA A = 1 B= (3,4,1,5); AB= A = 1 B= (3,4,1,5); AB= BA =(3,4,1,5) 1 = (3+8+5)=

The Transpose of a Matrix Sometimes it is of interest to interchange the rows and columns of a matrix Sometimes it is of interest to interchange the rows and columns of a matrix The transpose of a matrix A=A ij is a matrix formed from A by inter changing rows and columns such that row i of A becomes columns I of the transpose matrix. The transpose is denoted by At and The transpose of a matrix A=A ij is a matrix formed from A by inter changing rows and columns such that row i of A becomes columns I of the transpose matrix. The transpose is denoted by At and At=A ji when A= A ij At=A ji when A= A ij

Example of the “Transpose” A= 1 3 At= 1 2 A= 1 3 At= A= At= 1 0 A= At= It will be observed that if A is m x n, At is n x m

Matrix Powers If matrix A is squared it is denoted as.. =A 2 A k =A x A x A x…A A 0 =1(it’s the convention…right??) Therefore, A 0 X=X (itself) Also, you we can apply that (A p )x(A q )= A (p+q)

Theorem 3 Suppose A and B represent matrices of appropriate sizes for the following sums and products.

Theorems (a)-(c) are obvious, so the proofs are not required. For theorem (d),

2.4 Partitioned Matrices I see you’ve chosen the Red Pill… Welcome to Partitioned Matrices -Not as exciting as an action movie, but it might still make you say “Whoa.”

By now you’re teeming with anticipation, eager to expand your mind. Let’s start by clearing a few things up by understanding what we are working with. Why don’t I ask your first question for you (because you might feel silly talking to a computer screen):

Q. What is a Partitioned Matrix and what does it have to do with me? A. Ah, good question. Well, a Partitioned Matrix is a matrix that has been broken down into several smaller matrices But why tell you when I can show you a picture. Lets say I have a 5x4 Matrix called “G”

And now a partitioned version (with the partition lines in red):

And now we name the individual parts (AKA: Blocks or Submatrices): (AKA: Blocks or Submatrices):

Now we can rewrite “G” as a 3x2 Matrix: Now doesn’t that look a lot nicer than our original “G?” Of course is does. Now, to address the second part of your question, this partitioned matrix can help us by speeding up a supercomputer or something like that. Isn’t that exciting? Don’t answer that. On to more questions…

Q. Can I add Partitioned Matrices to each other? A. Sure, as long as the matrices being multiplied are identical in the way they are partitioned. Each block can be added to its corresponding block. Too easy. How bout another question?

Q. Can I multiply Partitioned Matrices by a scalar? by a scalar? A.Sure, as long you multiply the scalar one block at a time. Come on, give me a harder one…

Q. How can I multiply Partitioned Matrices by each other? A.Okay, now you’ve asked a tough one. The best way to explain this is through an example. In the following example uppercase Letters will represent blocks. First matrix “J” partitioned like so:

Or And Matrix “K” partitioned like so:

Or

First of all, Partitioned Matrices can Only be multiplied because the number of vertical partitions of the first matrix in the equation is equal to the number of horizontal partitions of the second matrix in the equation. matrix: (Row 1:) AE+BF (Row 2:) CE+DF (Row 1:) AE+BF (Row 2:) CE+DF

Now we expand each one of the Blocks.

Q. What Theorems can we get from this method of multiplying Partitioned Matrices ? A. Well you’re a curious one aren’t you? Well, in fact there is a theorem. Its called the Column-row Expansion Theorem and it basically means that because blocks work so well for multiplication then columns of the first matrix in a multiplication equation will correspond to rows of the second matrix in that equation to make an easier way to compute the equation. Here’s the proof:

For each row index I and column index j, the (i,j)- entry in column n (A) row n (B) is the product of a(i,N) from column n (A) and b (N, j) from row n (B). Hence the (i, j) entry in the sum shown in (1) is: a (i, 1)b(1,j)+ a (i, 2)b(2,j)+…+ a (i,N)b(N,j) This sum is also the (i, j)-entry in the AB, by the row-column rule. Or you can just take my word for it.

The End Produce by NYU Math Masters