arithmetic operations on matrices. 1. definition of matrix 2. column, row and square matrix 3....

18
SECTION 2.3 Arithmetic Operations on Matrices

Upload: christian-griffith

Post on 23-Dec-2015

216 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

SECTION 2.3Arithmetic Operations on Matrices

Page 2: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

2.3 Arithmetic Operations on Matrices

1. Definition of Matrix2. Column, Row and Square Matrix3. Addition and Subtraction of Matrices4. Multiplying Row Matrix to Column Matrix5. Matrix Multiplication6. Identity Matrix7. Matrix Equation

Page 3: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Definition of Matrix

A matrix is any rectangular array of numbers and may be of any size.

The size of a matrix is nxk where n is the number of rows and k is the number of columns.

The entry aij refers to the number in the ith row and jth column of the matrix.

Two matrices are equal provided that they have the same size and that all their corresponding entries are equal.

3

Page 4: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Example Definition of Matrix

is a 2x3 matrix. The entry a1,2 = -1. The entry a2,3 = 7.

4 1 5

3 0 7

3 9 3 9

7 0 7 0

2 2 2 2

4

3 93 7 2

7 09 0 2

2 2

Page 5: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Column, Row and Square Matrix

A row matrix or row vector only has one row.

A column matrix or column vector only has one column.

A square matrix has the same number of rows as columns.

5

Page 6: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Example Column, Row & Square Matrix

is a 2x2 matrix and a square matrix.4 1

3 7

6

2 8 7 1 is a 1x4 matrix and a row matrix.

2

123.4

is a 3x1 matrix and a column matrix.

Page 7: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Addition and Subtraction of Matrices

The sum A + B of two matrices A and B is defined only if A and B are two matrices of the same size. In this case A + B is the matrix formed by adding the corresponding entries of A and B.

Two matrices of the same size are subtracted by subtracting corresponding entries.

7

Page 8: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Example Addition & Subtraction

2 1 3 1 4 7

4 0 5 8 3 2

1 3 10

12 3 3

1 82 1 3

4 34 0 5

7 2

2 1 3 1 4 7

4 0 5 8 3 2

8

3 5 4

4 3 7

is not defined.

Page 9: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Multiplying Row Matrix to Column Matrix

If A is a row matrix and B is a column matrix, then we can form the product AB provided that the two matrices have the same length. The product AB is a 1x1 matrix obtained by multiplying corresponding entries of A and B and then forming the sum.

1

21 2 1 1 2 2n n n

n

b

ba a a a b a b a b

b

9

Page 10: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Example Multiplying Row to Column

3

2 1 3 2

5

2 3 1 2 3 5 7

3

4 0 2 1 2

5

10

is not defined.

Page 11: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Matrix Multiplication

If A is an mxn matrix and B is an nxq matrix, then we can form the product AB. The product AB is an mxq matrix whose entries are obtained by multiplying the rows of A by the columns of B. The entry in the ith row and jth column of the product AB is formed by multiplying the ith row of A and jth column of B.

11

Page 12: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Example Matrix Multiplication

3 2 02 1 3

2 1 23 0 2

5 3 1

3 2 02 1 3

2 1 23 0 2

5 3 1

12

7 12 -5

-19 0 2

is not defined.

Page 13: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Identity Matrix

The identity matrix In of size n is the nxn square matrix with all zeros except for ones down the upper-left-to-lower-right diagonal.

Here are the identity matrix of sizes 2 and 3:

2 3

1 0 01 0

0 1 0 .0 1

0 0 1

I I

13

Page 14: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Example Identity Matrix

1 0 2 1 3

0 1 3 0 2

2 1 3

3 0 2

1 0 02 1 3

0 1 03 0 2

0 0 1

2 1 3

3 0 2

14

For all nxn matrices A, In A = A In = A.

Page 15: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Matrix Equation

The matrix form of a system of linear equations is

AX = B where A is the coefficient matrix whose

rows correspond to the coefficients of the variables in the equations. X is the column matrix corresponding to the variables in the system. B is the column matrix corresponding to the constants on the right-hand side of the equations.

15

Page 16: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Example Matrix Equation

4 7 9

3 2 5.

x y

x y

4 7 9

3 2 5

x

y

16

Write the following system as a matrix equation

Equation 1

Equation 2

x y constants

Page 17: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Summary Section 2.3 - Part 1

A matrix of size mxn has m rows and n columns.

Matrices of the same size can be added (or subtracted) by adding (or subtracting) corresponding elements.

17

Page 18: Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row

Summary Section 2.3 - Part 2

The product of an mxn and an nxr matrix is the mxr matrix whose ijth element is obtained by multiplying the ith row of the first matrix by the jth column of the second matrix. (The product of each row and column is calculated as the sum of the products of successive entries.)

18