Matrix basic operations

Post on 22-Nov-2014

2.837 views 4 download

description

 

Transcript of Matrix basic operations

MATRIX:MATRIX: A rectangular A rectangular arrangement of arrangement of numbers in rows and numbers in rows and columns.columns.

The The ORDERORDER of a matrix of a matrix is the number of the is the number of the rows and columns.rows and columns.

The The ENTRIESENTRIES are the are the numbers in the matrix.numbers in the matrix.

502

126rows

columns

This order of this matrix This order of this matrix is a 2 x 3.is a 2 x 3.

67237

89511

36402

3410

200

318 0759

20

11

6

0

7

9

3 x 3

3 x 5

2 x 2 4 x 1

1 x 4

(or square matrix)

(Also called a row matrix)

(or square matrix)

(Also called a column matrix)

To add two matrices, they must have the same To add two matrices, they must have the same order. To add, you simply add corresponding order. To add, you simply add corresponding entries.entries.

34

03

12

70

43

35

)3(740

0433

13)2(5

44

40

23

9245

3108

2335

2571

)1(8 70 51 23

55 34 32 )2(9 =

= 7 7 4 5

0 7 5 7

To subtract two matrices, they must have the same To subtract two matrices, they must have the same order. You simply subtract corresponding entries.order. You simply subtract corresponding entries.

232

451

704

831

605

429

2833)2(1

)4(65015

740249

603

1054

325

724

113

810

051

708

342

=

5-2

-4-1 3-8

8-3 0-(-1) -7-1

1-(-4)

2-0

0-7

=

2 -5 -5

5 1 -8

5 3 -7

In matrix algebra, a real number is often called a In matrix algebra, a real number is often called a SCALARSCALAR. . To multiply a matrix by a scalar, you multiply each entry in To multiply a matrix by a scalar, you multiply each entry in the matrix by that scalar. the matrix by that scalar.

14

024

416

08

)1(4)4(4

)0(4)2(4

86

54

30

212

)8(360

52412

-2

6

-3 3

-2(-3)

-5

-2(6) -2(-5)

-2(3) 6 -6

-12 10

Matrix MultiplicationMatrix Multiplication

Matrix Multiplication is NOT Matrix Multiplication is NOT Commutative! Order matters!Commutative! Order matters!

You can multiply matrices You can multiply matrices onlyonly if the if the number of number of columnscolumns in the first matrix in the first matrix equals the number of equals the number of rowsrows in the second in the second matrix.matrix.

2 3

5 6

9 7

2 columns2 rows

1 2 0

3 4 5

Matrix MultiplicationMatrix Multiplication

Take the numbers in the first row of Take the numbers in the first row of matrix #1. Multiply each number by its matrix #1. Multiply each number by its corresponding number in the first column corresponding number in the first column of matrix #2. Total these products.of matrix #2. Total these products.

2 3

5 6

9 7

1 2 0

3 4 5

21 33 11

The result, 11, goes in row 1, column 1 of the answer. Repeat with row 1, column 2; row 1 column 3; row 2, column 1; ...

Matrix MultiplicationMatrix Multiplication

Notice the dimensions of the matrices and Notice the dimensions of the matrices and their product.their product.

2 3

5 6

9 7

1 2 0

3 4 5

11 8 15

13 34 30

12 46 35

3 x 2 2 x 3 3 x 3__ __ __ __

Matrix MultiplicationMatrix Multiplication

Another example:Another example:

2 15

9 02

10 5

3 x 2 2 x 1 3 x 1

8

45

60