Embed
Email

Matrix Algebra Basics

Document Sample
Matrix Algebra Basics
Shared by: HC11121021037
Categories
Tags
Stats
views:
0
posted:
12/10/2011
language:
pages:
30
Matrix Algebra Basics





Pam Perlich

Urban Planning 5/6020

Algebra

Matrix

A matrix is any doubly subscripted array of

elements arranged in rows and columns.



a

 11 ,, a1n 

 21 ,, a 2n 

a

A    Aij

   

 m1 ,, amn 



a 

Row Vector



[1 x n] matrix





A a1 a 2 ,, an   aj

Column Vector

[m x 1] matrix





a1 

a 2 

A     ai

 

 

am 

Square Matrix

Same number of rows and columns



 4 7

5

B   6 1 

3

 1 3 



2 

The

Identity

Identity Matrix

Square matrix with ones on the

diagonal and zeros elsewhere.

1

 0 0 0 



0 1 0 0 

I   

0 0 1 0

 



0 0 0 1

Transpose Matrix

Rows become columns and

columns become rows



a

 11 a 21 ,, am1 

 12 a 22 ,, am 2 

a

A'  

     

 1n a 2n ,, amn 



a 

Matrix Addition and

Subtraction



A new matrix C may be defined as the

additive combination of matrices A and B

where: C = A + B

is defined by:



Cij  Aij  Bij

Note: all three matrices are of the same dimension

Addition

a

 11 a12 

A 

I  21 a 22 



a 

f

b

 11 b12 

and B 

 21 b 22



b 



 11  b11 a12  b12 

a

then C 

 21  b 21 a 22  b22 



a 

Matrix Addition Example





3

 4   2 

1 4

 6 

A  B     C

 6   4 

   

5 3  10 

8 



Matrix Subtraction



C = A - B

Is defined by





Cij  Aij  Bij

Matrix Multiplication

Matrices A and B have these dimensions:









[r x c] and [s x d]

Matrix Multiplication

Matrices A and B can be multiplied if:



[r x c] and [s x d]



c=s

Matrix Multiplication



The resulting matrix will have the dimensions:



[r x c] and [s x d]



rxd

Computation: A x B = C

a

 11 a12 

A  [2 x 2]

 21 a 22 



a 

b

 11 b12 b13 

B  [2 x 3]

 21 b 22 b 23



b 

a11b11  a12b21 a11b12  a12b22 a11b13  a12b23 

C 

a 21b11  a 22b21 a 21b12  a 22b22 a 21b13  a 22b23

[2 x 3]

Computation: A x B = C



 3

2

1

 1 1 

A   1  and B 

1

 0 2 



1 

 0 

 

1

[3 x 2] [2 x 3]

A and B can be multiplied





2 *1  3 *1  5 2 *1  3 * 0  2 2 *1  3 * 2  8 5 2 8

C  1*1  1*1  2 1*1  1* 0  1 1*1  1* 2  3   2 1 3 

   

1*1  0 *1  1 1*1  0 * 0  1 1*1  0 * 2  1  111 

   



[3 x 3]

Computation: A x B = C



 3

2

1

 1 1 

A   1  and B 

1

 0 2 



1 

 0 

 

1

[3 x 2] [2 x 3]

Result is 3 x 3





2 *1  3 *1  5 2 *1  3 * 0  2 2 *1  3 * 2  8 5 2 8

C  1*1  1*1  2 1*1  1* 0  1 1*1  1* 2  3   2 1 3 

   

1*1  0 *1  1 1*1  0 * 0  1 1*1  0 * 2  1  111 

   



[3 x 3]

Inversion

Matrix Inversion





1 1

B B  BB  I



Like a reciprocal Like the number one

in scalar math in scalar math

Linear System of Simultaneous

Equations



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.



1st Precinct : x1  x 2  6

2nd Pr ecinct : 2x1  x 2  9

1 1   11 

Solution Note: Inverse of 2 1 is 2  1

   

1 1   x1  6

2 1 *  x   9

   2  

 11  11   x1   11  6 Premultiply both sides by

2  1 * 2 1 *  x   2  1 * 9 inverse matrix

     2    



1 0  x1  3 A square matrix multiplied by its

0 1 *  x   3 inverse results in the identity matrix.

   2  



 x1  3 A 2x2 identity matrix multiplied by



x  

the 2x1 matrix results in the original

3

 2   2x1 matrix.

General Form

n equations in n variables:

n

 aijxj  bi or Ax  b

j1



unknown values of x can be found using the inverse of

matrix A such that

1 1

x  A Ax  A b

Garin-Lowry Model



Ax  y  x

The object is to find x given A and y . This is

done by solving for x :



y  Ix  Ax

y  (I  A)x

1

(I  A) y  x

Matrix Operations in Excel









Select the

cells in

which the

answer

will

appear

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 “)”

Matrix Multiplication in Excel



Enter these

three

key

strokes

at the

same

time:

control

shift

enter

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


Related docs
Other docs by HC11121021037
Slide 1
Views: 5  |  Downloads: 0
Formulas for Angles in Circles
Views: 0  |  Downloads: 0
Query_Match_Time_Saturday
Views: 36  |  Downloads: 0
CHILDCARE TIME SHEET
Views: 0  |  Downloads: 0
Interpersonal Communication Chapter 8
Views: 11  |  Downloads: 0
ADK Estyn SEF Conference Autumn 09 FINAL
Views: 1  |  Downloads: 0
TutorialModule5 Part2
Views: 6  |  Downloads: 0
JSA-sample Personal Importance
Views: 0  |  Downloads: 0
By Richard Impola
Views: 0  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!