+ All Categories
Home > Documents > Matrices Square is Good! Copyright © 2014 Curt Hill.

Matrices Square is Good! Copyright © 2014 Curt Hill.

Date post: 26-Dec-2015
Category:
Upload: charles-gregory
View: 215 times
Download: 2 times
Share this document with a friend
29
Matrices Square is Good! Copyright © 2014 Curt Hill
Transcript

Matrices

Square is Good!

Copyright © 2014 Curt Hill

Introduction• Matrices seem to have been

developed by Gauss, for the purpose of solving systems of simulteneous linear equations– Before 1800s they are known as

arrays– A Chinese text discusses their use for

linear equations that dates to BC times

• We will also use but not for that purpose, but lets start with that

Copyright © 2014 Curt Hill

A matrix• When we have systems of

linear equations the first step is to put them in standard form:a1x+b1y=c1

a2x+b2y=c2

• In standard form we always write the equations in the same way

• On the left hand side are all the variable and on the right only constants

• The variables are in the same order

Copyright © 2014 Curt Hill

Consider• Two equations

3x - 7y = 12x - 3y = -1

• This is now in standard form:• All variables to left of =• All constants to right• Xs always come first and Ys next• The first column is the X• The second column is the Y• The third the constant

• The next step is to render this in terms of a matrix

Copyright © 2014 Curt Hill

Matrix Example

• Three columns and two rows• Each column is the coefficients of

some part of the equation• Each row represents an equation

Copyright © 2014 Curt Hill

Gaussian Elimination• To solve a system of simultaneous linear equations you transform the matrix into this form:

• This can be done by the application of two rules only:– Any row may be multiplied by a

constant– The sum or difference of any two rows

may replace any row– The shortcut is to multiply a row by a

constant and add it to another, replacing either

Copyright © 2014 Curt Hill

In General• We may have any number of rows

and columns• A column matrix has one column

but multiple rows– Also known as a column vector

• A row matrix has one row but multiple columns– Also known as a row vector

• A square matrix has the same number of rows and columns

Copyright © 2014 Curt Hill

Elements

• Each element is subscripted by a row number then a column number

• A row or column matrix might only have one subscript

Copyright © 2014 Curt Hill

Arithmetic• We also have the notion of matrix

arithmetic– At least addition, subtraction, product

(multiplication)• In the rationals and real numbers

any two items may participate in any operation

• This is not true for matrix arithmetic– Two matrices must be compatible– The rules of compatibility vary by

operationCopyright © 2014 Curt Hill

Matrix Addition• Two matrices are compatible for

addition if they have the same sizes– The two must have the same number

of columns and same number of rows• The sum of two matrices is a new

matrix with the same size of the two that were added

• Each position has the sum of the corresponding positions of the two

Copyright © 2014 Curt Hill

Addition Again• We write C = A + B• The following statement must then

be true of Ci,j Ci,j = Ai,j + Bi,j

– The subscripts i and j must be in correct bounds for all three

• We may also define subtraction in the same way

Copyright © 2014 Curt Hill

Audience Participation• Consider the two matrices:

and • Are A+B compatible for addition?• What is A+B?

Copyright © 2014 Curt Hill

Multiplication• Multiplication is somewhat more

complicated• There are two things to consider:

– Matrix compatibility– How the operation proceeds

• Neither is as easy as addition• Matrix multiplication is not

commutative• We denote the product of matrix A

and matrix B as ABCopyright © 2014 Curt Hill

Compatibility• The matrix AB may only be

computed if the number of columns of A is identical with the number of rows of B– The number of rows of A and number

of columns of B do not matter• Thus if A is mk and B is kn the

two are compatible• Square matrices of the same size

are compatible, but all other compatible matrices have a different shapeCopyright © 2014 Curt Hill

Process• If A is mk and B is kn the result,

AB is mn• The new matrix has each element

as a sum of products• A column from the left times the row

from right• C=AB

Cij = Ai1B1j + Ai2B2j + … + AikBkj

Copyright © 2014 Curt Hill

Example• Suppose:

• Then AB = C• C=

Copyright © 2014 Curt Hill

Exercise• Now lets try one in groups:• If A= • What is AB?• What is BA?

Copyright © 2014 Curt Hill

Now Then• If A= • AB = • BA =

Copyright © 2014 Curt Hill

Something else• Now lets try one in groups:• If A= • What is AB?• What is BA?

Copyright © 2014 Curt Hill

Identity Matrix• A square matrix with ones on the

diagonal and zeros else where is an identity matrix

• When multiplied with a compatible matrix it gives the matrix back– Similar to one with respect to

multiplication and zero with respect to addition

– One is the unit of multiplication as is zero to addition

Copyright © 2014 Curt Hill

Online Resources• The following links may be helpful:• http://matrix.reshish.com• http://www.wolframalpha.com/• First two on a Google Search

Copyright © 2014 Curt Hill

Transpose• A common operation of matrices• We make rows into columns

– Flip it around the diagonal• Thus the transpose of:

is • A square matrix that does not

change with a transpose is symmetric– Such as the identity matrix

Copyright © 2014 Curt Hill

Inverse Matrix• Two square matrices of same size

are inverses of one another if their product is the identity matrix– They are invertable

• Thus AB = BA = I• An inverse is unique• We also use the notation A-1 for the

inverse of A• In linear algebra a coefficient

matrix that is invertable has a unique solution

Copyright © 2014 Curt Hill

Zero-One Matrix• Any matrix, such as the identity

matrix, that has only zeros and ones

• Often matrices representing Boolean values

• The join of two identically sized zero one matrices is the corresponding elements ORed

• The meetjoin of two identically sized zero one matrices is the corresponding elements ANDedCopyright © 2014 Curt Hill

Example • If we have two zero-one matrices:

• The join is: • The meet is:

Copyright © 2014 Curt Hill

Boolean Product• Similar to matrix multiplication

except the adds are replaced by ORs and multiplies by ANDs

• The symbol is

Copyright © 2014 Curt Hill

Example

• Result is:

Copyright © 2014 Curt Hill

Powers• Raising a number to a power is

merely repeated multiplication• We may also raise square zero-one

matrices to a power• Conjunction and disjunction are

associative so Boolean product is as well

• We define the zeroth power to be an identity matrix

Copyright © 2014 Curt Hill

Exercises• 3, 7, 11, 15, 27, 29

Copyright © 2014 Curt Hill


Recommended