42
An introduction to Matrix Algebra

Matrix algebra

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Matrix algebra

An introduction to Matrix Algebra

Page 2: Matrix algebra

Algebra

Page 3: Matrix algebra

MATRIXA matrix is an ordered rectangular array of numbers, arranged in rows and columns.

columns

rows

Page 4: Matrix algebra

ORDER OF A MATRIX

The size or order of a matrix is described by its number of rows and the number of columns.

If a matrix, A, has m rows and n columns then A is described as an mxn matrix.

Page 5: Matrix algebra

The numbers in a matrix are called its elements. The element in the ith row and jth column of a matrix is generally denoted by aij. A matrix with m rows and n columns is written or .

Page 6: Matrix algebra

Row Matrix

A matrix with just one row is called a row matrix (or row vector).

 

jn aaaaA , 2 1 (1 x n)

Page 7: Matrix algebra

Column Matrix

i

m

a

a

a

a

A 2

1

A matrix with just one column is called a column matrix.

(m x 1)

Page 8: Matrix algebra

Matrices of the same order

Two matrices which have the Same number of rows and columns are said to be matrices of the same order.

Page 9: Matrix algebra

Equal MatricesTwo matrices A = (aij) and B = (bij) are said to be equal if, and only if, each element aij of A is equal to the corresponding element bij of B.

In symbolic form this reads:

From this it follows that equal matrices are of the same order but matrices of the same order are not necessarily equal.

A=B aij = bij for all i and j

Page 10: Matrix algebra
Page 11: Matrix algebra

Null matrixAny matrix, all of whose elements are zero, is called a null or zero matrix and is denoted by O.

Page 12: Matrix algebra

Matrix Addition

A new matrix C may be defined as the additive combination of matrices A and B where: C = A + B is defined by: 

ijijij bac

Note: all three matrices are of the same dimension

Page 13: Matrix algebra

Addition

A a11 a12

a21 a22

B b11 b12

b21 b22

C a11 b11 a12 b12

a21 b21 a 22 b22

If

and

then

Page 14: Matrix algebra

Matrix Addition Example

A B 3 4

5 6

1 2

3 4

4 6

8 10

C

Page 15: Matrix algebra

Multiplication by a scalar

If A is a given matrix and a scalar then

A is the matrix each of whose elements is

times the corresponding element of A.

Thus A

Page 16: Matrix algebra

The Identity

Page 17: Matrix algebra

Identity Matrix

I

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

Square matrix with ones on the diagonal and zeros elsewhere.

Page 18: Matrix algebra

Equal Matrices

Two matrices A and B are said to be equal if, and only if, each element aij of A is equal to the corresponding element bij of B.

Page 19: Matrix algebra

The Null matrix

Any matrix all of whose elements are zero is called a null or zero matrix

Page 20: Matrix algebra

Transpose Matrix

A'

a11 a21 ,, am1

a12 a22 ,, am 2

a1n a2n ,, amn

Rows become columns and columns become rows

Page 21: Matrix algebra

Square Matrix

B

5 4 7

3 6 1

2 1 3

Same number of rows and columns

Page 22: Matrix algebra

Matrix Subtraction

C = A - BIs defined by

Cij Aij Bij

Page 23: Matrix algebra

Let A and B be two matrices. If the number of columns in A is equal to the number of rows in B we say that A and B are conformable for the matrix product AB.

If A is order m×n and B is of order n×p, then the product AB is defined and is a matrix of order m×p.

Matrix Multiplication

Page 24: Matrix algebra

Matrix Multiplication

Matrices A and B have these dimensions:

[r x c] and [s x d]

Page 25: Matrix algebra

Matrix Multiplication

Matrices A and B can be multiplied if:

[m x n] and [n x p]

n = n

Page 26: Matrix algebra

Matrix Multiplication

The resulting matrix will have the dimensions:

[m x n] and [n x p]

m x p

Page 27: Matrix algebra

Computation: A x B = C

A a11 a12

a21 a22

B b11 b12 b13

b21 b22 b23

232213212222122121221121

2312131122121211 21121111

babababababa

babababababaC

[2 x 2]

[2 x 3]

[2 x 3]

Page 28: Matrix algebra

Computation: A x B = C

A

2 3

1 1

1 0

and B

1 1 1

1 0 2

[3 x 2] [2 x 3]A and B can be multiplied

1 1 1

3 1 2

8 2 5

12*01*1 10*01*1 11*01*1

32*11*1 10*11*1 21*11*1

82*31*2 20*31*2 51*31*2

C

[3 x 3]

Page 29: Matrix algebra

Computation: A x B = C

1 1 1

3 1 2

8 2 5

12*01*1 10*01*1 11*01*1

32*11*1 10*11*1 21*11*1

82*31*2 20*31*2 51*31*2

C

A

2 3

1 1

1 0

and B

1 1 1

1 0 2

[3 x 2] [2 x 3]

[3 x 3]

Result is 3 x 3

Page 30: Matrix algebra

Note:

If A is an m×n and B is n×p matrix, then AB is an m×p matrix. Hence we see that BA is defined only when p=m.

Page 31: Matrix algebra

Inversion

Page 32: Matrix algebra

The Inverse of a Matrix

Let A be a square matrix. A matrix B such that AB=I=BA is called the inverse matrix of A and is denoted by A-1.

So if A-1 exists, we have AA-1=I=A-1A and the matrix is said to be invertible.

If a matrix has no inverse, then it is said to be non-invertible.

Definition:

Page 33: Matrix algebra

The Inverse of a Matrix

IAAAA 11

Like a reciprocal in scalar math

Like the number one in scalar math

Page 34: Matrix algebra

Linear System of Simultaneous Equations

1st Precinct : x1 x2 6

2nd Pr ecinct : 2x1 x2 9

First precinct: 6 arrests last week equally divided between felonies and misdemeanors.

Second precinct: 9 arrests - there were twice as many felonies as the first precinct.

Page 35: Matrix algebra

Solution

9

6 *

1 2

1 1

2

1

x

x

3

3

2

1

x

x

1 2

1 1 Note: Inverse of is

1 2

1 1

9

6*

1 2

1 1 *

1 2

1 1*

1 2

1 1

2

1

x

x Premultiply both sides by inverse matrix

3

3 *

1 0

0 1

2

1

x

x A square matrix multiplied by its inverse results in the identity matrix.

A 2x2 identity matrix multiplied by the 2x1 matrix results in the original 2x1 matrix.

Page 36: Matrix algebra

aijxj bi or Ax bj1

n

x A 1Ax A 1b

n equations in n variables:

unknown values of x can be found using the inverse of matrix A such that

General Form

Page 37: Matrix algebra

Garin-Lowry Model

Ax y x

y Ix Ax

y (I A)x

(I A) 1 y x

The object is to find x given A and y . This is done by solving for x :

Page 38: Matrix algebra

Matrix Operations in Excel

Select the cells in which the answer will appear

Page 39: Matrix algebra

Matrix Multiplication in Excel

1) Enter “=mmult(“

2) Select the cells of the first matrix

3) Enter comma “,”

4) Select the cells of the second matrix

5) Enter “)”

Page 40: Matrix algebra

Matrix Multiplication in Excel

Enter these three key strokes at the same time:

control

shift

enter

Page 41: Matrix algebra

Matrix Inversion in Excel

Follow the same procedure Select cells in which answer is to be

displayed Enter the formula: =minverse( Select the cells containing the matrix to be

inverted Close parenthesis – type “)” Press three keys: Control, shift, enter

Page 42: Matrix algebra