matrix multiplication

6
Matrix Multiplication

Upload: bobby-bloch

Post on 15-Apr-2017

823 views

Category:

Education


0 download

TRANSCRIPT

2nd Order Differential Equations

Matrix Multiplication

Matrix MultiplicationTo multiply matrices theres 2 simple things you need to know:

1. The method of multiplying the matrices together

2. Are the matrices compatible with each other?

Multiplication Process

The process is the same for the second row and then repeated across the entire matrix.

First, each entry in the row of the first matrix is multiplied by the corresponding entry in the column of the second matrix and summed up.

This will produce the first entry in the final matrix. Thame row is then multiplied for the rest of the columns in the second matrix. The process is the same for the second row and then repeated across the entire matrix.

EXAMPLE:

2 x 3 matrix and a 3 x 2 matrix

1 2 3 3 5 1*3 + 2*7 + 3*3 1*5 + 2*5 + 3*2 26 21 4 5 6 x 7 5 = 4*3 + 5*7 + 6*5 4*5 + 5*5 +6*2 = 56 57 3 2

The same row is then multiplied for the rest of the columns in the second matrix.

Now in reverseThe same 3x2 matrix and a 2x3 matrix multiplied in reverse will produce a 3x3 matrix

3 5 1 2 3 3*1 + 5*4 3*2 + 5*5 3*3+5*6 = 23 31 39 7 5 x 4 5 6 = 7*1 + 5*4 7*2 + 5*5 7*3+5*6 = 27 39 51 3 2 3*1 + 2*4 3*2 + 2*5 3*3+2*6 = 11 16 21

Note that the number of rows in the first matrix and number of columns in the second matrix (shown in bold above) will determine the size of the final matrix

3*1 + 5*4 3*2 + 5*5 3*3+5*6 = 23 31 397*1 + 5*4 7*2 + 5*5 7*3+5*6 = 27 39 51

3*1 + 2*4 3*2 + 2*5 3*3+2*6 = 11 16 21

CompatibilityA matrix is compatible with another ONLY IF the number of columns in the first matrix is equal to the number of rows in the second

EXAMPLE:

2 x 3 matrix and a 3 x 3 matrix will produce a 3x3 matrix

1 2 3 3 5 1 4 5 6 7 5 2COMPATIBLE 3 2 4

2 x 3 matrix and a 2 x 3 matrix = UNCOMPATIBLE 1 2 3 1 3 5 4 5 6 2 3 7 --------